Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Voice Recognition Implementation
Forum Updated to NodeBB v4.3 + New Features

Voice Recognition Implementation

Scheduled Pinned Locked Moved Unsolved General and Desktop
87 Posts 5 Posters 58.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Naveen_DN Naveen_D

    @mrjj no...it is showing
    ubuntu@ub:~/Documents/julius-4.2.2/SampleTest$ padsp julius -C julian.jconf
    STAT: include config: julian.jconf
    ERROR: Error in loading model
    ubuntu@ub:~/Documents/julius-4.2.2/SampleTest$

    mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #66

    Ok , can mean many things.
    http://voxforge.org/home/dev/acousticmodels/linux/create/htkjulius/tutorial/run-julian/comments/error-in-loading-model-when-executing-julius
    Example
    " the model tied state triphone you use is not contain sp."

    So , you should check the modification you make and read docs on each command. etc to avoid this.

    1 Reply Last reply
    1
    • Naveen_DN Naveen_D

      @mrjj no...it is showing
      ubuntu@ub:~/Documents/julius-4.2.2/SampleTest$ padsp julius -C julian.jconf
      STAT: include config: julian.jconf
      ERROR: Error in loading model
      ubuntu@ub:~/Documents/julius-4.2.2/SampleTest$

      Naveen_DN Offline
      Naveen_DN Offline
      Naveen_D
      wrote on last edited by
      #67

      @mrjj Now i want to use this julius in qt..how to use this..what i need to do?
      can you please guide me in this matter..thanks

      Naveen_D

      mrjjM 1 Reply Last reply
      1
      • Naveen_DN Naveen_D

        @mrjj Now i want to use this julius in qt..how to use this..what i need to do?
        can you please guide me in this matter..thanks

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #68

        @Naveen_D

        Hi Always good starting reading docs.
        https://julius.osdn.jp/juliusbook/en/desc_install.html

        % make install
        "which also installes headers and libraries as well as the binaries."

        It means that it should generate a .so ? or .a file file and some .h files
        ( u must understand types of libs possible)
        http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html

        you need to find out the exact names of those.

        Then you need to add to a Qt project
        http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

        Make sure u fill it out correctly. Name wise.

        Then you need find c++ example to see what functions to call etc.
        and it should be it.

        This might be ok sample
        https://github.com/julius-speech/julius/blob/master/julius-simple/julius-simple.c

        Naveen_DN 1 Reply Last reply
        2
        • mrjjM mrjj

          @Naveen_D

          Hi Always good starting reading docs.
          https://julius.osdn.jp/juliusbook/en/desc_install.html

          % make install
          "which also installes headers and libraries as well as the binaries."

          It means that it should generate a .so ? or .a file file and some .h files
          ( u must understand types of libs possible)
          http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html

          you need to find out the exact names of those.

          Then you need to add to a Qt project
          http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

          Make sure u fill it out correctly. Name wise.

          Then you need find c++ example to see what functions to call etc.
          and it should be it.

          This might be ok sample
          https://github.com/julius-speech/julius/blob/master/julius-simple/julius-simple.c

          Naveen_DN Offline
          Naveen_DN Offline
          Naveen_D
          wrote on last edited by
          #69

          @mrjj u said,
          make install
          "which also installes headers and libraries as well as the binaries."=
          It means that it should generate a .so ? or .a file file and some .h files

          Now I have configured and i run make and make install commands
          After running sudo make install command, where i can get these .so or .a file in system (means which path) ?

          Naveen_D

          1 Reply Last reply
          0
          • Naveen_DN Offline
            Naveen_DN Offline
            Naveen_D
            wrote on last edited by
            #70

            Hi i got the .a and .h files and binaries also...after this when i am trying with the example i need to add the library file and do i need to add all the .h files to my example project ?

            Naveen_D

            mrjjM 1 Reply Last reply
            0
            • Naveen_DN Naveen_D

              Hi i got the .a and .h files and binaries also...after this when i am trying with the example i need to add the library file and do i need to add all the .h files to my example project ?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #71

              @Naveen_D
              Hi
              Normally you add a new path where to look for .h
              files but you can also just include them.

              like in the pro file
              INCLUDEPATH += ../testLib
              LIBS += -L../testLib/debug -ltestLib

              https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application

              (NOTE , you names is NOT testLIB)

              With the .A files
              http://stackoverflow.com/questions/1361229/using-a-static-library-in-qt-creator

              Naveen_DN 1 Reply Last reply
              0
              • mrjjM mrjj

                @Naveen_D
                Hi
                Normally you add a new path where to look for .h
                files but you can also just include them.

                like in the pro file
                INCLUDEPATH += ../testLib
                LIBS += -L../testLib/debug -ltestLib

                https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application

                (NOTE , you names is NOT testLIB)

                With the .A files
                http://stackoverflow.com/questions/1361229/using-a-static-library-in-qt-creator

                Naveen_DN Offline
                Naveen_DN Offline
                Naveen_D
                wrote on last edited by
                #72

                @mrjj Hi i am bit confused after adding the library my .pro file is

                #-------------------------------------------------
                #
                # Project created by QtCreator 2016-10-26T15:15:30
                #
                #-------------------------------------------------
                
                QT       += core gui
                
                greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                
                TARGET = ExampleJulius
                TEMPLATE = app
                
                
                SOURCES += main.cpp\
                        mywidget.cpp
                
                HEADERS  += mywidget.h
                
                unix:!macx: LIBS += -L$$PWD/./ -ljulius
                
                INCLUDEPATH += $$PWD/.
                DEPENDPATH += $$PWD/.
                
                unix:!macx: PRE_TARGETDEPS += $$PWD/./libjulius.a
                

                is it correct ?

                Naveen_D

                jsulmJ 1 Reply Last reply
                0
                • Naveen_DN Naveen_D

                  @mrjj Hi i am bit confused after adding the library my .pro file is

                  #-------------------------------------------------
                  #
                  # Project created by QtCreator 2016-10-26T15:15:30
                  #
                  #-------------------------------------------------
                  
                  QT       += core gui
                  
                  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                  
                  TARGET = ExampleJulius
                  TEMPLATE = app
                  
                  
                  SOURCES += main.cpp\
                          mywidget.cpp
                  
                  HEADERS  += mywidget.h
                  
                  unix:!macx: LIBS += -L$$PWD/./ -ljulius
                  
                  INCLUDEPATH += $$PWD/.
                  DEPENDPATH += $$PWD/.
                  
                  unix:!macx: PRE_TARGETDEPS += $$PWD/./libjulius.a
                  

                  is it correct ?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #73

                  @Naveen_D

                  unix:!macx: LIBS += -L$$PWD/./ -ljulius
                  unix:!macx: PRE_TARGETDEPS += $$PWD/./libjulius.a
                  

                  You should not link against shared lib and static lib (.a) at the same time. Either use shared lib or static lib.
                  Does $$PWD/. contain the lib itself and the header files?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  Naveen_DN 1 Reply Last reply
                  1
                  • jsulmJ jsulm

                    @Naveen_D

                    unix:!macx: LIBS += -L$$PWD/./ -ljulius
                    unix:!macx: PRE_TARGETDEPS += $$PWD/./libjulius.a
                    

                    You should not link against shared lib and static lib (.a) at the same time. Either use shared lib or static lib.
                    Does $$PWD/. contain the lib itself and the header files?

                    Naveen_DN Offline
                    Naveen_DN Offline
                    Naveen_D
                    wrote on last edited by
                    #74

                    @jsulm I have copied the lib file and .h files to my example project and then in qt creator added the lib externally...

                    Naveen_D

                    jsulmJ 1 Reply Last reply
                    0
                    • Naveen_DN Naveen_D

                      @jsulm I have copied the lib file and .h files to my example project and then in qt creator added the lib externally...

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #75

                      @Naveen_D So, did you try to execute qmake and to do a complete rebuild to check whether it works?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      Naveen_DN 2 Replies Last reply
                      1
                      • jsulmJ jsulm

                        @Naveen_D So, did you try to execute qmake and to do a complete rebuild to check whether it works?

                        Naveen_DN Offline
                        Naveen_DN Offline
                        Naveen_D
                        wrote on last edited by
                        #76

                        @jsulm Also i added the .h files to my project...
                        Ya i cleaned, run qmake and builded, it worked fine and executed

                        Naveen_D

                        1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @Naveen_D So, did you try to execute qmake and to do a complete rebuild to check whether it works?

                          Naveen_DN Offline
                          Naveen_DN Offline
                          Naveen_D
                          wrote on last edited by Naveen_D
                          #77

                          @jsulm But whenever i opened the .h files in qt creator at top it is showing...
                          Error: Couldnot decode "callback.h" with "utf-8"-encoding. Editing not possible

                          Naveen_D

                          mrjjM 1 Reply Last reply
                          0
                          • Naveen_DN Naveen_D

                            @jsulm But whenever i opened the .h files in qt creator at top it is showing...
                            Error: Couldnot decode "callback.h" with "utf-8"-encoding. Editing not possible

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #78

                            @Naveen_D

                            hi , you need to fix the file.

                            http://doc.qt.io/qtcreator/creator-editor-options-text.html

                            "To resolve the issue, use a file conversion tool such as Recode to convert the file encoding to UTF-8 when developing Qt 5 applications. Otherwise, conversion of string constants to QStrings might not work as expected."

                            http://superuser.com/questions/116907/how-to-recode-to-utf-8-conditionally

                            The "recode-to-utf8.sh " post.

                            Naveen_DN 1 Reply Last reply
                            1
                            • mrjjM mrjj

                              @Naveen_D

                              hi , you need to fix the file.

                              http://doc.qt.io/qtcreator/creator-editor-options-text.html

                              "To resolve the issue, use a file conversion tool such as Recode to convert the file encoding to UTF-8 when developing Qt 5 applications. Otherwise, conversion of string constants to QStrings might not work as expected."

                              http://superuser.com/questions/116907/how-to-recode-to-utf-8-conditionally

                              The "recode-to-utf8.sh " post.

                              Naveen_DN Offline
                              Naveen_DN Offline
                              Naveen_D
                              wrote on last edited by
                              #79

                              @mrjj Thanks...
                              Now i want know how to use the api's of julius..
                              I have developed a simple UI in qml in which i have developed simple icon with image and want to add voice recognition using julius...
                              Is it the rite way what i am doing now or there is any better way to achieve this?
                              how to do this..? guidance required..Thanks

                              Naveen_D

                              mrjjM 1 Reply Last reply
                              0
                              • Naveen_DN Naveen_D

                                @mrjj Thanks...
                                Now i want know how to use the api's of julius..
                                I have developed a simple UI in qml in which i have developed simple icon with image and want to add voice recognition using julius...
                                Is it the rite way what i am doing now or there is any better way to achieve this?
                                how to do this..? guidance required..Thanks

                                mrjjM Offline
                                mrjjM Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on last edited by mrjj
                                #80

                                @Naveen_D
                                Hi

                                • I have developed a simple UI in qml in which i have developed simple icon with image and want to add voice recognition
                                • Is it the rite way what i am doing now or there is any better way to achieve this?

                                Hi, using QML for Interface is fine idea but why not wait a bit before having to learn how to call c++ functions from
                                QML and for now focus on getting the recognition up and running using plain c++ GUI app for testing.
                                Anyway, should not be super involving.
                                http://doc.qt.io/qt-5/qtqml-cppintegration-topic.html
                                http://stackoverflow.com/questions/9500280/access-c-function-from-qml

                                Then after you can call a c++ functions, its time to read the docs and study the sample.

                                Naveen_DN 2 Replies Last reply
                                2
                                • mrjjM mrjj

                                  @Naveen_D
                                  Hi

                                  • I have developed a simple UI in qml in which i have developed simple icon with image and want to add voice recognition
                                  • Is it the rite way what i am doing now or there is any better way to achieve this?

                                  Hi, using QML for Interface is fine idea but why not wait a bit before having to learn how to call c++ functions from
                                  QML and for now focus on getting the recognition up and running using plain c++ GUI app for testing.
                                  Anyway, should not be super involving.
                                  http://doc.qt.io/qt-5/qtqml-cppintegration-topic.html
                                  http://stackoverflow.com/questions/9500280/access-c-function-from-qml

                                  Then after you can call a c++ functions, its time to read the docs and study the sample.

                                  Naveen_DN Offline
                                  Naveen_DN Offline
                                  Naveen_D
                                  wrote on last edited by
                                  #81

                                  @mrjj Ya first i will try with the plain c++ GUI for voice recognition..then i will go for c++ and QML integration. Now how to proceed further with this voice recognition ?

                                  Naveen_D

                                  mrjjM 1 Reply Last reply
                                  1
                                  • mrjjM mrjj

                                    @Naveen_D
                                    Hi

                                    • I have developed a simple UI in qml in which i have developed simple icon with image and want to add voice recognition
                                    • Is it the rite way what i am doing now or there is any better way to achieve this?

                                    Hi, using QML for Interface is fine idea but why not wait a bit before having to learn how to call c++ functions from
                                    QML and for now focus on getting the recognition up and running using plain c++ GUI app for testing.
                                    Anyway, should not be super involving.
                                    http://doc.qt.io/qt-5/qtqml-cppintegration-topic.html
                                    http://stackoverflow.com/questions/9500280/access-c-function-from-qml

                                    Then after you can call a c++ functions, its time to read the docs and study the sample.

                                    Naveen_DN Offline
                                    Naveen_DN Offline
                                    Naveen_D
                                    wrote on last edited by
                                    #82

                                    @mrjj Thanks alot for your advice

                                    Naveen_D

                                    1 Reply Last reply
                                    1
                                    • Naveen_DN Naveen_D

                                      @mrjj Ya first i will try with the plain c++ GUI for voice recognition..then i will go for c++ and QML integration. Now how to proceed further with this voice recognition ?

                                      mrjjM Offline
                                      mrjjM Offline
                                      mrjj
                                      Lifetime Qt Champion
                                      wrote on last edited by mrjj
                                      #83

                                      @Naveen_D

                                      • Now how to proceed further with this voice recognition ?

                                      Well I would starting with
                                      https://github.com/julius-speech/julius/blob/master/julius-simple/julius-simple.c
                                      Maybe make it your own class to wrap it up a bit or simply use as is.
                                      Its pretty important you understand how this small sample works as
                                      you need to be able to expand it for your application.
                                      The main function accepts parameters and you must let the
                                      app set it up and/or also allow user to change them.
                                      So you most likely will split the main or change into something that fits your app.

                                      • UPDATE

                                      What i ment - was that you need the same API calls as the samples uses

                                      jconf = j_config_load_file_new(jconf_filename);
                                      /* create recognition instance according to the jconf /
                                      /
                                      it loads models, setup final parameters, build lexicon
                                      and set up work area for recognition */
                                      recog = j_create_instance_from_jconf(jconf);
                                      if (recog == NULL) { // ERRROR
                                      }

                                      /* register result callback functions */
                                      callback_add(recog, CALLBACK_EVENT_SPEECH_READY, status_recready, NULL);
                                      callback_add(recog, CALLBACK_EVENT_SPEECH_START, status_recstart, NULL);
                                      callback_add(recog, CALLBACK_RESULT, output_result, NULL);

                                      and more

                                      Naveen_DN 1 Reply Last reply
                                      1
                                      • mrjjM mrjj

                                        @Naveen_D

                                        • Now how to proceed further with this voice recognition ?

                                        Well I would starting with
                                        https://github.com/julius-speech/julius/blob/master/julius-simple/julius-simple.c
                                        Maybe make it your own class to wrap it up a bit or simply use as is.
                                        Its pretty important you understand how this small sample works as
                                        you need to be able to expand it for your application.
                                        The main function accepts parameters and you must let the
                                        app set it up and/or also allow user to change them.
                                        So you most likely will split the main or change into something that fits your app.

                                        • UPDATE

                                        What i ment - was that you need the same API calls as the samples uses

                                        jconf = j_config_load_file_new(jconf_filename);
                                        /* create recognition instance according to the jconf /
                                        /
                                        it loads models, setup final parameters, build lexicon
                                        and set up work area for recognition */
                                        recog = j_create_instance_from_jconf(jconf);
                                        if (recog == NULL) { // ERRROR
                                        }

                                        /* register result callback functions */
                                        callback_add(recog, CALLBACK_EVENT_SPEECH_READY, status_recready, NULL);
                                        callback_add(recog, CALLBACK_EVENT_SPEECH_START, status_recstart, NULL);
                                        callback_add(recog, CALLBACK_RESULT, output_result, NULL);

                                        and more

                                        Naveen_DN Offline
                                        Naveen_DN Offline
                                        Naveen_D
                                        wrote on last edited by
                                        #84

                                        @mrjj Sorry i didn't get...I thought i have to make use of the api's that julius provide and i have to develop my own code..and wherever i want to make use of voice recognition i need to call the api provided by them.

                                        Naveen_D

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • Naveen_DN Naveen_D

                                          @mrjj Sorry i didn't get...I thought i have to make use of the api's that julius provide and i have to develop my own code..and wherever i want to make use of voice recognition i need to call the api provided by them.

                                          jsulmJ Offline
                                          jsulmJ Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #85

                                          @Naveen_D Yes, you need to use the Julius API. But why are you asking how to use it in a Qt forum? Julius is not part of Qt. You should check Julius documentation and examples.
                                          Or do you have any Qt specific questions?

                                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          Naveen_DN 1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved