modrana icon indicating copy to clipboard operation
modrana copied to clipboard

Turn-by-turn voice output on Sailfish OS

Open M4rtinK opened this issue 7 years ago • 6 comments

While voice sample based output for navigation messages would be nice to have & the voice samples produced for Marble should be usable there are some issues:

  • samples would be probably too big to distribute as part of the installation package
    • a mechanism would probably have to be added to download them at runtime before they can be used
  • there is a limited number of samples that might not cover all maneuvers the routers & modRana can describe
  • samples can't describe street & route names at all
  • samples don't not sound like Stephen Hawking ;-)

So let's go with text so speech, at least for now. :)

What needs to b done:

  • apparently Espeak can't output directly on Sailfish OS dues to some breakage
  • so either we should fix that
  • or use a hack that IIRC Taixzo has created that pipes Espeak output through gstreamer
  • make it possible for users to install Espeak
  • for OpenRepos just add Espeak package to the repo & add requires
  • for Jolla Store the situation is unclear
    • get Espeak to official repos ?
    • tell users to install Espeak from OpenRepos ?
    • do some ultra-ugly bundling nonsense for the Jolla store package only ? BLEH

M4rtinK avatar Mar 31 '17 17:03 M4rtinK

Is there any progress (or rough ETA) regarding the TTS based turn-by-turn navigation?

bonanza123 avatar Jul 10 '17 20:07 bonanza123

I'll be traveling in the next three weeks (and I of course plan to use modRana during my travels :) ), so likely not sooner than that. On the other hand quite a few of the building blocks and if espeak still works correctly it should not be that hard to get it all working once I'm back. :)

M4rtinK avatar Jul 11 '17 20:07 M4rtinK

@M4rtinK, I worked on turn-by-turn voice prompts for Poor Maps and it turned out to be rather large patch (still waiting for review merge in Poor Maps). I am sure we can reuse large sections of the code here as well. In particular, it supports several TTS engines (mimic and picotts are much better than espeak), generation of voice commands in advance and playing them when needed.

To work on this, you would probably need to enable navigation layout first. Then the voice can be integrated into it as well. At least, that's the way I implemented it for Poor Maps.

rinigus avatar Sep 04 '17 08:09 rinigus

@M4rtinK, I worked on turn-by-turn voice prompts for Poor Maps and it turned out to be rather large patch (still waiting for review merge in Poor Maps). I am sure we can reuse large sections of the code here as well. In particular, it supports several TTS engines (mimic and picotts are much better than espeak), generation of voice commands in advance and playing them when needed.

That sounds very cool & much more advanced than the simple espeak based TTS support in modRana! :) I'm definitely interested in integrating this into modRana as well. :)

Also thanks a lot for all the work with porting these nice TTS tools - I guess the quality of espeak output and not actually being able to use it on Sailfish OS without playing stuff over Gstreamer (it was like that last time) is likely one of the contributing factors I have not worked on this earlier while espeak based TTS has been present on desktop & the N900 for quite some time already.

To work on this, you would probably need to enable navigation layout first. Then the voice can be integrated into it as well. At least, that's the way I implemented it for Poor Maps.

I did some preliminary work on the navigation overlay support in the Qt 5 GUI - that's basically the only missing piece for rudimentary turn by turn navigation on Sailfish OS with modRana as the rest (direction generation and triggering) has been part of the multi-platform application core for ages. So I'll try to get that working as a priority so that we can continue forward from that. :)

M4rtinK avatar Sep 14 '17 21:09 M4rtinK

So there is new some placeholder TTS support via espeak I've added together with the navigation overlay. Next is making use of the advanced TTS handling code Rinigius created for Poor Maps. :)

M4rtinK avatar Dec 03 '17 00:12 M4rtinK

Great! Osmo is working on polishing the voice support for Poor Maps under the corresponding PR in its source tree. I would expect the code to improve after he has worked on it.

TTS, by itself, is supported via voice.py (https://github.com/rinigus/poor-maps/blob/voice/poor/voice.py) which is a wrapper around mimic, picoTTS, flite, and espeak. In this implementation, VoiceDirection generates commands into WAV files stored at /tmp and removes the files when not needed anymore. To support the voices that are computationally intensive, the voice prompt generation is done in separate thread. Its expected that you would call voice generator in advance (pre-generate few commands in front before you reach the needed time moment) and fetch them (as a filename) when you need it.

rinigus avatar Dec 03 '17 09:12 rinigus