Author Topic: VS2013 TTS + Voice Recognition Build  (Read 4132 times)

0 Members and 1 Guest are viewing this topic.

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
VS2013 TTS + Voice Recognition Build
As many of you know, the VS 2008 nightly builds have long had TTS and Voice Recognition support disabled because we have many users using the Express edition of VS2008, and it can't compile with those flags enabled.  So we left them disbaled in SVN, and I only enabled them in release builds because I've been too lazy to script enabling them as part of the nightly process.  However, the new VS 2013 Community Edition (which is free) can compile Speech and Voicerec builds just like the paid versions!  At least, my initial attempt looks promising.  I want to have some people test it to make sure I haven't goofed it up.  I'll be retiring VS2008 as the nightly build platform soon, and switching to 2013 (or newer).  If these builds work as they seem to, we should be able to enable speech and voicerec for 2013 by default in SVN and I won't have to worry about modifying the nightly script to enable them.  Plus, anyone else using 2013 to make builds will have them enabled as well.  Should be compatible with Windows XP+, please test and let me know if TTS and if you can, Voice Recognition are working.  Builds below.

fs2_open_3_7_3_vs2013_tts_voicer.7z (SSE2, r11315)
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Cyborg17

  • 29
  • Life? Don't talk to me about life....
Re: VS2013 TTS + Voice Recognition Build
How does FSO use voice recognition?

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: VS2013 TTS + Voice Recognition Build
Honestly, I don't know.  There is some sort of framework for issuing commands somehow, by voice.  That's all I know.  But I've gotten some promising reports that the speech works, and the -voicer flag brings up the Windows voice recognition helper, so that's good.

Edit:  Found the Voice Recognition wiki page.
« Last Edit: April 22, 2015, 11:51:26 am by chief1983 »
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: VS2013 TTS + Voice Recognition Build
Heh, I think that article was the only thing I ever really contributed to the wiki.  I did play with voice enabled a few times, and it worked fairly well from what I can remember.  Besides the convenience factor, the best part by far was the immersion: it almost felt like you were barking orders at your wingmen.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: VS2013 TTS + Voice Recognition Build
I should note that voice recognition did indeed work with this build, and as a result, voice recognition and text-to-speech are now enabled by default in the MSVS 2013 project files (among other changes).

Voice recognition also got a few extra features exhumed from the old unstable branch that never got ported to trunk before; on top of that, I'm fiddling with the code to allow people to define new wing names in the grammar file instead of needing to add them to a hardcoded list (and since the grammar file can be read at runtime, this should (eventually) let mods accommodate their specific naming schemes with voice recognition).
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: VS2013 TTS + Voice Recognition Build
I don't suppose there's a way to create a grammar file for the text-to-speech so we can tell the computer the proper way to pronounce certain names and complex words.
The Trivial Psychic Strikes Again!

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: VS2013 TTS + Voice Recognition Build
I don't suppose there's a way to create a grammar file for the text-to-speech so we can tell the computer the proper way to pronounce certain names and complex words.
Yes, there is.

You can just flat-out change the "words" it's looking for (I experimented by making "Gee Tee Eff Oh" activate the jump drive), or you can provide a "PRON" attribute to the phrase, which specifies the pronunciation the recognizer listens for.

I tested my changes by adding "Falcata" to the list of recognizable wings and then shouting orders during Her Finest Hour, and I didn't have to provide any pronunciation hints for it to recognize "Falcata", so... it seems to work rather well.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: VS2013 TTS + Voice Recognition Build
I think there might have been some confusion on his question, he was asking about TTS and not Voice Recognition.  Unless TTS somehow accesses that grammar file as well, that's the first I've heard though.  I thought that FRED had the ability to specify a phonetic version of a string as a TTS aid though.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: VS2013 TTS + Voice Recognition Build
I think there might have been some confusion on his question, he was asking about TTS and not Voice Recognition.
Oh, doy. I must've been really tired when I posted that.

There is a system for providing markup information through XML in the text, which may even work on both the Windows and non-Windows version of TTS. However, FSO has no way of stripping out this XML when displaying text to the user, nor does there appear to be a way of providing a pronunciation lexicon for common terms. I'll be honest, I starting working on voice recognition because I thought it was an interesting feature; I don't particularly think the same of TTS. :P
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: VS2013 TTS + Voice Recognition Build
(I experimented by making "Gee Tee Eff Oh" activate the jump drive)
Can we make that default behavior? :D

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: VS2013 TTS + Voice Recognition Build
(I experimented by making "Gee Tee Eff Oh" activate the jump drive)
Can we make that default behavior? :D
When this patch gets incorporated, you'll be able to make it do whatever you want with a custom grammar file. :P

Latest change: changed FSO from using a "shared" recognizer to an "in-process" recognizer. This means that launching FSO with -voicer will no longer open up Windows's voice recognition thing and make you turn it on for voice recognition to work, meaning that mumbling something could open the start menu or a web browser or something like that. Now you can use voice recognition in FSO and only FSO. :)
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.