Author Topic: An Idea - NATO Alphabet spelling  (Read 17686 times)

shadragon

  • Posts: 10
An Idea - NATO Alphabet spelling
« on: May 29, 2016, 12:40:04 PM »
VR makes it hard to type. I'd like to be able to create a command called "spell."

I click in a game text box. When I say "Spell," the VA program goes into a dictation mode. If I say "alpha" it puts an "a" in the text box. So if I want to type "roger" I say:

romeo oscar golf echo romeo

That's the NATO pheonetic alphabet. Like here: https://en.wikipedia.org/wiki/NATO_phonetic_alphabet

When finished I say "endspell," VA does an enter command and the text is used by the game.

Problem is, I can't find how to do that. Is this possible?

Cheers.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4787
  • RTFM
Re: An Idea - NATO Alphabet spelling
« Reply #1 on: May 29, 2016, 02:51:24 PM »
Because of the way the speech engine works, it's best to do this using commands for the alphabet to improve recognition(though it still won't be perfect for such short commands).

Attached is a profile with 3 commands:

"spell"
Enables speaking the NATO alphabet for text input; If spoken while spelling is active, it will press enter, so you don't have to end and restart spelling for each line.

"[Shift ;][Alfa;Bravo;Charlie;Delta;Echo;Foxtrot;Golf;Hotel;India;Juliett;Kilo;Lima;Mike;November;Oscar;Papa;Quebec;Romeo;Sierra;Tango;Uniform;Victor;Whiskey;Xray;Yankee;Zulu];One;Two;Three;Four;Five;Six;Seven;Eight;Nine;Zero"
Types the actual letters. I chose this as an alternative for 36 seperate commands, because you'll be able to change the keypress delay easily for all characters within the command(Bah, you can't do it for all keystrokes at once, sorry), and it's less command list clutter; You can also speak "Shift" before a letter to make it a capital letter.

"endspell"
Presses enter, then disables speaking the NATO alphabet for text input.
« Last Edit: May 30, 2016, 12:17:05 PM by Pfeil »

shadragon

  • Posts: 10
Re: An Idea - NATO Alphabet spelling
« Reply #2 on: May 30, 2016, 12:02:17 PM »
Wow, I was looking to do it myself, but I'm thrilled you went ahead and did that amount of work.

I chose the NATO alphabet because I know it so well and it causes less confusion to VA than a b c... etc.

Will try it tonight and let you know how I get on.

Cheers.

Rhaedas

  • Jr. Member
  • **
  • Posts: 72
Re: An Idea - NATO Alphabet spelling
« Reply #3 on: May 30, 2016, 03:51:55 PM »
The one thing I didn't like about taking this approach was how long it takes to spell out things. A flawless dictation would eliminate that, just record what I say and dump it. Windows dictation is terrible at that I discovered, when Gary had opened up the ability. So I gave up.

Then recently I ran across a website using Chrome that was really good, and saw an opportunity. I'm not sure how it will blend with using VR and how the focusing work though. But saw this post and figured if you missed it, maybe you can get it to work as well.

http://voiceattack.com/SMF/index.php?topic=80.msg568

shadragon

  • Posts: 10
Re: An Idea - NATO Alphabet spelling
« Reply #4 on: May 30, 2016, 04:32:21 PM »
Pfeil - I had an error on import. Attached a screenshot. Had the same error at work as well. Will look at the XML as I suspect it's broken, but FYI.

Rhaedas - I take your point, but until we can get a virtual keyboard in VR, I just need to speak star names into the Elite Dangerous galaxy map which only takes a few secs. The post you linked was for something like Dragon Naturally Speaking and that's really overkill for what I need. If I can get this script working, I'll be happy short term.

Cheers guys and gals.   
« Last Edit: May 30, 2016, 04:42:24 PM by shadragon »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4787
  • RTFM
Re: An Idea - NATO Alphabet spelling
« Reply #5 on: May 30, 2016, 04:51:29 PM »
Are you on the latest beta? I downloaded the profile I uploaded, and it imports fine with my install of v1.5.8.21

Attached another export to this post.

Rhaedas

  • Jr. Member
  • **
  • Posts: 72
Re: An Idea - NATO Alphabet spelling
« Reply #6 on: May 30, 2016, 05:00:13 PM »
Ok, for the galaxy map, then yes, spelling makes perfect sense. Can't pronounce most of it anyway.

shadragon

  • Posts: 10
Re: An Idea - NATO Alphabet spelling
« Reply #7 on: May 31, 2016, 07:12:58 AM »
Ok, for the galaxy map, then yes, spelling makes perfect sense. Can't pronounce most of it anyway.
Ahh, was on the latest release. Grabbed the beta and I could import fine.

I tried it briefly last night, you said to press SHIFT before speaking alpha, bravo, etc. but VA kept saying unrecognized with or without it being pressed. Will give it another go this evening.

Cheers.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4787
  • RTFM
Re: An Idea - NATO Alphabet spelling
« Reply #8 on: May 31, 2016, 09:20:29 AM »
you said to press SHIFT before speaking alpha, bravo, etc.
You can also speak "Shift" before a letter to make it a capital letter.
Though, pressing and holding shift manually while VoiceAttack types should have the same effect.


VA kept saying unrecognized with or without it being pressed. Will give it another go this evening.
Because of the way the speech engine works, it's best to do this using commands for the alphabet to improve recognition(though it still won't be perfect for such short commands).
Because the commands are so short, if the speech engine isn't well trained, or if there's a lot of environmental noise, recognition may be spotty at best. For me the alphabet worked pretty well, but "Eight" would not be recognized.

shadragon

  • Posts: 10
Re: An Idea - NATO Alphabet spelling
« Reply #9 on: May 31, 2016, 05:02:00 PM »
Got it working. Turned out to be TeamViewer interfering.

Here's a video link to the short demo I did.

https://youtu.be/9ZMNd-iLNYQ

Only issue is there is no space or dash. I realized that just after the video went live. Can those be added easily? I looked at the code but I can't see how to add an element.

Rhaedas

  • Jr. Member
  • **
  • Posts: 72
Re: An Idea - NATO Alphabet spelling
« Reply #10 on: May 31, 2016, 05:31:10 PM »
Simplest way is to highlight
Code: [Select]
Else If Text Compare : [{CMD}] Equals 'Zero'
Press 0 key and hold for 0.06 seconds and release
and duplicate it twice. Then change 'Zero' to 'Space' and 'Dash' or 'Hyphen' in each with the appropriate key press changed as well.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4787
  • RTFM
Re: An Idea - NATO Alphabet spelling
« Reply #11 on: May 31, 2016, 05:53:20 PM »
Rhaedas gave you the answer.

I can understand how the command structure may look intimidating if you're not familiar with it, so I added "Space" and "Dash" to the attached profile.

shadragon

  • Posts: 10
Re: An Idea - NATO Alphabet spelling
« Reply #12 on: June 01, 2016, 06:23:58 AM »
Thanks guys. I'll add thanks to Rhaedas on the video as well.