Author Topic: TTS voices  (Read 31994 times)

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10001
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
TTS voices
« on: July 07, 2013, 14:44:19 »
Warning: you do not need to do anything like this, to make TTS works in Locus. These files are already included in Locus!.

I'll use this topic, as one of many, to discuss new system of TTS for Locus

Main problem of TTS is correct spelling of numbers. To make it work on 100%, I created a system where all texts are stored in text files in usable format prepared for reading.
In English it's not so bad, there are only a one/first, but in czech are four possibilities jeden/jednu/první/prvním ;). So in this file may be arrays names numbers_NX where X is 1 - 5. You may then use these numbers in action texts.

Also format of this file is JSON. It's little bit complicated to write, but much easier to read and work with it

How to help/translate

- TTS files are stored on shared Google Drive
- All changes I do, are stored in README file, so read it once a time to check if there is something new
- recommended way to modify is - in you Google Docs (http://docs.google.com), tap on "Tools" > "Manage apps" > "Connect more apps" > "Anyfile Notepad"! It allows directly edit these TTS files on web and mainly, has very good JSON syntax highlight and error reports (incorrect syntax)

If you want to translate TTS to language that is not on Google Drive, write me and I'll gladly add it.
« Last Edit: November 08, 2015, 10:22:36 by menion »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline gynta

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 3518
  • Thanked: 25 times
    • View Profile
    • Locus live tracking service
  • Device: SGS5m (4.4.2 root), SGTab10.1 (4.0.4)
Re: TTS voices
« Reply #1 on: July 07, 2013, 19:48:33 »
FYI
Please pay attention:
Different TTS engines --> Different pronunciation

eg:
Google TTS, Samsung TTS, SVOX Classic TTS or IVONA,...
...sounds similar - but not identical.

But now, we have the ability to customize these differences.
You're on the right way Menion - thx
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10001
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: TTS voices
« Reply #2 on: July 07, 2013, 19:57:04 »
you're both crazy. I wanted to just discuss if such format is usable and you both completely translated all texts :)

ta-ka, there should be no problem to use "1": "1", but in this case, you may completely remove whole "numbers_N1", part and instead of "%N1", just use "%V". Locus will then use directly value without converting over "numbers_N1" parameters. Anyway reason for these number formats is as gynta wrote. Different TTS engines has different pronunciation and that's why I wrote all numbers as texts. You can clearly see it mainly in czech where were needed four different number formats
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline ta-ka

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 244
  • Thanked: 3 times
    • View Profile
  • Device: SGNote2, SGNoteEdge
Re: TTS voices
« Reply #3 on: July 07, 2013, 20:30:17 »
Hi, gynta and menion. Thanks for information.
When testing version comes, I'll see(listen to), which text(%N1) or number(%V) gives better results.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10001
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: TTS voices
« Reply #4 on: July 12, 2013, 20:49:03 »
so, new test version is out, so it should be possible to test this feature.

Currently your translations AREN'T inside Locus! Testing method is simple. Choose in Locus for example german language or set your device to german and put "de.txt" file into root directory of Locus. So for example "mnt/sdcard/Locus/de.txt".

Thanks to this, when you choose TTS in locus, it firstly check for this file, then for internal file and if non of this is found, it use older default TTS system

feel free to ask if something will not work
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10001
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: TTS voices
« Reply #5 on: July 13, 2013, 07:55:25 »
you're sitting home, enabled navigation, moving with map center, car is moving and no sound? ;)

then change parameter in config file "speed_for_moving_cursor_when_gps_off" to some value, like "20" (this means speed 72km/h)
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline ta-ka

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 244
  • Thanked: 3 times
    • View Profile
  • Device: SGNote2, SGNoteEdge
Re: TTS voices
« Reply #6 on: July 13, 2013, 19:26:53 »
By setting speed parameter to 20.0 and renaming en.txt to en.tts, the voice simulation works now.

I'm testing TTS navigation for now under the condition:
Locus Language : English
TTS Engine : Google TTS
Compute source : MapQuest

1. For "approximately after %N1 kilometers",
'%N1' is not replaced with numbers but is pronounced literally.

2. Tapping [Settings] -> [Navigation] -> [Choose voice] -> [Text-to-speech] or
   [Nav button] -> [Choose voice] -> [Text-to-speech] during navigation,
   the device speaks "You've arrived at your destination".  Isn't it strange?

3. It seems that the last voice before a turning point is usually given at 200 meter before the point.
Is this reasonable distance? It may be good for Cars but too far for cycle and for Foot.
Well I'm not sure if this issue should be discussed here now but I wrote it just to remember...
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10001
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: TTS voices
« Reply #7 on: July 14, 2013, 12:01:24 »
I was just a day on small "trip" by car and
1. may confirm, funny issue, I'll fix it

2. I used this text for "information" voice that confirm, your voice works. Anyway I'll add there some text specially for this case

3. imagine Locus things you still ride 72km/h. Distance for voice commands is computed by your speed and because you ride still too fast, last distance should be 200m. Set value to 10.0 and you'll hear difference
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline ta-ka

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 244
  • Thanked: 3 times
    • View Profile
  • Device: SGNote2, SGNoteEdge
Re: TTS voices
« Reply #8 on: July 14, 2013, 18:27:16 »
Quote from: "menion"
2. I used this text for "information" voice that confirm, your voice works. Anyway I'll add there some text specially for this case
I think it may be nice if the information voice text also appears as a 'TEST PHRASE' in Text-to-speech settings dialogue. It is currently "Do you like Locus?" which is shared with the Main menu as a section title.

Quote from: "menion"
3. imagine Locus things you still ride 72km/h. Distance for voice commands is computed by your speed and because you ride still too fast, last distance should be 200m. Set value to 10.0 and you'll hear difference
Oh. I see. I didn't notice that the voice depends on the speed. Sorry. I just selected 'Cycle' or 'Foot' for route calculation.

edit
I've just updated ja.txt and en.txt at my first post in this topic.
Please note that I changed identifier name of "dist_mil" to ''dist_mile"

Well I know it's just an id-name and any text can be used if the id-name between config file and source code is consistent. But, mil is a different unit in length and not an abbreviation of mile. So I think it is better to change...
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline ta-ka

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 244
  • Thanked: 3 times
    • View Profile
  • Device: SGNote2, SGNoteEdge
Re: TTS voices
« Reply #9 on: July 14, 2013, 21:22:01 »
Quote from: "ta-ka"
1. For "approximately after %N1 kilometers",
'%N1' is not replaced with numbers but is pronounced literally.
Quote from: "menion"
1. may confirm, funny issue, I'll fix it
I've got some clue. The key may be decimal number in distance and internal/external .tts file.

When .tts file exists in Locus folder and distance value is decimal number (not integer number)
for example 1.5 km, the problem seems occur.

But when there is no .tts files in Locus folder, ie internal tts file is used, '%N1' is properly replaced and
no problem happen even if distance value is decimal number.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline gynta

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 3518
  • Thanked: 25 times
    • View Profile
    • Locus live tracking service
  • Device: SGS5m (4.4.2 root), SGTab10.1 (4.0.4)
Re: TTS voices
« Reply #10 on: July 18, 2013, 14:24:01 »
After I have reached my destination - i never heared the string "you've arrived at your destination".
what's wrong?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline tommi

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1196
  • Devices: Samsung S7 + S5 + S3 + Nexus7 flo
    • View Profile
Re: TTS voices
« Reply #11 on: July 18, 2013, 16:27:24 »
Quote from: "gynta"
After I have reached my destination - i never heared the string "you've arrived at your destination".
what's wrong?
Please check the symbols for the waypoints: Usually they indicate turn left, right etc and the last waypoint should have a flag indicating the destination. But not for all Locus routing services this is created, e.g. for the inofficial google routing service the destination waypoint is missing.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline ta-ka

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 244
  • Thanked: 3 times
    • View Profile
  • Device: SGNote2, SGNoteEdge
Re: TTS voices
« Reply #12 on: July 18, 2013, 16:38:02 »
I've heard the voice "You've arrived at your destination".
Try attached the gpx file for navigation test.
With this gpx file, you will also hear that the '%N1' is pronounced literally.

By the way, who fixed my mistake in the en.txt? Thanks.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline gynta

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 3518
  • Thanked: 25 times
    • View Profile
    • Locus live tracking service
  • Device: SGS5m (4.4.2 root), SGTab10.1 (4.0.4)
Re: TTS voices
« Reply #13 on: July 19, 2013, 12:39:31 »
Quote from: "ta-ka"
..."You've arrived at your destination". Try attached the gpx file.
Ah i see. It is also a calculation "problem". Distance from the last instruction and speed. Isn't it?

Quote
you will also hear that the '%N1' is pronounced literally.
An already reported problem - ignore it yet.

Quote
btw, who fixed my mistake in the en.txt? Thanks.
np ;) tiny mistake - had no effects for Locus - only for my eyes :)

@menion: in this thread are two en.txt files - maybe we can remove one of them...
Hint: Your file include small errors :D
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10001
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: TTS voices
« Reply #14 on: July 19, 2013, 12:42:40 »
hi guys, I had to change a format a little, you'll see.

Anyway my biggest problem now, is how to work with these files and how to allow others modify them and even keep them updated in locus itself. Any ideas? Because publishing over posts here, is useful for max two tts files. For more, it's crazy. So some shared folder on dropbox/google drive for example?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!