View Single Post
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#75
Love this one:
Code:
case 1:
text2say = ("no idea good luck");
break;
The only thing I'd say at the moment, based only on the video uploaded to youtube, not knowing the speed of the vehicle/scale of map was it announced the turning a bit early. Looking at the current conversation though I see your looking into this information. What about moving the sayvoice call from ShowSelectedManeuver to updatePosition, calling the function when the dist goes below a predetermined or speed determined value. Several hundred yards may be OK at 30mph but not at 70..ish on a motorway. Getting ahead of myself I know but knowing the speed opens up more functions such as camera alerts.

Ok, deep breath. Sorry about the length of this post, documenting findings as I go. I've been looking into pre-recorded messages, taking Nokia/Ovi Maps voices as a starting point as there already in MapLoader, last time I checked.

Nokia Maps voices are linked to here (some missing though - no Surfer ):
http://diabo.110mb.com/symbian/nokiamaps.html#voices

I've downloaded the ~3MB English (GB I think, don't really matter). There may be new versions as this has no speed related guidance. Not tried any since last version for N95-1, so maybe they don't use these anymore or they use TTS. Any one know?

As I think I've said previously, and as you have discovered, each maneuver is created by stringing together a number of predefined statements. In ShowSelectedManeuver() in the latest posted version, you make use aManeuver.getIconIndex() to create the text to be passed to eSpeak. If you download one of the voices and have a look inside the archive you will find a file called config.xml and a folder containing a number of PCM wav files without an extension. They play in VLC but it misses of the last bit of each file for some reason ("You've reached your destina.."). iTunes is fine if you set extension.

The config.xml simply tells what files are linked with each maneuver action. Handily it also has some comments. Taken from part way through:
Code:
<maneuver val="END">
	    <soundfile val="english\english_male\g5ann_001"/>		<!-- you have reached your destination -->
	</maneuver>
	<maneuver val="ROUNDABOUT">
	    <soundfile val="english\english_male\g5mod_005"/>		<!-- at the roundabout -->
	    <roundaboutexit val="1">
				<soundfile val="english\english_male\g5ext_001e"/>		<!-- take the first exit -->
	    </roundaboutexit>
	    <roundaboutexit val="2">
				<soundfile val="english\english_male\g5ext_002e"/>		<!-- take the second exit -->
	    </roundaboutexit>
	    <roundaboutexit val="3">
				<soundfile val="english\english_male\g5ext_003e"/>		<!-- take the third exit -->
	    </roundaboutexit>
As you can see, if it the maneuver value is END it simply references to g5ann_001. If your at a roundabout and need the second exit, you would play g5mod_005 followed by g5ext_002e. <maneuver val=XXX> seems to tie in with Maneuver's this._action, roundaboutexit I presume with this._turn.

Further more, the file also contains information relating to distances at which to play certain files as a min/max range, handy.

As we now have a way of sending requests to a python script, it opens up more options for audio playback. To make use of the Ovi Maps voice files the data being transmitted would have to change but it would allow it to handle translations better as you only have to provide the config.xml with the translation.

Python or even JS side of it would be to parse the XML file on start-up to populate an array matching that of the Maneuver's actions to the correct soundfile. You could then either send each the path to each voice file one at a time or together to python to play. Depends on how fast the XMLHttpRequest()'s are handled vs time taken to split a url request in python.

Theres no reason why the commands can't be pre-recorded for clarity/translation and the street names via TTS by optionally appending something like "onto xxx street" to the command in the native translation.

I personally like the pre-recorded option as it gives the user the option of providing their own translations, be it because the prefer any combination of female/male/old/young/regional accent/posh or celebrity impressions such as Yoda's: Hmm Turn left you must.

Traffic/ Speed Cams idea:
this._mapModel.createLayer is used during routing to display the information. No reason why, with the correct code these couldn't be added. Don't see no reason why Speed Cams couldn't just be POIs. http://www.scdb.info/en/plugin-google-earth/ provides a .kmz file I've used before with RoadRunner.

Anyway, that's it for today. 6 days straight of 5am starts, on the go for 18.5 hours a day kinda takes its toll.
 

The Following 13 Users Say Thank You to Android_808 For This Useful Post: