Opened 11 years ago

Closed 9 years ago

#964 closed defect/bug (fixed)

Speech - .WAV - Navit.xml

Reported by: james gustavo rebelato Owned by: cp15
Priority: major Milestone: version 0.5.1
Component: port/android Version: git master
Severity: Keywords: sound, speech



I am using Samsung Galaxy 7Tablet with Android. Navit Version svn-4846

I am not getting success in doing the voice work with. wav

I'm just adding the following line to navit.xml


		<!-- Navit provides speech output in text format.
			If you have a speech synthesizer like festival lite installed, you can get turn by turn directions out of navit. Please set the "cps"-value to how many characters your tts engine approximately speaks per second.
			The default is text output to the shell -->
		<speech type="cmdline" data="aplay '%s'" sample_dir="/sdcard/navit/waves" sample_suffix=".wav" vocabulary_name="0" vocabulary_name_systematic="0" vocabulary_distances="0"></speech>

		<!-- You can only have enabled only one mapset at time, but with as much maps enabled as you want  -->

		<!-- If you have the reiseplaner maps installed, set enabled="yes" in the next line and set the path correctly -->
		<mapset enabled="no">

There are several. Wav folder Waves

I really appreciate the help

Change History (5)

comment:1 Changed 11 years ago by tryagain

Probably you don't have the aplay program referenced to play wav files.

And I'm unsure if there's any command line program on the Android platform for playing waves.

So I think currently there is no easy way to do what you want.

comment:2 Changed 10 years ago by usul

  • Keywords sound speech added
  • Milestone changed from version 0.5.0 to version 0.5.1

Can anybody check if this works on the linux port? Where are the wavepacks coming from?
If it's android only issue, we should note this problem in the docs.

BTW: I hope we can manage it to create a better wavepack option, so you can have whole sentences and not a word based playback.

comment:3 Changed 9 years ago by sleske

Yes, this works on the Linux port, I just tested it (with current SVN).

In navit.xml, I used the configuration:

<speech type="cmdline" data="aplay %s" cps="15"
  sample_dir="/tmp" sample_suffix=".wav"/>

Some caveats:

  • In my tests, it did not work if I put the %s in single quotes ('%s'), as in the sample navit.xml. The code for playing samples seems to work a bit differently than the code used when calling a synthesizer like espeak.
  • The "sample_suffix" must include the dot of the suffix (".wav", not "wav"), otherwise it won't work.
  • For each word in the text to be spoken, Navit tries to find a sample file with the same name. If it does not find samples for each word, apparently nothing is played (and there's no error message). The code tries to ignore case when looking for a matching file; however, I'm not sure the case folding code works if the file (or the text to be spoken) contain non-ASCII characters.

All in all, the sample playing feature seems rather alpha-quality to me. Still, it does work in principle.

comment:4 Changed 9 years ago by sleske

At the very least we should have some docs on how to use this feature (and its limitations). There is some information in the Wiki ( ). Maybe this can be expanded.

I'll try to at least put a sample entry for this feature into the default navit.xml, with some comments.

Last edited 9 years ago by sleske (previous) (diff)

comment:5 Changed 9 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

Wiki docs expanded:

Fixes in SVN:

Navit now prints a warning if it cannot speak text due to missing samples. Also, navit_shipped.xml now contains an example for playing samples (rev. 5634-5637).

Note: See TracTickets for help on using tickets.