Menu

Speech-To-Text in German

Help
2021-08-28
2021-08-29
  • Marcirianer

    Marcirianer - 2021-08-28

    Hi,
    I want to program a speech-to-text recognition in Java.
    I am using the following configuration code, the file are downloaded from the recommended download link of the cmu sphinx website:

    configuration.setAcousticModelPath("resource:/de-de");
    configuration.setDictionaryPath("resource:/cmusphinx-voxforge-de.dic");
    configuration.setLanguageModelPath("resource:/cmusphinx-voxforge-de.lm.bin");
    

    In the feat params are:
    -lowerf 130
    -upperf 6800
    -nfilt 25
    -transform dct
    -lifter 22
    -feat 1s_c_d_dd
    -agc none
    -cmn current
    -varnorm no

    If I start my program many info like

    The dictionary is missing a phonetic transcription for the word 'flex'

    appears.

    The following code

    while ((result = recognizer.getResult()) != null) {
                System.out.format("Hypothesis: %s\n", result.getHypothesis());
            }
            recognizer.stopRecognition();
    

    is executed but without result. On the console appears:

    23:30:00.126 INFO speedTracker         # Name               Count   CurTime   MinTime   MaxTime   AvgTime   TotTime   
    23:30:00.126 INFO speedTracker         Load LM              1       15,5220s  15,5220s  15,5220s  15,5220s  15,5220s  
    23:30:00.126 INFO speedTracker         Score                4       0,0000s   0,0000s   0,0150s   0,0037s   0,0150s   
    23:30:00.126 INFO speedTracker         Prune                10      0,0000s   0,0000s   0,0000s   0,0000s   0,0000s   
    23:30:00.126 INFO speedTracker         Grow                 14      0,0000s   0,0000s   0,0020s   0,0003s   0,0040s   
    23:30:00.126 INFO speedTracker         Frontend             4       0,0000s   0,0000s   0,0150s   0,0037s   0,0150s   
    23:30:00.126 INFO speedTracker         Compile              1       7,9330s   7,9330s   7,9330s   7,9330s   7,9330s   
    23:30:00.126 INFO speedTracker         Load AM              1       1,1100s   1,1100s   1,1100s   1,1100s   1,1100s   
    23:30:00.127 INFO speedTracker         Load Dictionary      1       0,0310s   0,0310s   0,0310s   0,0310s   0,0310s   
    23:30:00.127 INFO speedTracker            Total Time Audio: 10,20s  Proc: 0,00s 0,00 X real time
    23:30:00.127 INFO memoryTracker           Mem  Total: 868,00 Mb  Free: 244,46 Mb
    23:30:00.127 INFO memoryTracker           Used: This: 623,54 Mb  Avg: 622,97 Mb  Max: 623,54 Mb
    

    What I am doing wrong? I am using the tutorial java program.
    Thank you very much,

     
    • Nickolay V. Shmyrev

       
      • Marcirianer

        Marcirianer - 2021-08-29

        Thank you very much for your answer and solution, I could test it with english wav-file, all fine.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.