Transpiled version (4804L) is out of date.
// optional parameter: bool useKnownPlaces sS vosk(File audioFile, O... _) { if (isRIFFFileByContent(audioFile) && eq(wavSampleRateAndChannels(audioFile), pair(16000f, 1))) // assuming 16 bit ret vosk_recognize16KWav(audioFile, _); optPar bool useKnownPlaces; File wav = useKnownPlaces ? javaxCachesDir("16k-for-vosk.wav") : createTempFileWithExtension(".wav"); temp useKnownPlaces ? null : tempDeleteFile(wav); print("Converting " + audioFile + " to 16k WAV"); deleteFile(wav); ffmpeg_toMonoAudio_16k(audioFile, wav); ret vosk_recognize16KWav(wav, _); } sS vosk(S f, O... _) { ret vosk(newFile(f), _); }
Began life as a copy of #1026958
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026983 |
Snippet name: | vosk - recognize audio file with vosk (if installed in a certain dir) |
Eternal ID of this version: | #1026983/3 |
Text MD5: | aa5737cbb3ac576eb8999018907641f8 |
Author: | stefan |
Category: | javax / speech recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-05 23:25:43 |
Source code size: | 658 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 291 / 362 |
Version history: | 2 change(s) |
Referenced in: | [show references] |