Author Topic: lexicon  (Read 54 times)

Solid333

  • Newbie
  • *
  • Posts: 4
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

  • Full Member
  • ***
  • Posts: 151
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

  • Newbie
  • *
  • Posts: 4
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: 1065
  • 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.