ffwdme / ffwdme.js

[DEPRECATED!] 🛑 A JavaScript toolkit that aims to bring interactive GPS driving directions to the mobile browser
http://ffwdmejs.org
MIT License
153 stars 36 forks source link

Voice Audio #32

Closed Angelbrat79 closed 7 years ago

Angelbrat79 commented 7 years ago

Hi,

Can the voice on the directions be in English ?

fabrik42 commented 7 years ago

Yes, you just would have to record your own audio file and set the right timestamps in the voice.json file.

For examples, see here: https://github.com/ffwdme/ffwdme.js/tree/master/src/components/audio_instructions/voices

The audio files (ending with m4a, mp3, ogg, wav) are all the same content, just different audio encoding.

So basically, there is only one audio file, that contains all the voice instructions. It is an audio sprite, containing all the voices with silence in between. The voice.json file contains the timestamps of the single instructions. After you recorded your own voice, you would need to adjust the values in this file.

Let me know, if you have any more questions.

mm-ns commented 7 years ago

I find that using audio file is a little archaic and tedious. What I do instead is write in a div the turn directions from graphhopper (you can get them in multiple languages) and then i use the browser built in HTML5 Speech Synthesizer to make it ready the road directions.

fabrik42 commented 7 years ago

Sure, this is another way to make this work! Feel free to contribute a component, if you like :)

fabrik42 commented 7 years ago

Closing this for now.