Author Topic: lexicon  (Read 1878 times)

Solid333

  • Guest
lexicon
« on: November 14, 2017, 01:02:57 AM »
Is there a way i can get voice attack saying: 5.765,60 from "5 point 765 comma 60" whats she saids now to " fivethousend sevenhundret sixtyfive euro and sixty cent?

I am using a IVONA voice.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: lexicon
« Reply #1 on: November 14, 2017, 07:59:11 AM »
Shouldn't it be written like this 5,765.60, Ivona reads it fine like that.

Solid333

  • Guest
Re: lexicon
« Reply #2 on: November 14, 2017, 01:29:16 PM »
yo yeah the problem is: i let my dear "deja" read out the numbers from a webpage that constantly changes them and i need their numbers and they ve written it the other way around, i have no controll over the point and comma... any idea is someone a TTS token guru and has got a fancy idea how to solve that? help appreciated

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: lexicon
« Reply #3 on: November 14, 2017, 02:09:57 PM »
Swapping the characters could be a matter of find/replace, however this is highly dependent on the actual contents of your text variable.

If what you're getting from the webpage is the relevant number(s) only, this should work:
Code: [Select]
{TXTREPLACEVAR:"{TXTREPLACEVAR:"{TXTREPLACEVAR:textSource:",":"§"}":".":","}":"§":"."}First, commas are replaced with "§", then dots are replaced with commas, lastly "§" is replaced with dots(I'm using "§" as I believe it to be unlikely to appear in regular text).

If you tried turning commas into dots, and dots into commas or vice-versa, you'd always end up with the second replacement replacing the characters replaced by the first, so you'd end up with either all dots or all commas.


This assumes you don't have any dots or commas that shouldn't be replaced in the text you're getting from that webpage. Otherwise, you'll have to use the "{TXTSUBSTR:}" token to separate those parts.