Author Topic: How I insert voice to text into a text box  (Read 2622 times)

machtu

  • Newbie
  • *
  • Posts: 2
How I insert voice to text into a text box
« on: April 05, 2021, 06:40:08 PM »
I am using IL2 sturmovick and want to use voiceattack to chat while flying.  I have the commands down to open the text box but don't know how to insert voice text into the box.  I've tried using the dictate tool but to no avail.

I am sure it is simple but I don't get it.  Can anyone give me a quick tip on this issue?

Thanks

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How I insert voice to text into a text box
« Reply #1 on: April 05, 2021, 06:46:19 PM »
You need to use the "{DICTATION}" token to retrieve the contents of the dictation buffer (after starting the dictation mode and speaking something that was put into the buffer), combined with an action that can type out or paste the text for you.

E.G.
Code: [Select]
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Quick Input, '{DICTATION}'
would start the dictation mode, wait until you speak something that is put into the buffer, stop the dictation mode, and type out what the speech recognition engine recognized


A more advanced example of a dictation command can be found here.

machtu

  • Newbie
  • *
  • Posts: 2
Re: How I insert voice to text into a text box
« Reply #2 on: April 05, 2021, 09:29:06 PM »
I am a code writing illiterate so even though I'm sure it is second nature to you, it is Greek to me.

First of all, do these command sequences go in right after the command to open the text box or is it a separate command.

Secondly, do I have have to type these commands in notepad?  I tried to copy and paste but that did not work.

Sorry about being so ignorant on code command writing.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How I insert voice to text into a text box
« Reply #3 on: April 05, 2021, 09:52:12 PM »
How you would structure your commands depends on how you want them to function.

If you want to speak a separate command to open the chat/textbox first, you'd make a different command for the dictation containing the actions shown in the example. This would also allow you to review what was typed before submitting it.
Otherwise you could make it a single command containing all the actions.


The code blocks are examples of what the action list of your command could look like after you have added the required actions.

You need to use the "Other >" context menu to add those actions.