Author Topic: Make text to speach variants  (Read 11408 times)

Woofington

  • Jr. Member
  • **
  • Posts: 54
Make text to speach variants
« on: May 28, 2016, 07:44:04 PM »
So here is an example, I want to be able to say "Thank you computer" and have my voice attack command respond with one of many possible responses such as "You're welcome."  or "Not a problem" etc etc

I can think of a couple ways to go about this (setting a random value and doing conditionals for each value with a text-to-speech variant in each condition) but I was wondering if there was a defacto simple/gold standard way to do this?

Rhaedas

  • Jr. Member
  • **
  • Posts: 72
Re: Make text to speach variants
« Reply #1 on: May 28, 2016, 07:46:45 PM »
Put them all in the same Say command, separated by a semicolon ;

If you use sounds, you'll have to use conditional branches.

Woofington

  • Jr. Member
  • **
  • Posts: 54
Re: Make text to speach variants
« Reply #2 on: May 28, 2016, 08:25:26 PM »
No not variants to what I say, variants to what my text to speech responds with to a single command.

Rhaedas

  • Jr. Member
  • **
  • Posts: 72
Re: Make text to speach variants
« Reply #3 on: May 28, 2016, 08:49:00 PM »
Right. Here's an example from mine, when I say "thanks" or thank you". In the box for the text that is would say I have:

Code: [Select]
You're welcome;Quite welcome;yes sir;absolutely

Woofington

  • Jr. Member
  • **
  • Posts: 54
Re: Make text to speach variants
« Reply #4 on: May 28, 2016, 11:27:57 PM »
Oh I see thanks!  Testing around its too bad you can't use optional words too for a bit of east in writing more natural variations.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4757
  • RTFM
Re: Make text to speach variants
« Reply #5 on: May 29, 2016, 09:59:55 AM »
Oh I see thanks!  Testing around its too bad you can't use optional words too for a bit of east in writing more natural variations.
You can, it's in the documentation too, under "Dynamic command sections"

Code: [Select]
You're [quite;] welcome;yes sirWill execute a command when "You're welcome", "You're quite welcome", or "yes sir" are spoken.

Woofington

  • Jr. Member
  • **
  • Posts: 54
Re: Make text to speach variants
« Reply #6 on: May 29, 2016, 12:40:18 PM »
No I understand that, but I am saying I would like the text to speech module (when my computer responds to a command) to accept option parameters.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4757
  • RTFM
Re: Make text to speach variants
« Reply #7 on: May 29, 2016, 01:51:48 PM »
The text right above the TTS input box actually states "Note that you can use square brackets for dynamic responses (see documentation for more info)", which works in the exact same way the commands do.

I.E.
Code: [Select]
You're [quite;] welcome;yes sirWill randomly speak "You're welcome", "You're quite welcome", or "yes sir".


I'll admit there isn't actually a section in the documentation for "dynamic responses", but the syntax is the same as "Dynamic command sections".

Woofington

  • Jr. Member
  • **
  • Posts: 54
Re: Make text to speach variants
« Reply #8 on: May 29, 2016, 03:55:08 PM »
I am an idiot, sorry guys!

edit:  nvm
« Last Edit: May 29, 2016, 04:10:22 PM by Woofington »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4757
  • RTFM
Re: Make text to speach variants
« Reply #9 on: May 29, 2016, 04:31:12 PM »
edit:  nvm

Is that not what you're looking for then?

Woofington

  • Jr. Member
  • **
  • Posts: 54
Re: Make text to speach variants
« Reply #10 on: May 29, 2016, 04:33:43 PM »
Yeah I got it, my edit was for something else, thanks for the help guys!