From: Robert R. <ro...@fr...> - 2004-02-04 18:06:30
|
Hi, I'm trying to incorporate support for multiple sound cards also under Linux and Festival (I use aplay with -D specification to play wav file to diferent device). I think that it is best, to mimic win32 support for multiple sound cards, but with some differences: - user could somehow specify sound cards that he has (1,2,3) - there are now 2 possibilities to do that with Festival: 1. to add pre,post_speak hook let Festival prepare wav file and play it properly, but: - what parms do I get to those hooks (does $parms{card} and wav file name gets to code hook ?) 2. To have multiple festival_init_cmds in mh.ini and at the end specify different play command to go to different sound card. I did in Voice_text.pm: if ($parms{card} == 1) { print "Data sent to festival: $main::config_parms{festival_init_cmds}\n"; set $VTxt_festival qq[$main::config_parms{festival_init_cmds}]; } elsif ($parms{card} == 2) { print "Data sent to festival: $main::config_parms{festival_init_cmds_kids}\n"; set $VTxt_festival qq[$main::config_parms{festival_init_cmds_kids}]; } But it seems like card=2 parameter doesn't get through. If I do: $test_speak13 = new Voice_Cmd 'Test speech output to card [1,2,all]'; if ($state = state_now $test_speak13 ) { if ($state == 1) { speak card => $state, text => "Testing speech to soundcard $state"; } elsif ($state == 2) { speak card => $state, text => "Testing speech to soundcard $state"; } else { speak card => 1, text => "Testing speech to soundcard main"; speak card => 2, text => "Testing speech to soundcard kids"; } } --------------------------- It produces all speech on main sound card - so parameter card=2 doesn't get through. Any help, opinion, how to do this properly and in proper Misterhouse manner. Regards, Robert. |