0

First i'll explain what's happening. I'm using Sphinx 4 for my voice recognition and I have zero experience with it or any other voice recognition so I'm not very good at it. Basically i'm attempting to make my own JARVIS type thing just not nearly as sophisticated as that. All i'm looking to do at the beginning is to simply navigate my computer with pre-made commands such as 'start photoshop'. I know how to open photoshop like that but I can't get sphinx to recognize my voice. When I say 'start photoshop' the console just prints 'hello' + one of the sample names. I don't know why. As I said i'm very new to voice recognition and therefore I have just taken some code off of the internet to study and learn from it. Here is the code: http://pastebin.com/nbF6BSDB

Grammar file: http://pastebin.com/Mpric8gG

BTW go girl is used for Google. Any help?

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
Luka Moran
  • 15
  • 1
  • 1
  • 1
    *"Any help?"* Any *(specific)* question? If you are a new programmer, I would strongly recommend avoiding 3rd party APIs. – Andrew Thompson Jun 12 '13 at 08:20
  • I definitely would not say that i'm an experienced programmer but i'm not new. Also, i'm basically self taught. (Watched youtube videos and whatnot) So i've never done any programming courses. – Luka Moran Jun 12 '13 at 08:25

1 Answers1

0

When I say 'start photoshop' the console just prints 'hello' + one of the sample names.

You didn't replace the grammar file inside the jar properly. Probably you put the grammar in other location and it was overwritten during build. To replace the grammar you need to:

  1. Replace the grammar in src folder
  2. Run ant to rebuild jar
  3. Run the jar

Alternatively you can specify another grammar location in xml config file with file: URI to load grammar from a file, not from a resource inside the jar.

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
  • What do you mean 'during build'? I've only been running it in Eclipse. – Luka Moran Jun 13 '13 at 07:45
  • Eclipse runs automatic build process where it copy files from src folder to bld folder. If you put the grammar in bld folder it will be overwritten by grammar from src folder. – Nikolay Shmyrev Jun 13 '13 at 10:18