2014-03-11 23:38:38 |
Jean-Philippe Guérard |
description |
The command definition (GenericExecuteSynth) in /etc/speech-dispatcher/modules/pico-generic.conf use a fixed file name for the wave file ($TMPDIR/pico.wav):
GenericExecuteSynth \
"pico2wave -w $TMPDIR/pico.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico.wav
If you use spd-say or a speech dispatcher enabled application with root, it will create the pico.wav file owned by root with restricted permissions.
If you try to use spd-say with a different user, it will then fail, failing to access the /tmp/pico.wav file.
A solution would be to create a temporary file per user ID:
GenericExecuteSynth \
"USERID=`id -u` ; pico2wave -w $TMPDIR/pico-$USERID.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico-$USERID.wav" |
The command definition (GenericExecuteSynth) in /etc/speech-dispatcher/modules/pico-generic.conf use a fixed file name for the wave file ($TMPDIR/pico.wav):
GenericExecuteSynth \
"pico2wave -w $TMPDIR/pico.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico.wav
If you use spd-say or a speech dispatcher enabled application with root, it will create the pico.wav file owned by root with restricted permissions.
If you try to use spd-say with a different user, it will then fail, failing to access the /tmp/pico.wav file.
A solution would be to create a temporary file per user ID:
GenericExecuteSynth \
"USERID=`id -u` && pico2wave -w $TMPDIR/pico-$USERID.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico-$USERID.wav" |
|
2014-03-14 23:34:28 |
Jean-Philippe Guérard |
description |
The command definition (GenericExecuteSynth) in /etc/speech-dispatcher/modules/pico-generic.conf use a fixed file name for the wave file ($TMPDIR/pico.wav):
GenericExecuteSynth \
"pico2wave -w $TMPDIR/pico.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico.wav
If you use spd-say or a speech dispatcher enabled application with root, it will create the pico.wav file owned by root with restricted permissions.
If you try to use spd-say with a different user, it will then fail, failing to access the /tmp/pico.wav file.
A solution would be to create a temporary file per user ID:
GenericExecuteSynth \
"USERID=`id -u` && pico2wave -w $TMPDIR/pico-$USERID.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico-$USERID.wav" |
The command definition (GenericExecuteSynth) in /etc/speech-dispatcher/modules/pico-generic.conf use a fixed file name for the wave file ($TMPDIR/pico.wav):
GenericExecuteSynth \
"pico2wave -w $TMPDIR/pico.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico.wav
If you use spd-say or a speech dispatcher enabled application with root, it will create the pico.wav file owned by root with restricted permissions.
If you try to use spd-say with a different user, it will then fail, failing to access the /tmp/pico.wav file.
A solution would be to create a temporary file per user ID:
GenericExecuteSynth \
"USERID=`id -u` && umask 077 && pico2wave -w $TMPDIR/pico-$USERID.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico-$USERID.wav" |
|