На главную Наши проекты:
Журнал   ·   Discuz!ML   ·   Wiki   ·   DRKB   ·   Помощь проекту
ПРАВИЛА FAQ Помощь Участники Календарь Избранное RSS
msm.ru
Модераторы: RaD, nsh
Страницы: (23) « Первая ... 20 21 [22] 23   ( Перейти к последнему сообщению )  
> Работа с CMU Sphinx , Работа с CMU Sphinx 4.0
    Предыдущий вопрос закрыт - была ошибка с моей стороны.
    Сообщение отредактировано: Kenait -
      Привет

      установил pocketsphinx и тестирую запись вот на этой модели https://sourceforge.net/projects/cmusphinx/...Models/Russian/

      Качество как-то не очень. Можете подсказать где можно найти лучше модель? И в какую сторону копать, если нужно распознавать много разных голосов.
        Цитата dmarck @
        Можете подсказать где можно найти лучше модель?


        Купить у Яндекса.
          Цитата nsh @

          сейчас их и использую. Готов потерять в качестве, но прогонять больший объем для аналитики.
            Цитата dmarck @
            сейчас их и использую. Готов потерять в качестве, но прогонять больший объем для аналитики.


            Тогда проще всего натренировать свою модель на результатах Яндекса.
              Добрый день, пытаюсь запустить sphinx на win7, gradle вроде строит нормально, но пока не удаётся запустить распознавание из файла тестовой записи на англ. 20 секунд голоса. Процесс вылетает из-за нехватки памяти, буду благодарен за подсказку
              ExpandedWrap disabled
                        at java.io.FileInputStream.open0(Native Method)
                        at java.io.FileInputStream.open(FileInputStream.java:195)
                        at java.io.FileInputStream.<init>(FileInputStream.java:138)
                        at java.io.FileInputStream.<init>(FileInputStream.java:93)
                        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection
                .java:90)
                        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
                nection.java:188)
                        at java.net.URL.openStream(URL.java:1045)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.getDataStrea
                m(Sphinx3Loader.java:233)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.readS3Binary
                Header(Sphinx3Loader.java:604)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadDensityF
                ile(Sphinx3Loader.java:525)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadModelFil
                es(Sphinx3Loader.java:298)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.load(Sphinx3
                Loader.java:252)
                        at edu.cmu.sphinx.frontend.AutoCepstrum.newProperties(AutoCepstrum.java:
                118)
                        ... 25 more
                 
                 
                FAILURE: Build failed with an exception.
                 
                * What went wrong:
                Execution failed for task ':run'.
                > Process 'command 'C:\Program Files\Java\jdk1.8.0_144\bin\java.exe'' finished w
                ith non-zero exit value 1
                 
                * Try:
                Run with --stacktrace option to get the stack trace. Run with --info or --debug
                option to get more log output.
                 
                * Get more help at https://help.gradle.org
                 
                BUILD FAILED in 2s
                2 actionable tasks: 1 executed, 1 up-to-date
                 
                c:\workspace_Oxygen\Speech_Recognise>chcp
                ’ҐЄгй п Є®¤®ў п бва ­Ёж : 866
                 
                c:\workspace_Oxygen\Speech_Recognise>chcp 65001
                Active code page: 65001
                 
                c:\workspace_Oxygen\Speech_Recognise>gradle run
                 
                > Task :run
                Exception in thread "main" Property exception component:'null' property:'null' -
                 java.io.FileNotFoundException: C:\workspace_Oxygen\Speech_Recognise\en-us\means
                 (Íå óäàåòñÿ íàéòè óêàçàííûé ôàéë)
                edu.cmu.sphinx.util.props.PropertyException: java.io.FileNotFoundException: C:\w
                orkspace_Oxygen\Speech_Recognise\en-us\means (Íå óäàåòñÿ íàéòè óêàçàííûé ôàéë)
                        at edu.cmu.sphinx.frontend.AutoCepstrum.newProperties(AutoCepstrum.java:
                120)
                        at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:5
                18)
                        at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationMa
                nager.java:163)
                        at edu.cmu.sphinx.util.props.PropertySheet.getComponentList(PropertyShee
                t.java:432)
                        at edu.cmu.sphinx.frontend.FrontEnd.newProperties(FrontEnd.java:160)
                        at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:5
                18)
                        at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
                va:296)
                        at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.newProperties(Simp
                leAcousticScorer.java:47)
                        at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:5
                18)
                        at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
                va:296)
                        at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.ne
                wProperties(WordPruningBreadthFirstSearchManager.java:213)
                        at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                anager.newProperties(WordPruningBreadthFirstLookaheadSearchManager.java:156)
                        at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:5
                18)
                        at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
                va:296)
                        at edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(AbstractDecoder.
                java:81)
                        at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:36)
                        at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:5
                18)
                        at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
                va:296)
                        at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:86
                )
                        at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:5
                18)
                        at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationMa
                nager.java:163)
                        at edu.cmu.sphinx.api.Context.<init>(Context.java:73)
                        at edu.cmu.sphinx.api.Context.<init>(Context.java:45)
                        at edu.cmu.sphinx.api.AbstractSpeechRecognizer.<init>(AbstractSpeechReco
                gnizer.java:44)
                        at edu.cmu.sphinx.api.StreamSpeechRecognizer.<init>(StreamSpeechRecogniz
                er.java:35)
                        at Demo.TranscriberDemo.main(TranscriberDemo.java:21)
                Caused by: java.io.FileNotFoundException: C:\workspace_Oxygen\Speech_Recognise\e
                n-us\means (Íå óäàåòñÿ íàéòè óêàçàííûé ôàéë)
                        at java.io.FileInputStream.open0(Native Method)
                        at java.io.FileInputStream.open(FileInputStream.java:195)
                        at java.io.FileInputStream.<init>(FileInputStream.java:138)
                        at java.io.FileInputStream.<init>(FileInputStream.java:93)
                        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection
                .java:90)
                        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
                nection.java:188)
                        at java.net.URL.openStream(URL.java:1045)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.getDataStrea
                m(Sphinx3Loader.java:233)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.readS3Binary
                Header(Sphinx3Loader.java:604)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadDensityF
                ile(Sphinx3Loader.java:525)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadModelFil
                es(Sphinx3Loader.java:298)
                        at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.load(Sphinx3
                Loader.java:252)
                        at edu.cmu.sphinx.frontend.AutoCepstrum.newProperties(AutoCepstrum.java:
                118)
                        ... 25 more
                 
                 
                FAILURE: Build failed with an exception.
                 
                * What went wrong:
                Execution failed for task ':run'.
                > Process 'command 'C:\Program Files\Java\jdk1.8.0_144\bin\java.exe'' finished w
                ith non-zero exit value 1
                 
                * Try:
                Run with --stacktrace option to get the stack trace. Run with --info or --debug
                option to get more log output.
                 
                * Get more help at https://help.gradle.org
                 
                BUILD FAILED in 2s
                2 actionable tasks: 1 executed, 1 up-to-date
                 
                c:\workspace_Oxygen\Speech_Recognise>gradle build
                 
                BUILD SUCCESSFUL in 6s
                5 actionable tasks: 4 executed, 1 up-to-date
                c:\workspace_Oxygen\Speech_Recognise>gradle run
                 
                > Task :run
                15:14:26.200 INFO unitManager          CI Unit: *+NSN+
                15:14:26.200 INFO unitManager          CI Unit: *+SPN+
                15:14:26.200 INFO unitManager          CI Unit: AA
                15:14:26.200 INFO unitManager          CI Unit: AE
                15:14:26.200 INFO unitManager          CI Unit: AH
                15:14:26.200 INFO unitManager          CI Unit: AO
                15:14:26.200 INFO unitManager          CI Unit: AW
                15:14:26.200 INFO unitManager          CI Unit: AY
                15:14:26.200 INFO unitManager          CI Unit: B
                15:14:26.215 INFO unitManager          CI Unit: CH
                15:14:26.215 INFO unitManager          CI Unit: D
                15:14:26.215 INFO unitManager          CI Unit: DH
                15:14:26.215 INFO unitManager          CI Unit: EH
                15:14:26.215 INFO unitManager          CI Unit: ER
                15:14:26.215 INFO unitManager          CI Unit: EY
                15:14:26.215 INFO unitManager          CI Unit: F
                15:14:26.215 INFO unitManager          CI Unit: G
                15:14:26.215 INFO unitManager          CI Unit: HH
                15:14:26.215 INFO unitManager          CI Unit: IH
                15:14:26.215 INFO unitManager          CI Unit: IY
                15:14:26.215 INFO unitManager          CI Unit: JH
                15:14:26.215 INFO unitManager          CI Unit: K
                15:14:26.215 INFO unitManager          CI Unit: L
                15:14:26.215 INFO unitManager          CI Unit: M
                15:14:26.215 INFO unitManager          CI Unit: N
                15:14:26.215 INFO unitManager          CI Unit: NG
                15:14:26.215 INFO unitManager          CI Unit: OW
                15:14:26.215 INFO unitManager          CI Unit: OY
                15:14:26.215 INFO unitManager          CI Unit: P
                15:14:26.215 INFO unitManager          CI Unit: R
                15:14:26.215 INFO unitManager          CI Unit: S
                15:14:26.215 INFO unitManager          CI Unit: SH
                15:14:26.215 INFO unitManager          CI Unit: T
                15:14:26.215 INFO unitManager          CI Unit: TH
                15:14:26.215 INFO unitManager          CI Unit: UH
                15:14:26.215 INFO unitManager          CI Unit: UW
                15:14:26.215 INFO unitManager          CI Unit: V
                15:14:26.215 INFO unitManager          CI Unit: W
                15:14:26.215 INFO unitManager          CI Unit: Y
                15:14:26.215 INFO unitManager          CI Unit: Z
                15:14:26.215 INFO unitManager          CI Unit: ZH
                15:14:29.230 INFO autoCepstrum         Cepstrum component auto-configured as fol
                lows: autoCepstrum {MelFrequencyFilterBank, Denoise, DiscreteCosineTransform2, L
                ifter}
                15:14:29.261 INFO dictionary           Loading dictionary from: file:/C:/workspa
                ce_Oxygen/Speech_Recognise/en-us/cmudict-en-us.dict
                15:14:29.901 INFO dictionary           Loading filler dictionary from: file:/C:/
                workspace_Oxygen/Speech_Recognise/en-us/en-us/noisedict
                15:14:29.901 INFO acousticModelLoader  Loading tied-state acoustic model from: f
                ile:/C:/workspace_Oxygen/Speech_Recognise/en-us/en-us
                15:14:29.901 INFO acousticModelLoader  Pool means Entries: 16128
                15:14:29.901 INFO acousticModelLoader  Pool variances Entries: 16128
                15:14:29.901 INFO acousticModelLoader  Pool transition_matrices Entries: 42
                15:14:29.901 INFO acousticModelLoader  Pool senones Entries: 5126
                15:14:29.901 INFO acousticModelLoader  Gaussian weights: mixture_weights. Entrie
                s: 15378
                15:14:29.901 INFO acousticModelLoader  Pool senones Entries: 5126
                15:14:29.901 INFO acousticModelLoader  Context Independent Unit Entries: 42
                15:14:29.901 INFO acousticModelLoader  HMM Manager: 137095 hmms
                15:14:29.901 INFO acousticModel        CompositeSenoneSequences: 0
                15:14:29.901 INFO trieNgramModel       Loading n-gram language model from: file:
                /C:/workspace_Oxygen/Speech_Recognise/en-us/en-us.lm.bin
                15:14:43.667 INFO lexTreeLinguist      Max CI Units 43
                15:14:43.667 INFO lexTreeLinguist      Unit table size 79507
                15:14:43.683 INFO speedTracker         # ----------------------------- Timers---
                -------------------------------------
                15:14:43.683 INFO speedTracker         # Name               Count   CurTime   Mi
                nTime   MaxTime   AvgTime   TotTime
                15:14:43.683 INFO speedTracker         Load AM              1       6,1520s   6,
                1520s   6,1520s   6,1520s   6,1520s
                15:14:43.683 INFO speedTracker         Load Dictionary      1       0,6400s   0,
                6400s   0,6400s   0,6400s   0,6400s
                15:14:43.683 INFO speedTracker         Load LM              1       11,1850s  11
                ,1850s  11,1850s  11,1850s  11,1850s
                15:14:43.683 INFO speedTracker         Compile              1       2,5810s   2,
                5810s   2,5810s   2,5810s   2,5810s
                15:15:25.519 INFO liveCMN              55.31 -5.06 3.38 25.67 -3.44 -0.47 1.64 -
                0.91 1.12 -3.75 2.71 -0.15 1.30
                Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
                        at edu.cmu.sphinx.frontend.util.DataUtil.littleEndianBytesToValues(DataU
                til.java:176)
                        at edu.cmu.sphinx.frontend.util.StreamDataSource.readNextFrame(StreamDat
                aSource.java:247)
                        at edu.cmu.sphinx.frontend.util.StreamDataSource.getData(StreamDataSourc
                e.java:178)
                        at edu.cmu.sphinx.frontend.DataBlocker.getData(DataBlocker.java:56)
                        at edu.cmu.sphinx.frontend.endpoint.SpeechClassifier.getData(SpeechClass
                ifier.java:220)
                        at edu.cmu.sphinx.frontend.endpoint.SpeechMarker.getData(SpeechMarker.ja
                va:136)
                        at edu.cmu.sphinx.frontend.filter.Preemphasizer.getData(Preemphasizer.ja
                va:82)
                        at edu.cmu.sphinx.frontend.window.RaisedCosineWindower.getData(RaisedCos
                ineWindower.java:154)
                        at edu.cmu.sphinx.frontend.transform.DiscreteFourierTransform.getData(Di
                screteFourierTransform.java:269)
                        at edu.cmu.sphinx.frontend.frequencywarp.MelFrequencyFilterBank.getData(
                MelFrequencyFilterBank.java:291)
                        at edu.cmu.sphinx.frontend.denoise.Denoise.getData(Denoise.java:111)
                        at edu.cmu.sphinx.frontend.transform.DiscreteCosineTransform.getData(Dis
                creteCosineTransform.java:77)
                        at edu.cmu.sphinx.frontend.transform.Lifter.getData(Lifter.java:66)
                        at edu.cmu.sphinx.frontend.AutoCepstrum.getData(AutoCepstrum.java:243)
                        at edu.cmu.sphinx.frontend.feature.LiveCMN.getData(LiveCMN.java:177)
                        at edu.cmu.sphinx.frontend.feature.AbstractFeatureExtractor.getNextData(
                AbstractFeatureExtractor.java:122)
                        at edu.cmu.sphinx.frontend.feature.AbstractFeatureExtractor.getData(Abst
                ractFeatureExtractor.java:93)
                        at edu.cmu.sphinx.frontend.feature.FeatureTransform.getData(FeatureTrans
                form.java:85)
                        at edu.cmu.sphinx.frontend.FrontEnd.getData(FrontEnd.java:222)
                        at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.getNextData(Simple
                AcousticScorer.java:146)
                        at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.calculateScoresAnd
                StoreData(SimpleAcousticScorer.java:104)
                        at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                anager.scoreFastMatchTokens(WordPruningBreadthFirstLookaheadSearchManager.java:2
                86)
                        at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                anager.fastMatchRecognize(WordPruningBreadthFirstLookaheadSearchManager.java:206
                )
                        at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                anager.recognize(WordPruningBreadthFirstLookaheadSearchManager.java:187)
                        at edu.cmu.sphinx.decoder.Decoder.decode(Decoder.java:65)
                        at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:106)
                        at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:122)
                        at edu.cmu.sphinx.api.AbstractSpeechRecognizer.getResult(AbstractSpeechR
                ecognizer.java:60)
                        at Demo.TranscriberDemo.main(TranscriberDemo.java:26)
                 
                 
                FAILURE: Build failed with an exception.
                 
                * What went wrong:
                Execution failed for task ':run'.
                > Process 'command 'C:\Program Files\Java\jdk1.8.0_144\bin\java.exe'' finished w
                ith non-zero exit value 1
                 
                * Try:
                Run with --stacktrace option to get the stack trace. Run with --info or --debug
                option to get more log output.
                 
                * Get more help at https://help.gradle.org
                 
                BUILD FAILED in 1m 58s
                2 actionable tasks: 1 executed, 1 up-to-date
                 
                c:\workspace_Oxygen\Speech_Recognise>^A
                 
                c:\workspace_Oxygen\Speech_Recognise>


              Добавлено
              Собственно вот код проекта
              ExpandedWrap disabled
                package Demo;
                 
                import java.io.File;
                import java.io.FileInputStream;
                import java.io.InputStream;
                 
                import edu.cmu.sphinx.api.Configuration;
                import edu.cmu.sphinx.api.SpeechResult;
                import edu.cmu.sphinx.api.StreamSpeechRecognizer;
                 
                public class TranscriberDemo {      
                 
                    public static void main(String[] args) throws Exception {
                 
                        Configuration configuration = new Configuration();
                 
                        configuration.setAcousticModelPath("file:///C:/workspace_Oxygen/Speech_Recognise/en-us/en-us");
                        configuration.setDictionaryPath("file:///C:/workspace_Oxygen/Speech_Recognise/en-us/cmudict-en-us.dict");
                        configuration.setLanguageModelPath("file:///C:/workspace_Oxygen/Speech_Recognise/en-us/en-us.lm.bin");
                 
                    StreamSpeechRecognizer recognizer = new StreamSpeechRecognizer(configuration);
                    InputStream stream = new FileInputStream(new File("C:\\workspace_Oxygen\\Test_wav\\b0365.wav"));
                 
                        recognizer.startRecognition(stream);
                    SpeechResult result;
                        while ((result = recognizer.getResult()) != null) {
                        System.out.format("Hypothesis: %s\n", result.getHypothesis());
                    }
                    recognizer.stopRecognition();
                    }
                }
                Цитата Stanislav @


                Памяти можно добавить с помощью ключа jvm -Xmx, например -Xmx2048m
                  Например java -Xmx2048m
                  Так, изменил код немного
                  ExpandedWrap disabled
                    package Demo;
                     
                    import java.io.File;
                    import java.io.FileInputStream;
                    import java.io.InputStream;
                     
                    import edu.cmu.sphinx.api.Configuration;
                    import edu.cmu.sphinx.api.SpeechResult;
                    import edu.cmu.sphinx.api.StreamSpeechRecognizer;
                     
                    public class TranscriberDemo {      
                     
                        public static void main(String[] args) throws Exception {
                            System.out.println ("+++++++++++++++++Work started1+++++++++++++++");
                            Configuration configuration = new Configuration();
                     
                            configuration.setAcousticModelPath("file:///C:/workspace_Oxygen/Speech_Recognise/en-us/en-us");
                            configuration.setDictionaryPath("file:///C:/workspace_Oxygen/Speech_Recognise/en-us/cmudict-en-us.dict");
                            configuration.setLanguageModelPath("file:///C:/workspace_Oxygen/Speech_Recognise/en-us/en-us.lm.bin");
                     
                        StreamSpeechRecognizer recognizer = new StreamSpeechRecognizer(configuration);
                        InputStream stream = new FileInputStream(new File("C:\\workspace_Oxygen\\Test_wav\\b0365.wav"));
                            System.out.println ("+++++++++++++++++Work started2+++++++++++++++");
                            recognizer.startRecognition(stream);
                                    System.out.println ("+++++++++++++++++Work started3+++++++++++++++");
                        SpeechResult result;
                                System.out.println ("+++++++++++++++++Work resulted complete1+++++++++++++++");
                            while ((result = recognizer.getResult()) != null) {
                                            System.out.println ("+++++++++++++++++recognizer.getResult+++++++++++++++");
                                            
                            System.out.format("Hypothesis: %s\n", result.getHypothesis());
                            System.out.println ("^^^^^^^^^^^^^^"+result.getHypothesis()+"^^^^^^^^^^^^^^^^^^^^^");
                        }
                        recognizer.stopRecognition();
                        }
                    }

                  Результат работы так же вылетает по памяти, но как видно в конце, при получении результатов
                  ExpandedWrap disabled
                    16:11:07.734 INFO unitManager          CI Unit: CH
                    16:11:07.735 INFO unitManager          CI Unit: D
                    16:11:07.735 INFO unitManager          CI Unit: DH
                    16:11:07.735 INFO unitManager          CI Unit: EH
                    16:11:07.735 INFO unitManager          CI Unit: ER
                    16:11:07.736 INFO unitManager          CI Unit: EY
                    16:11:07.736 INFO unitManager          CI Unit: F
                    16:11:07.736 INFO unitManager          CI Unit: G
                    16:11:07.737 INFO unitManager          CI Unit: HH
                    16:11:07.737 INFO unitManager          CI Unit: IH
                    16:11:07.737 INFO unitManager          CI Unit: IY
                    16:11:07.737 INFO unitManager          CI Unit: JH
                    16:11:07.738 INFO unitManager          CI Unit: K
                    16:11:07.738 INFO unitManager          CI Unit: L
                    16:11:07.738 INFO unitManager          CI Unit: M
                    16:11:07.738 INFO unitManager          CI Unit: N
                    16:11:07.738 INFO unitManager          CI Unit: NG
                    16:11:07.739 INFO unitManager          CI Unit: OW
                    16:11:07.739 INFO unitManager          CI Unit: OY
                    16:11:07.739 INFO unitManager          CI Unit: P
                    16:11:07.740 INFO unitManager          CI Unit: R
                    16:11:07.740 INFO unitManager          CI Unit: S
                    16:11:07.740 INFO unitManager          CI Unit: SH
                    16:11:07.740 INFO unitManager          CI Unit: T
                    16:11:07.741 INFO unitManager          CI Unit: TH
                    16:11:07.741 INFO unitManager          CI Unit: UH
                    16:11:07.741 INFO unitManager          CI Unit: UW
                    16:11:07.742 INFO unitManager          CI Unit: V
                    16:11:07.742 INFO unitManager          CI Unit: W
                    16:11:07.742 INFO unitManager          CI Unit: Y
                    16:11:07.742 INFO unitManager          CI Unit: Z
                    16:11:07.743 INFO unitManager          CI Unit: ZH
                    16:11:11.204 INFO autoCepstrum         Cepstrum component auto-configured as fol
                    lows: autoCepstrum {MelFrequencyFilterBank, Denoise, DiscreteCosineTransform2, L
                    ifter}
                    +++++++++++++++++Work started2+++++++++++++++
                    16:11:11.231 INFO dictionary           Loading dictionary from: file:/C:/workspa
                    ce_Oxygen/Speech_Recognise/en-us/cmudict-en-us.dict
                    16:11:11.988 INFO dictionary           Loading filler dictionary from: file:/C:/
                    workspace_Oxygen/Speech_Recognise/en-us/en-us/noisedict
                    16:11:11.988 INFO acousticModelLoader  Loading tied-state acoustic model from: f
                    ile:/C:/workspace_Oxygen/Speech_Recognise/en-us/en-us
                    16:11:11.988 INFO acousticModelLoader  Pool means Entries: 16128
                    16:11:11.988 INFO acousticModelLoader  Pool variances Entries: 16128
                    16:11:11.988 INFO acousticModelLoader  Pool transition_matrices Entries: 42
                    16:11:11.988 INFO acousticModelLoader  Pool senones Entries: 5126
                    16:11:11.988 INFO acousticModelLoader  Gaussian weights: mixture_weights. Entrie
                    s: 15378
                    16:11:11.988 INFO acousticModelLoader  Pool senones Entries: 5126
                    16:11:11.988 INFO acousticModelLoader  Context Independent Unit Entries: 42
                    16:11:11.988 INFO acousticModelLoader  HMM Manager: 137095 hmms
                    16:11:11.988 INFO acousticModel        CompositeSenoneSequences: 0
                    16:11:11.988 INFO trieNgramModel       Loading n-gram language model from: file:
                    /C:/workspace_Oxygen/Speech_Recognise/en-us/en-us.lm.bin
                    16:11:27.155 INFO lexTreeLinguist      Max CI Units 43
                    16:11:27.155 INFO lexTreeLinguist      Unit table size 79507
                    16:11:27.155 INFO speedTracker         # ----------------------------- Timers---
                    -------------------------------------
                    16:11:27.155 INFO speedTracker         # Name               Count   CurTime   Mi
                    nTime   MaxTime   AvgTime   TotTime
                    16:11:27.155 INFO speedTracker         Load AM              1       7,0880s   7,
                    0880s   7,0880s   7,0880s   7,0880s
                    16:11:27.155 INFO speedTracker         Load Dictionary      1       0,7570s   0,
                    7570s   0,7570s   0,7570s   0,7570s
                    16:11:27.155 INFO speedTracker         Load LM              1       12,2460s  12
                    ,2460s  12,2460s  12,2460s  12,2460s
                    16:11:27.171 INFO speedTracker         Compile              1       2,9200s   2,
                    9200s   2,9200s   2,9200s   2,9200s
                    +++++++++++++++++Work started3+++++++++++++++
                    +++++++++++++++++Work resulted complete1+++++++++++++++
                    16:12:15.438 INFO liveCMN              55.31 -5.06 3.38 25.67 -3.44 -0.47 1.64 -
                    0.91 1.12 -3.75 2.71 -0.15 1.30
                    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
                            at edu.cmu.sphinx.frontend.util.DataUtil.littleEndianBytesToValues(DataU
                    til.java:176)
                            at edu.cmu.sphinx.frontend.util.StreamDataSource.readNextFrame(StreamDat
                    aSource.java:247)
                            at edu.cmu.sphinx.frontend.util.StreamDataSource.getData(StreamDataSourc
                    e.java:178)
                            at edu.cmu.sphinx.frontend.DataBlocker.getData(DataBlocker.java:56)
                            at edu.cmu.sphinx.frontend.endpoint.SpeechClassifier.getData(SpeechClass
                    ifier.java:220)
                            at edu.cmu.sphinx.frontend.endpoint.SpeechMarker.getData(SpeechMarker.ja
                    va:136)
                            at edu.cmu.sphinx.frontend.filter.Preemphasizer.getData(Preemphasizer.ja
                    va:82)
                            at edu.cmu.sphinx.frontend.window.RaisedCosineWindower.getData(RaisedCos
                    ineWindower.java:154)
                            at edu.cmu.sphinx.frontend.transform.DiscreteFourierTransform.getData(Di
                    screteFourierTransform.java:269)
                            at edu.cmu.sphinx.frontend.frequencywarp.MelFrequencyFilterBank.getData(
                    MelFrequencyFilterBank.java:291)
                            at edu.cmu.sphinx.frontend.denoise.Denoise.getData(Denoise.java:111)
                            at edu.cmu.sphinx.frontend.transform.DiscreteCosineTransform.getData(Dis
                    creteCosineTransform.java:77)
                            at edu.cmu.sphinx.frontend.transform.Lifter.getData(Lifter.java:66)
                            at edu.cmu.sphinx.frontend.AutoCepstrum.getData(AutoCepstrum.java:243)
                            at edu.cmu.sphinx.frontend.feature.LiveCMN.getData(LiveCMN.java:177)
                            at edu.cmu.sphinx.frontend.feature.AbstractFeatureExtractor.getNextData(
                    AbstractFeatureExtractor.java:122)
                            at edu.cmu.sphinx.frontend.feature.AbstractFeatureExtractor.getData(Abst
                    ractFeatureExtractor.java:93)
                            at edu.cmu.sphinx.frontend.feature.FeatureTransform.getData(FeatureTrans
                    form.java:85)
                            at edu.cmu.sphinx.frontend.FrontEnd.getData(FrontEnd.java:222)
                            at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.getNextData(Simple
                    AcousticScorer.java:146)
                            at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.calculateScoresAnd
                    StoreData(SimpleAcousticScorer.java:104)
                            at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                    anager.scoreFastMatchTokens(WordPruningBreadthFirstLookaheadSearchManager.java:2
                    86)
                            at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                    anager.fastMatchRecognize(WordPruningBreadthFirstLookaheadSearchManager.java:206
                    )
                            at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                    anager.recognize(WordPruningBreadthFirstLookaheadSearchManager.java:187)
                            at edu.cmu.sphinx.decoder.Decoder.decode(Decoder.java:65)
                            at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:106)
                            at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:122)
                            at edu.cmu.sphinx.api.AbstractSpeechRecognizer.getResult(AbstractSpeechR
                    ecognizer.java:60)
                            at Demo.TranscriberDemo.main(TranscriberDemo.java:28)
                     
                     
                    FAILURE: Build failed with an exception.
                     
                    * What went wrong:
                    Execution failed for task ':run'.
                    > Process 'command 'C:\Program Files\Java\jdk1.8.0_144\bin\java.exe'' finished w
                    ith non-zero exit value 1
                     
                    * Try:
                    Run with --stacktrace option to get the stack trace. Run with --info or --debug
                    option to get more log output.
                     
                    * Get more help at https://help.gradle.org
                     
                    BUILD FAILED in 2m 18s
                    2 actionable tasks: 1 executed, 1 up-to-date
                     
                    c:\workspace_Oxygen\Speech_Recognise>gradle build
                     
                    BUILD SUCCESSFUL in 7s
                    5 actionable tasks: 4 executed, 1 up-to-date
                    c:\workspace_Oxygen\Speech_Recognise>gradle run
                     
                    > Task :run
                    +++++++++++++++++Work started1+++++++++++++++
                    16:16:13.292 INFO unitManager          CI Unit: *+NSN+
                    16:16:13.298 INFO unitManager          CI Unit: *+SPN+
                    16:16:13.299 INFO unitManager          CI Unit: AA
                    16:16:13.299 INFO unitManager          CI Unit: AE
                    16:16:13.299 INFO unitManager          CI Unit: AH
                    16:16:13.300 INFO unitManager          CI Unit: AO
                    16:16:13.300 INFO unitManager          CI Unit: AW
                    16:16:13.300 INFO unitManager          CI Unit: AY
                    16:16:13.302 INFO unitManager          CI Unit: B
                    16:16:13.302 INFO unitManager          CI Unit: CH
                    16:16:13.303 INFO unitManager          CI Unit: D
                    16:16:13.304 INFO unitManager          CI Unit: DH
                    16:16:13.304 INFO unitManager          CI Unit: EH
                    16:16:13.304 INFO unitManager          CI Unit: ER
                    16:16:13.304 INFO unitManager          CI Unit: EY
                    16:16:13.304 INFO unitManager          CI Unit: F
                    16:16:13.305 INFO unitManager          CI Unit: G
                    16:16:13.305 INFO unitManager          CI Unit: HH
                    16:16:13.305 INFO unitManager          CI Unit: IH
                    16:16:13.305 INFO unitManager          CI Unit: IY
                    16:16:13.306 INFO unitManager          CI Unit: JH
                    16:16:13.306 INFO unitManager          CI Unit: K
                    16:16:13.306 INFO unitManager          CI Unit: L
                    16:16:13.306 INFO unitManager          CI Unit: M
                    16:16:13.306 INFO unitManager          CI Unit: N
                    16:16:13.307 INFO unitManager          CI Unit: NG
                    16:16:13.307 INFO unitManager          CI Unit: OW
                    16:16:13.307 INFO unitManager          CI Unit: OY
                    16:16:13.307 INFO unitManager          CI Unit: P
                    16:16:13.307 INFO unitManager          CI Unit: R
                    16:16:13.307 INFO unitManager          CI Unit: S
                    16:16:13.308 INFO unitManager          CI Unit: SH
                    16:16:13.308 INFO unitManager          CI Unit: T
                    16:16:13.308 INFO unitManager          CI Unit: TH
                    16:16:13.308 INFO unitManager          CI Unit: UH
                    16:16:13.308 INFO unitManager          CI Unit: UW
                    16:16:13.309 INFO unitManager          CI Unit: V
                    16:16:13.310 INFO unitManager          CI Unit: W
                    16:16:13.310 INFO unitManager          CI Unit: Y
                    16:16:13.310 INFO unitManager          CI Unit: Z
                    16:16:13.310 INFO unitManager          CI Unit: ZH
                    16:16:16.654 INFO autoCepstrum         Cepstrum component auto-configured as fol
                    lows: autoCepstrum {MelFrequencyFilterBank, Denoise, DiscreteCosineTransform2, L
                    ifter}
                    +++++++++++++++++Work started2+++++++++++++++
                    16:16:16.661 INFO dictionary           Loading dictionary from: file:/C:/workspa
                    ce_Oxygen/Speech_Recognise/en-us/cmudict-en-us.dict
                    16:16:17.331 INFO dictionary           Loading filler dictionary from: file:/C:/
                    workspace_Oxygen/Speech_Recognise/en-us/en-us/noisedict
                    16:16:17.332 INFO acousticModelLoader  Loading tied-state acoustic model from: f
                    ile:/C:/workspace_Oxygen/Speech_Recognise/en-us/en-us
                    16:16:17.333 INFO acousticModelLoader  Pool means Entries: 16128
                    16:16:17.333 INFO acousticModelLoader  Pool variances Entries: 16128
                    16:16:17.333 INFO acousticModelLoader  Pool transition_matrices Entries: 42
                    16:16:17.333 INFO acousticModelLoader  Pool senones Entries: 5126
                    16:16:17.334 INFO acousticModelLoader  Gaussian weights: mixture_weights. Entrie
                    s: 15378
                    16:16:17.334 INFO acousticModelLoader  Pool senones Entries: 5126
                    16:16:17.334 INFO acousticModelLoader  Context Independent Unit Entries: 42
                    16:16:17.335 INFO acousticModelLoader  HMM Manager: 137095 hmms
                    16:16:17.335 INFO acousticModel        CompositeSenoneSequences: 0
                    16:16:17.336 INFO trieNgramModel       Loading n-gram language model from: file:
                    /C:/workspace_Oxygen/Speech_Recognise/en-us/en-us.lm.bin
                    16:16:31.195 INFO lexTreeLinguist      Max CI Units 43
                    16:16:31.196 INFO lexTreeLinguist      Unit table size 79507
                    16:16:31.200 INFO speedTracker         # ----------------------------- Timers---
                    -------------------------------------
                    16:16:31.200 INFO speedTracker         # Name               Count   CurTime   Mi
                    nTime   MaxTime   AvgTime   TotTime
                    16:16:31.201 INFO speedTracker         Load AM              1       6,6330s   6,
                    6330s   6,6330s   6,6330s   6,6330s
                    16:16:31.202 INFO speedTracker         Load Dictionary      1       0,6710s   0,
                    6710s   0,6710s   0,6710s   0,6710s
                    16:16:31.202 INFO speedTracker         Load LM              1       10,9540s  10
                    ,9540s  10,9540s  10,9540s  10,9540s
                    16:16:31.202 INFO speedTracker         Compile              1       2,9070s   2,
                    9070s   2,9070s   2,9070s   2,9070s
                    +++++++++++++++++Work started3+++++++++++++++
                    +++++++++++++++++Work resulted complete1+++++++++++++++
                    16:17:13.902 INFO liveCMN              55.31 -5.06 3.38 25.67 -3.44 -0.47 1.64 -
                    0.91 1.12 -3.75 2.71 -0.15 1.30
                    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
                            at edu.cmu.sphinx.frontend.util.DataUtil.littleEndianBytesToValues(DataU
                    til.java:176)
                            at edu.cmu.sphinx.frontend.util.StreamDataSource.readNextFrame(StreamDat
                    aSource.java:247)
                            at edu.cmu.sphinx.frontend.util.StreamDataSource.getData(StreamDataSourc
                    e.java:178)
                            at edu.cmu.sphinx.frontend.DataBlocker.getData(DataBlocker.java:56)
                            at edu.cmu.sphinx.frontend.endpoint.SpeechClassifier.getData(SpeechClass
                    ifier.java:220)
                            at edu.cmu.sphinx.frontend.endpoint.SpeechMarker.getData(SpeechMarker.ja
                    va:136)
                            at edu.cmu.sphinx.frontend.filter.Preemphasizer.getData(Preemphasizer.ja
                    va:82)
                            at edu.cmu.sphinx.frontend.window.RaisedCosineWindower.getData(RaisedCos
                    ineWindower.java:154)
                            at edu.cmu.sphinx.frontend.transform.DiscreteFourierTransform.getData(Di
                    screteFourierTransform.java:269)
                            at edu.cmu.sphinx.frontend.frequencywarp.MelFrequencyFilterBank.getData(
                    MelFrequencyFilterBank.java:291)
                            at edu.cmu.sphinx.frontend.denoise.Denoise.getData(Denoise.java:111)
                            at edu.cmu.sphinx.frontend.transform.DiscreteCosineTransform.getData(Dis
                    creteCosineTransform.java:77)
                            at edu.cmu.sphinx.frontend.transform.Lifter.getData(Lifter.java:66)
                            at edu.cmu.sphinx.frontend.AutoCepstrum.getData(AutoCepstrum.java:243)
                            at edu.cmu.sphinx.frontend.feature.LiveCMN.getData(LiveCMN.java:177)
                            at edu.cmu.sphinx.frontend.feature.AbstractFeatureExtractor.getNextData(
                    AbstractFeatureExtractor.java:122)
                            at edu.cmu.sphinx.frontend.feature.AbstractFeatureExtractor.getData(Abst
                    ractFeatureExtractor.java:93)
                            at edu.cmu.sphinx.frontend.feature.FeatureTransform.getData(FeatureTrans
                    form.java:85)
                            at edu.cmu.sphinx.frontend.FrontEnd.getData(FrontEnd.java:222)
                            at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.getNextData(Simple
                    AcousticScorer.java:146)
                            at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.calculateScoresAnd
                    StoreData(SimpleAcousticScorer.java:104)
                            at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                    anager.scoreFastMatchTokens(WordPruningBreadthFirstLookaheadSearchManager.java:2
                    86)
                            at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                    anager.fastMatchRecognize(WordPruningBreadthFirstLookaheadSearchManager.java:206
                    )
                            at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchM
                    anager.recognize(WordPruningBreadthFirstLookaheadSearchManager.java:187)
                            at edu.cmu.sphinx.decoder.Decoder.decode(Decoder.java:65)
                            at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:106)
                            at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:122)
                            at edu.cmu.sphinx.api.AbstractSpeechRecognizer.getResult(AbstractSpeechR
                    ecognizer.java:60)
                            at Demo.TranscriberDemo.main(TranscriberDemo.java:28)
                     
                     
                    FAILURE: Build failed with an exception.
                     
                    * What went wrong:
                    Execution failed for task ':run'.
                    > Process 'command 'C:\Program Files\Java\jdk1.8.0_144\bin\java.exe'' finished w
                    ith non-zero exit value 1
                     
                    * Try:
                    Run with --stacktrace option to get the stack trace. Run with --info or --debug
                    option to get more log output.
                     
                    * Get more help at https://help.gradle.org
                     
                    BUILD FAILED in 2m 5s
                    2 actionable tasks: 1 executed, 1 up-to-date
                     
                    c:\workspace_Oxygen\Speech_Recognise>

                  То есть последнее выведённое сообщение
                  +++++++++++++++++Work resulted complete1+++++++++++++++
                  Такие дела, нижайше кланяюсь и прошу помощи.
                  Сообщение отредактировано: Stanislav -
                    Цитата Stanislav @
                    Например java -Xmx2048m


                    Где например, что например? Ничего не поменялось, как я вижу.

                    Цитата
                    Такие дела, нижайше кланяюсь и прошу помощи.


                    С мышлением раба далеко не уйдешь. Вместо всего этого лучше документацию почитать вдумчиво.
                      Всех приветствую! Использую pocketsphinx для приложения "умный дом" на Android, необходимо реализовать голосовое управление. Для команд написал JSGF файлик следующего содержания (условно):
                      ExpandedWrap disabled
                        #JSGF V1.0;
                         
                        grammar words;
                         
                        public <words> = включи |
                        выключи |
                        свет;

                      Для тестов проигрываю записи "включи свет" и "выключи свет". Однако, сфинкс не определяет всю фразу целиком, а выдает только "включи" или "выключи". Если добавить в JSGF полные фразы, начинает работать. Правильно ли я понимаю, что так и должно работать? Что сфинкс не может комбинировать слова в фразы из JSGF? Возможно, есть какое-то решение данного вопроса? Дело в том, что в будущем могут добавиться такие команды как "включи кондиционер" и так далее, неужели придется описывать все возможные комбинации?
                        Цитата
                        #JSGF V1.0;

                        grammar words;

                        public <words> = ( включи | выключи | свет )+;



                        А если так?
                          zamir спасибо, помогло! Есть какие-нибудь материалы по синтаксису JSGF?
                            Нет проблем :)
                            Информации в интернет было достаточно, когда я искал.
                            Вот вторая ссылка в яндекс например: https://www.w3.org/TR/jsgf/
                              Цитата nsh @
                              Цитата Stanislav @


                              Памяти можно добавить с помощью ключа jvm -Xmx, например -Xmx2048m

                              Чтоб тебе так помогали...

                              Operation
                              Format: -Xmx<size>[g|G|m|M|k|K]
                              Combine -Xmx with a memory value
                              For Example:
                              java -Xmx:1g myApp
                              sets the maximum java heap to 1 gigabyte.
                              If you do not add a unit, you will get the exact value you state; for example, 64 will be interpreted as 64 bytes, not 64 megabytes or 64 kilobytes.
                              The -Xmx option and -Xms option in combination are used to limit the Java heap size. The Java heap can never grow larger than -Xmx. Also, the -Xms value can be used as “minimum heap size” to set a fixed heap size by setting -Xms = -Xmx when, for example, you want to run benchmark tests.

                              Собственно и в прочих "умных" мануалах то опечатка, то недосказанность, а в итоге даже пример из документации от sphinx не работает :wall:
                                Так, для изменения памяти при запуске программы через gradle run годится вариант:
                                1. Создать файл gradle.properties рядом с gradle.build и
                                2. прописать там строчку "org.gradle.jvmargs=-Xms1024m -Xmx1024m"
                                более подробная инфа в мануале по gradle

                                И вопрос: какие минимальные требования к железу для нормальной работы? Вот у меня 1,5 Гб озу и файл подкачки стоит, но вылетает из-за нехватки памяти якобы, это нормальная работа программы или в коде есть ошибка?
                                0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
                                0 пользователей:
                                Страницы: (23) « Первая ... 20 21 [22] 23 


                                Рейтинг@Mail.ru
                                [ Script execution time: 0,0653 ]   [ 16 queries used ]   [ Generated: 19.03.24, 02:05 GMT ]