sS vosk_recognize16KWav(File wav, O... _) { optPar S envVars; optPar S language = "en"; assertFileExists(wav); File dir = assertNotNull("vosk dir not set", vosk_example_dir()); File model1 = newFile(dir, "model-" + assertIdentifier(language)); assertFileExists(model1); LS args = ll(platformQuote(model1)); File pyFile = newFile(dir, "recognize.py"); if (!fileExists(pyFile)) saveTextFile(pyFile, loadSnippet(#1026985)); time "vosk recognition" { S text = trim(backtickToConsole_returnOutput("python3 " + platformQuote(pyFile) + " " + + joinWithSpace(args) + " " + platformQuote(wav))); } ret text; } sS vosk_recognize16KWav(S wav) { ret vosk_recognize16KWav(newFile(wav)); }