| 1 |
# Swift software output module is based on the generic plugin for Speech |
| 2 |
# Dispatcher. It means there is no C code written explicitly for |
| 3 |
# this plugin, all the specifics are handled in this configuration |
| 4 |
# and we call a simple command line client to perform the actual |
| 5 |
# synthesis. Note that this is not an optimal solution, but |
| 6 |
# it's reported to work. |
| 7 |
#Use this config file with the sd_generic output module. |
| 8 |
|
| 9 |
# Debug turns debugging on or off |
| 10 |
# See speechd.conf for information where debugging information is stored |
| 11 |
# Debug 0 |
| 12 |
|
| 13 |
# IMPORTANT: The audio output method relies on an audio playback |
| 14 |
# utility (play, aplay, paplay for OSS, ALSA or Pulse) |
| 15 |
# being installed. If this is not the case, consider installing it |
| 16 |
# or replace the $PLAY_COMMAND string in the GenericExecuteString below |
| 17 |
# with play, paplay or similar. |
| 18 |
# |
| 19 |
# Please note that Swift software is currently *not* Free Software. |
| 20 |
#It can be purchased at www.cepstral.com. |
| 21 |
|
| 22 |
# GenericExecuteSynth is the shell command that should be |
| 23 |
# executed in order to say some message. This command must |
| 24 |
# stop saying the message on SIGKILL, otherwise it's useless. |
| 25 |
# You can use the variables $LANGUAGE, $VOICE, $PITCH and $RATE |
| 26 |
# which will be substituted for the appropriate value (you |
| 27 |
# can modify this value, see other parameters). |
| 28 |
# The command can be split into more lines, if necessary, using '\'. |
| 29 |
GenericExecuteSynth \ |
| 30 |
"printf %s \'$DATA\' >/tmp/swift-speak.txt && /opt/swift/bin/swift -p speech/rate=$RATE,speech/pitch/shift=$PITCH,tts/content-type=text/plain,tts/text-encoding=utf-8,config/default-voice=$VOICE -f /tmp/swift-speak.txt -o /tmp/swift-speak.wav&& $PLAY_COMMAND /tmp/swift-speak.wav" |
| 31 |
|
| 32 |
GenericCmdDependency "/opt/swift/bin/swift" |
| 33 |
GenericSoundIconFolder "/usr/share/sounds/sound-icons/" |
| 34 |
|
| 35 |
# GenericStripPunctChars is a list (enclosed in doublequotes) of |
| 36 |
# all the characters that should be replaced by whitespaces in |
| 37 |
# order not to be badly handled by the output module or misinterpreted |
| 38 |
# by shell. |
| 39 |
# command characters. |
| 40 |
GenericStripPunctChars "[]" |
| 41 |
|
| 42 |
# AddVoice specifies which $VOICE string should be assigned to |
| 43 |
# each language and symbolic voice name. All the voices you want |
| 44 |
# to use must be specified here. |
| 45 |
|
| 46 |
AddVoice "en" "MALE1" "David" |
| 47 |
AddVoice "en" "FEMALE1" "Diane" |
| 48 |
AddVoice "en" "FEMALE2" "Linda" |
| 49 |
AddVoice "en" "FEMALE3" "Callie" |
| 50 |
|
| 51 |
# DefaultVoice specifies which $VOICE string should be used if no voice is |
| 52 |
# specified otherwise. |
| 53 |
|
| 54 |
DefaultVoice "David" |
| 55 |
|
| 56 |
GenericDefaultCharset "iso-8859-1" |
| 57 |
|
| 58 |
# These parameters set _rate_ and _pitch_ conversion. This is |
| 59 |
# part of the core of the definition of this generic output |
| 60 |
# module for this concrete synthesizer, it's not intended to |
| 61 |
# be modified by common users. |
| 62 |
# The resulting rate (or pitch) has the form: |
| 63 |
# (speechd_rate * GenericRateMultiply) + GenericRateAdd |
| 64 |
# while speechd_rate is a value between -100 (lowest) and +100 (highest) |
| 65 |
# You have to define some meaningful conversion for each synthesizer |
| 66 |
|
| 67 |
GenericRateForceInteger 1 |
| 68 |
|
| 69 |
GenericRateAdd 238 |
| 70 |
GenericPitchAdd 1 |
| 71 |
# (These values are multiplied by 100, because DotConf currently |
| 72 |
# doesn't support floats. So you can write 0.85 as 85 and so on.) |
| 73 |
|
| 74 |
GenericRateMultiply 262 |
| 75 |
GenericPitchMultiply 1 |
| 76 |
|
| 77 |
|
| 78 |
# Copyright (C) 2008 Brailcom, o.p.s |
| 79 |
# |
| 80 |
# This program is free software; you can redistribute it and/or modify it under |
| 81 |
# the terms of the GNU General Public License as published by the Free Software |
| 82 |
# Foundation; either version 2 of the License, or (at your option) any later |
| 83 |
# version. |
| 84 |
# |
| 85 |
# This program is distributed in the hope that it will be useful, but WITHOUT ANY |
| 86 |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 87 |
# PARTICULAR PURPOSE. See the GNU General Public License for more details (file |
| 88 |
# COPYING in the root directory). |
| 89 |
# |
| 90 |
# You should have received a copy of the GNU General Public License |
| 91 |
# along with this program. If not, see <https://www.gnu.org/licenses/>. |