webOS Nation Forums >  webOS Developer Forums >  Navit > Forth Navit (speech dispatcher) to use the phone speaker when connected to BT/AD2P
Forth Navit (speech dispatcher) to use the phone speaker when connected to BT/AD2P
  Reply
Like Tree3Likes
  • 2 Post By hape
  • 1 Post By hape

 
Thread Tools Display Modes
Old 08/20/2012, 02:17 PM   #1 (permalink)
Homebrew Developer
 
hape's Avatar
 
Posts: 556
Starting with version 0.7.1-14 this version is depreciated! The Mojo app now shows you the default audio channel and you can set is with the icon in the lower left corner. There is also a test button to test the selected audio channel and the service.

HaPe


Hi,

I have my PRE3 connect to my BT car audio while driving. The most time I listen to the Radio, as a Result I do not get the speech output of Navit as it goes to the BT audio channel by default.
My target was to change this to get the Navit announcements from the PRE3 speaker.

Where we can change this?
The audio target is specified in the file: /var/etc/speech-dispatcher/modules/espeak-generic.conf
In line 23 you find a long command line:

"echo \'$DATA\' | /media/cryptofs/apps/usr/palm/applications/org.webosinternals.speechd/bin/speak --path=/media/cryptofs/apps/usr/palm/applications/org.webosinternals.speechd/share --stdin --stdout -v $VOICE -s $RATE -a $VOLUME -p $PITCH $PUNCT | aplay -D navigation"

The interesting part is at the end of this line. The parameter -D navigation specified the audio skin to use.

If you look into the pulse audio definition in webOS you will find the following skins:
Code:
# define sinks for virtual devices, apps should write to these
# since these will be used to implement policy management

load-module module-null-sink sink_name=palerts        description="high priority alert virtual sink"
load-module module-null-sink sink_name=pnotifications description="notification virtual sink"
load-module module-null-sink sink_name=pfeedback      description="tactile feedback virtual sink"
load-module module-null-sink sink_name=pringtones     description="ringtone virtual sink"
load-module module-null-sink sink_name=pmedia         description="media sound virtual sink"
load-module module-null-sink sink_name=pflash         description="flash virtual sink"
load-module module-null-sink sink_name=pnavigation    description="navigation services virtual sink"
load-module module-null-sink sink_name=pvoicedial     description="voice dialling prompts"
load-module module-null-sink sink_name=pvoip          description="voip sink"
load-module module-null-sink sink_name=pdefaultapp    description="all other applications should use this"
load-module module-null-sink sink_name=peffects       description="sink for special effects played when other sounds are turned off via ringer switch"
load-module module-null-sink sink_name=pDTMF          description="sink for DTMF tones to be rendered on"
load-module module-null-sink sink_name=pcalendar      description="sink for calendar alerts to be rendered on"
load-module module-null-sink sink_name=palarm         description="sink for alarm alerts to be rendered on"
load-module module-null-sink sink_name=pvvm           description="sink for visual voice mail"
You can try them if you change the parameter navigation to one of the other skins.

This are the 2 that I found best, both uses the internal speaker when connected to a BT device and do not stop the music that is playing:
feedback: You get the the volume of the alert/system signal
voip: You get the volume of the hand free phone level

You need to reboot when you have changed the setting in the config file. You need to remove and reinstall speech dispatcher app if you mess up the config files.

Happy hacking
HaPe

Last edited by HaPe; 11/01/2012 at 04:35 AM.
hape is offline   Reply With Quote
Liked by mgmft and MartinH@webos like this.
Thanked by knobbysideup, mgmft
Old 08/21/2012, 05:43 AM   #2 (permalink)
Member
 
Posts: 199
Thanks HaPe! I've been waiting for this and will try it soon!
mgmft is offline   Reply With Quote
Old 08/22/2012, 09:46 AM   #3 (permalink)
Member
 
knobbysideup's Avatar
 
Posts: 924
Awesome! Thank you so much for sharing! I've been looking for where to change how espeak is called by the speech dispatcher so I can tweak that too. Two birds, one stone. Thanks, man! Ultimately I'd really like to run a filter to fix "DR" being pronounced as "Doctor" instead of "Drive", etc.
__________________
: (){:|:&};:

Last edited by knobbysideup; 08/22/2012 at 06:55 PM.
knobbysideup is offline   Reply With Quote
Old 11/01/2012, 04:33 AM   #4 (permalink)
Homebrew Developer
 
hape's Avatar
 
Posts: 556
Starting with version 0.7.1-14 this version is depreciated! The Mojo app now shows you the default audio channel and you can set is with the icon in the lower left corner. There is also a test button to test the selected audio channel and the service.

HaPe
hape is offline   Reply With Quote
Liked by knobbysideup likes this.
Thanked By: knobbysideup
Old 11/01/2012, 04:33 AM   #5 (permalink)
Homebrew Developer
 
hape's Avatar
 
Posts: 556
Starting with version 0.7.1-14 this version is depreciated! The Mojo app now shows you the default audio channel and you can set is with the icon in the lower left corner. There is also a test button to test the selected audio channel and the service.

=> Speech Dispatcher

HaPe
hape is offline   Reply With Quote
Old 01/10/2013, 10:13 AM   #6 (permalink)
Member
 
knobbysideup's Avatar
 
Posts: 924
Preware version that downloaded for my Pre3 is 0.7.1-11. Will 14 ever make it to the feeds for the pre3?

Also,
Adding a regular expression based translation table to the mojo app would be quite spiffy, as speech dispatcher likes to mispronounce road abbreviations as they are more commonly used.
__________________
: (){:|:&};:
knobbysideup is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0