Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1026988 - Recognize Last Recording As German Speech With Kaldi/vosk

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 795K of libraries. Click here for Pure Java version (8448L/43K).

!7

cmodule KaldiLastRecording > DynPrintLogAndEnabled {
  //switchable S envVars;
  switchable bool useKnownPlaces;
  
  start {
    dm_requireQuickAudioRecord();
    dm_onNewRecording_q/*OrWAVOnClipboard*/(voidfunc(File f) enter {
      if (!enabled) ret;
      print("Analyzing " + f.getName());
      S full = trim(vosk(f, /*+envVars*/ +useKnownPlaces, language := "de"));
      S text = vosk_postprocess(full, verbose := true);
      flatInfoBox(text);
      swing {
        S info = "vosk german";
        dm_rawSpeechRecognized(module(), text, info, f);
      }
    });
  }
}

Author comment

Began life as a copy of #1026984

download  show line numbers  debug dex   

Travelled to 1 computer(s): mqqgnosmbjvj

No comments. add comment

Snippet ID: #1026988
Snippet name: Recognize Last Recording As German Speech With Kaldi/vosk
Eternal ID of this version: #1026988/6
Text MD5: d04fb4c41504b99e12307d4cfc83ef73
Transpilation MD5: 56913a532a9ab491f6b62967b9264c6c
Author: stefan
Category: javax / audio recognition
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-13 13:23:34
Source code size: 602 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 21 / 1078
Version history: 5 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1026988 & http://1026988.tinybrain.de