Main Menu

TTS voices

Started by Menion, July 07, 2013, 14:44:19

0 Members and 2 Guests are viewing this topic.

Menion

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

The main problem of TTS is the correct spelling of numbers. To make it work on 100%, I created a system where all texts are stored in text files in a 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 a little bit complicated to write but much easier to read and work with it

How to help/translate

Edited 13. 10. 2019

TTS Files are stored on GitHub repository. All necessary information will be wrote on Wiki of the project.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

gynta

#1
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

Menion

#2
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
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

ta-ka

#3
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.
  •  

Menion

#4
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
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Menion

#5
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)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

ta-ka

#6
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...
  •  

Menion

#7
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
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

ta-ka

#8
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...
  •  

ta-ka

#9
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.
  •  

gynta

#10
After I have reached my destination - i never heared the string "you've arrived at your destination".
what's wrong?

tommi

#11
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.
  •  

ta-ka

#12
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.
  •  

gynta

#13
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?

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

Quotebtw, 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

Menion

#14
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?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •