Author Topic: Text to Speech  (Read 4879 times)

Jibsman

  • Guest
Text to Speech
« on: October 14, 2018, 01:08:15 PM »
Elite Dangerous: I have just started using VR, and would like to spell system names for the Galaxy Map in VR. You can't say the system names because no one can say Mbolgargl. I searched and found a message with a Dictation script, which I can copy / paste if it is the correct thing to do:

Code: [Select]
Start Loop While : [{STATE_KEYSTATE:ENTER}] Equals '0'
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{EXP:{DICTATION} + {STATE_KEYSTATE:ENTER}}] Equals '0'
End Loop
Stop Dictation Mode
Quick Input, '{DICTATION}'
End Loop

Someone in EDCD (Discord) said I would need several scripts: "You'll need a new command, the command is under "other", "start dictation mode", you'll also need one for "stop dictation mode" and maybe one for "clear dictation buffer""

I don't see a "other" section in my profile which is HCS Voicepack.

Do I create a new Profile and add these there? Can someone give me steps to get this working? I would really appreciate any help I can get!

Thanks!
Jibs

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Text to Speech
« Reply #1 on: October 14, 2018, 05:00:31 PM »
Someone in EDCD (Discord) said I would need several scripts: "You'll need a new command, the command is under "other", "start dictation mode", you'll also need one for "stop dictation mode" and maybe one for "clear dictation buffer""
The terminology used makes this more confusing, as this is referring both commands and actions; Commands are what you execute when speaking a phrase, or pressing a key for example. Actions are the instructions within that command which actually tell VoiceAttack what you want it to do.

You can create a new command using the "New Command" button at the top right of the "Edit a Profile" window, then add the "Start Dictation Mode" action to it by clicking "Other >", "Dictation", "Start Dictation Mode".


However, you may indeed be best off creating a new profile first and later including it into your current one, as otherwise your command may be lost when you update the HCS Voice Pack.

More information on including profiles can be found on VoiceAttackHelp.pdf page 8(press F1 while VoiceAttack has focus to open the PDF automatically).


Though you could use dictation, you may want to consider the new "Wait For Spoken Response" action instead; The major difference between that and dictation is recognition accuracy, as in case of the former, the speech engine will have a list of possibilities to match what you're saying to, while in case of the latter it'll have to guess freely.

You have the option of spelling each letter individually, where you'll have to pause a little longer between each character, or the option of making a list of systems which you can then each spell in one go.

The former is loose variation of the example you mentioned:
Code: [Select]
Set Text [~output] to ''
Start Loop While : [1] Equals [1]
    Wait for spoken response: 'cancel;enter;[a;b;c;d;e;f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y;z];[alpha;bravo;charlie;delta;echo;foxtrot;golf;hotel;india;juliet;kilo;lima;mike;november;oscar;papa;quebec...'
    Begin Text Compare : [~response] Equals 'cancel'
        Say, 'Input cancelled.'
        Exit Command
    Else If Text Compare : [~response] Equals 'enter'
        Quick Input, '{TXT:~output}'
        Loop Break
    Else
        Set Text [~output] to '{TXT:~output}{TXTSUBSTR:~response:0:1}'
        Write [Blue] '{TXT:~output}' to log
        Play sound, 'C:\Windows\media\ding.wav'
    End Condition
End Loop
Instead of pressing the enter key, because of the nature of the "Wait For Spoken Response" action, you'll have to speak "Enter" instead.


The latter would look something like this:
Code: [Select]
Wait for spoken response: 'M b o l g a r g l'
Begin Text Compare : [~response] Has Not Been Set
    Say, 'Timed out waiting for input.'
    Exit Command
Else
    Write [Blue] '{TXT:~response}' to log
    Quick Input, '{TXTREPLACEVAR:~response:" ":""}'
End Condition


Note that "Wait For Spoken Response" is essentially using the same system as normal command recognition, so there is a third option where you could create a regular command with spelled out system names.

E.G.
input M b o l g a r g l
Code: [Select]
    Quick Input, '{TXTREPLACEVAR:"{CMD}":" ":""}'

This has two main advantages: You can speak a single phrase instead of two ("input m b o l g a r g l" instead of "command name" *pause* "m b o l g a r g l"), and you can have more than 250 system names(the "Wait For Spoken Response" action is limited to 250 phrases for performance reasons).