Initial commit. In a broken state, do not use.

This commit is contained in:
Storm Dragon
2019-12-11 14:39:33 -05:00
parent 5dea87f44a
commit 1237ab3fd9
1039 changed files with 187732 additions and 0 deletions

View File

@@ -0,0 +1,168 @@
# Espeak mbrola output module is based on the generic plugin for Speech
# Dispatcher. It means there is no code written explicitly for
# this plugin, all the specifics are handled in this configuration
# and we call a simple command line client to perform the actual
# synthesis. Use this config file with the sd_generic output module.
#
# IMPORTANT: The audio output method relies on an audio playback
# utility (play, aplay, paplay for OSS, ALSA or Pulse)
# being installed. If this is not the case, consider installing it
# or replace the $PLAY_COMMAND string in the GenericExecuteString below
# with play, paplay or similar.
#
# GenericExecuteSynth is the shell command that should be
# executed in order to say some message. This command must
# stop saying the message on SIGKILL, otherwise it's useless.
# You can use the variables $LANGUAGE, $VOICE, $PITCH and $RATE
# which will be substituted for the appropriate value (you
# can modify this value, see other parameters).
# The command can be split into more lines, if necessary, using '\'.
GenericExecuteSynth \
"espeak-ng -v mb-$VOICE -s $RATE -p $PITCH $PUNCT \'$DATA\'"
# The following three items control punctuation levels None, Some, and All.
# Each of these values will be substituted into the $PUNCT variable depending
# on the value passed to speech dispatcher from applications.
# Note that if an empty string is specified, then $PUNCT will be blank
# which is a default situation for espeak.
GenericPunctNone " "
GenericPunctSome "--punct=\"()[]{};:\""
GenericPunctAll "--punct"
# GenericStripPunctChars is a list (enclosed in doublequotes) of
# all the characters that should be replaced by whitespaces in
# order not to be badly handled by the output module or misinterpreted
# by shell.
# GenericStripPunctChars ""
# If the language you need to pass in $LANG is different
# from the standard ISO language code, you can specify
# which string to use instead. If you wish to use
# other than ISO charset for the specified language,
# you can add it's name (as accepted by iconv) as a
# third parameter in doublequotes.
GenericLanguage "af" "af" "utf-8"
GenericLanguage "ar" "ar" "utf-8"
GenericLanguage "cs" "cs" "utf-8"
GenericLanguage "de" "de" "utf-8"
GenericLanguage "el" "el" "utf-8"
GenericLanguage "en" "en" "utf-8"
GenericLanguage "en-us" "en-us" "utf-8"
GenericLanguage "es" "es" "utf-8"
GenericLanguage "fr" "fr" "utf-8"
GenericLanguage "hr" "hr" "utf-8"
GenericLanguage "hu" "hu" "utf-8"
GenericLanguage "it" "it" "utf-8"
GenericLanguage "la" "la" "utf-8"
GenericLanguage "nl" "nl" "utf-8"
GenericLanguage "pl" "pl" "utf-8"
GenericLanguage "pt" "pt" "utf-8"
GenericLanguage "pt-br" "pt-br" "utf-8"
GenericLanguage "ro" "ro" "utf-8"
GenericLanguage "sv" "sv" "utf-8"
GenericLanguage "sw" "sw" "utf-8"
GenericLanguage "gr" "gr" "utf-8"
GenericLanguage "cr" "cr" "utf-8"
GenericLanguage "hu" "hu" "utf-8"
GenericLanguage "id" "id" "utf-8"
# AddVoice specifies which $VOICE string should be assigned to
# each language and symbolic voice name. All the voices you want
# to use must be specified here. This list will likely not be
# up-to-date, please check eSpeak documentation and add the voices
# you want to use. Or better use the native espeak module ('espeak'
# not 'espeak-generic')
AddVoice "ar" "MALE1" "ar1"
AddVoice "ar" "MALE2" "ar2"
AddVoice "en" "MALE1" "en1"
AddVoice "en-us" "MALE1" "us2"
AddVoice "en-us" "MALE2" "us3"
AddVoice "en-us" "FEMALE1" "us1"
AddVoice "de" "MALE1" "de4"
AddVoice "de" "MALE2" "de6"
AddVoice "de" "FEMALE1" "de5"
AddVoice "de" "FEMALE2" "de7"
AddVoice "fr" "MALE1" "fr1"
AddVoice "fr" "FEMALE1" "fr4"
AddVoice "it" "MALE1" "it3"
AddVoice "it" "FEMALE1" "it4"
AddVoice "es" "MALE1" "es1"
AddVoice "es" "MALE2" "es2"
AddVoice "sw" "MALE1" "sw1"
AddVoice "sw" "FEMALE1" "sw2"
AddVoice "gr" "MALE1" "gr1"
AddVoice "gr" "MALE2" "gr2"
AddVoice "pt-br" "MALE1" "br1"
AddVoice "pt-br" "MALE2" "br2"
AddVoice "pt-br" "MALE3" "br3"
AddVoice "pt-br" "MALE4" "br4"
AddVoice "pt" "FEMALE1" "pt1"
AddVoice "cs" "MALE1" "cz2"
AddVoice "pl" "FEMALE1" "pl1"
AddVoice "ro" "MALE1" "ro1"
AddVoice "af" "MALE1" "af1"
AddVoice "cr" "MALE1" "cr1"
AddVoice "hu" "MALE1" "hu1"
AddVoice "la" "MALE1" "la1"
AddVoice "id" "MALE1" "id1"
AddVoice "nl" "MALE1" "nl2"
# These parameters set _rate_, _pitch_, and _volume_ conversion. This is
# part of the core of the definition of this generic output
# module for this concrete synthesizer, it's not intended to
# be modified by common users.
# The resulting rate (or pitch) has the form:
# (speechd_rate * GenericRateMultiply) + GenericRateAdd
# while speechd_rate is a value between -100 (lowest) and +100 (highest)
# You have to define some meaningful conversion for each synthesizer
# Here's the mapping from SSIP (Speech Dispatcher) to ESpeak (v1.10):
#
# SSIP Range SSIP Default ESpeak/MBROLA Range ESpeak Default
# ----------- ------------ ------------ --------------
# Rate -100 to 100 0 80 to 320 160
# Pitch -100 to 100 0 0 to 99 50
# Volume -100 to 100 0 0 to 2 --
#
# The SSIP defaults are actually controlled via DefaultRate, DefaultPitch, and
# DefaultVolume in the speechd.conf file.
GenericRateAdd 160
GenericPitchAdd 50
GenericVolumeAdd 1
# (These values are multiplied by 100, because DotConf currently
# doesn't support floats. So you can write 0.85 as 85 and so on.)
GenericRateMultiply 160
GenericPitchMultiply 50
GenericVolumeMultiply 1
# If the client program can't handle floats, you will have to
# use these two options to force integers as the parameters
# 1 means force integers, 0 means do nothing (write floats).
GenericRateForceInteger 1
GenericPitchForceInteger 1
GenericVolumeForceInteger 0
# Note that SSIP rates < -50 are spoken at -50.
# Debug turns debugging on or off
# See speechd.conf for information where debugging information is stored
Debug 0

View File

@@ -0,0 +1,120 @@
# nanotts output module is based on the generic plugin for Speech
# Dispatcher. It means there is no code written explicitly for
# this plugin, all the specifics are handled in this configuration
# and we call a simple command line client to perform the actual
# synthesis. Use this config file with the sd_generic output module.
#
# IMPORTANT: The audio output method relies on an audio playback
# utility (play, aplay, paplay for OSS, ALSA or Pulse)
# being installed. If this is not the case, consider installing it
# or replace the $PLAY_COMMAND string in the GenericExecuteString below
# with play, paplay or similar.
#
# GenericExecuteSynth is the shell command that should be
# executed in order to say some message. This command must
# stop saying the message on SIGKILL, otherwise it's useless.
# You can use the variables $LANGUAGE, $VOICE, $PITCH and $RATE
# which will be substituted for the appropriate value (you
# can modify this value, see other parameters).
# The command can be split into more lines, if necessary, using '\'.
GenericExecuteSynth \
"nanotts-git -v $VOICE --speed $RATE --pitch $PITCH --volume $VOLUME -w \'$DATA\' -c -m | play -q -t raw -r 16000 -e s -b 16 -"
# The following three items control punctuation levels None, Some, and All.
# Each of these values will be substituted into the $PUNCT variable depending
# on the value passed to speech dispatcher from applications.
# Note that if an empty string is specified, then $PUNCT will be blank
# which is a default situation for espeak.
GenericPunctNone " "
GenericPunctSome "--punct=\"()[]{};:\""
GenericPunctAll "--punct"
# GenericStripPunctChars is a list (enclosed in doublequotes) of
# all the characters that should be replaced by whitespaces in
# order not to be badly handled by the output module or misinterpreted
# by shell.
# GenericStripPunctChars ""
# If the language you need to pass in $LANG is different
# from the standard ISO language code, you can specify
# which string to use instead. If you wish to use
# other than ISO charset for the specified language,
# you can add it's name (as accepted by iconv) as a
# third parameter in doublequotes.
GenericLanguage "en" "en" "utf-8"
GenericLanguage "de" "de" "utf-8"
GenericLanguage "es" "es" "utf-8"
GenericLanguage "fr" "fr" "utf-8"
GenericLanguage "it" "it" "utf-8"
# AddVoice specifies which $VOICE string should be assigned to
# each language and symbolic voice name. All the voices you want
# to use must be specified here. This list will likely not be
# up-to-date, please check nanotts documentation and add the voices
# you want to use.
AddVoice "en" "FEMALE1" "en-US"
AddVoice "en" "FEMALE2" "en-GB"
AddVoice "en-us" "FEMALE1" "en-US"
AddVoice "de" "FEMALE1" "de-DE"
AddVoice "es" "FEMALE1" "es-ES"
AddVoice "fr" "FEMALE1" "fr-FR"
AddVoice "it" "FEMALE1" "it-IT"
# Yes, it's wrong, but this way you at least get something even when configured
# (by default) to use a male voice
AddVoice "en" "MALE1" "en-US"
AddVoice "en" "MALE2" "en-GB"
AddVoice "en-us" "MALE1" "en-US"
AddVoice "de" "MALE1" "de-DE"
AddVoice "es" "MALE1" "es-ES"
AddVoice "fr" "MALE1" "fr-FR"
AddVoice "it" "MALE1" "it-IT"
# These parameters set _rate_, _pitch_, and _volume_ conversion. This is
# part of the core of the definition of this generic output
# module for this concrete synthesizer, it's not intended to
# be modified by common users.
# The resulting rate (or pitch) has the form:
# (speechd_rate * GenericRateMultiply) + GenericRateAdd
# while speechd_rate is a value between -100 (lowest) and +100 (highest)
# You have to define some meaningful conversion for each synthesizer
# Here's the mapping from SSIP (Speech Dispatcher) to ESpeak (v1.10):
#
# SSIP Range SSIP Default ESpeak/MBROLA Range ESpeak Default
# ----------- ------------ ------------ --------------
# Rate -100 to 100 0 80 to 320 160
# Pitch -100 to 100 0 0 to 99 50
# Volume -100 to 100 0 0 to 2 --
#
# The SSIP defaults are actually controlled via DefaultRate, DefaultPitch, and
# DefaultVolume in the speechd.conf file.
GenericRateAdd 1
GenericPitchAdd 1
GenericVolumeAdd 0
# (These values are multiplied by 100, because DotConf currently
# doesn't support floats. So you can write 0.85 as 85 and so on.)
GenericRateMultiply 1
GenericPitchMultiply 1
GenericVolumeMultiply 1
# If the client program can't handle floats, you will have to
# use these two options to force integers as the parameters
# 1 means force integers, 0 means do nothing (write floats).
GenericRateForceInteger 0
GenericPitchForceInteger 0
GenericVolumeForceInteger 0
# Note that SSIP rates < -50 are spoken at -50.
# Debug turns debugging on or off
# See speechd.conf for information where debugging information is stored
Debug 0

View File

@@ -0,0 +1,290 @@
# Global configuration for Speech Dispatcher
# ==========================================
# -----SYSTEM OPTIONS-----
# CommunicationMethod specifies the method to be used by Speech Dispatcher to communicate with
# its clients. Two basic methods are "unix_socket" and "inet_socket".
#
# unix_socket -- communication over Unix sockets represented by a file in the
# filesystem (see SocketPath below). This method works only locally, but is
# prefered for standard session setup, where every user runs his own instance of Speech
# Dispatcher to get voice feedback on his own computer.
#
# inet_socket -- alternatively, you can start Speech Dispatcher on
# a TCP port and connect to it via hostname/port. This allows for a more
# flexible setup, where you can use Speech Dispatcher over network
# from different machines. See also the Port and LocalhostAccessOnly
# configuration variables.
#
# CommunicationMethod "unix_socket"
# SocketPath is either "default" or a full path to the filesystem
# where the driving Unix socket file should be created in case the
# CommunicationMethod is set to "unix_socket". The default is
# $XDG_RUNTIME_DIR/speech-dispatcher/speechd.sock where $XDG_RUNTIME_DIR
# is the directory specified by the XDG Base Directory Specification.
# Do not change this unless you have a reason and know what you are doing.
# SocketPath "default"
# The Port on which Speech Dispatcher should be available to clients if the "inet_socket"
# communication method is used.
# Port 6560
# By default, if "inet_socket" communication method is used, the specified port is opened only
# for connections coming from localhost. If LocalhostAccessOnly is set to 0 it disables this
# access control. It means that the port will be accessible from all computers on the
# network. If you turn off this option, please make sure you set up some system rules on what
# computers are and are not allowed to access the Speech Dispatcher port.
# LocalhostAccessOnly 1
# By default, Speech Dispatcher is configured to shut itself down after a period of
# time if no clients are connected. The timeout value is in seconds, and is started when
# the last client disconnects. A value of 0 disables the timeout.
# Timeout 5
# -----LOGGING CONFIGURATION-----
# The LogLevel is a number between 0 and 5 specifying the
# verbosity of information to the logfile or screen
# 0 means nothing, 5 means everything (not recommended).
LogLevel 3
# The LogDir specifies where the Speech Dispatcher logs reside
# Specify "stdout" for standard console output
# or a custom log directory path. 'default' means
# the logs are written to the default destination (e.g. a preconfigured
# system directory or the home directory if .speech-dispatcher is present)
# DO NOT COMMENT OUT THIS OPTION, leave as "default" for standard logging
LogDir "default"
#LogDir "/var/log/speech-dispatcher/"
#LogDir "stdout"
# The CustomLogFile allows logging all messages # regardless of
# priority, to the given destination.
#CustomLogFile "protocol" "/var/log/speech-dispatcher/speech-dispatcher-protocol.log"
# ----- VOICE PARAMETERS -----
# The DefaultRate controls how fast the synthesizer is going to speak.
# The value must be between -100 (slowest) and +100 (fastest), default
# is 0.
DefaultRate 0
# The DefaultPitch controls the pitch of the synthesized voice. The
# value must be between -100 (lowest) and +100 (highest), default is
# 0.
DefaultPitch 0
# The DefaultPitchRange controls the pitch range of the synthesized voice. The
# value must be between -100 (lowest) and +100 (highest), default is
# 0.
DefaultPitchRange 0
# The DefaultVolume controls the default volume of the voice. It is
# a value between -100 (softly) and +100 (loudly). Currently, +100
# maps to the default volume of the synthesizer.
DefaultVolume 100
# The DefaultVoiceType controls which voice type should be used by
# default. Voice types are symbolic names which map to particular
# voices provided by the synthesizer according to the output module
# configuration. Please see the synthesizer-specific configuration
# in etc/speech-dispatcher/modules/ to see which voices are assigned to
# different symbolic names. The following symbolic names are
# currently supported: MALE1, MALE2, MALE3, FEMALE1, FEMALE2, FEMALE3,
# CHILD_MALE, CHILD_FEMALE
# DefaultVoiceType "MALE1"
# The Default language with which to speak
DefaultLanguage en
# ----- MESSAGE DISPATCHING CONTROL -----
# The DefaultClientName specifies the name of a client who didn't
# introduce himself at the beginning of an SSIP session.
# DefaultClientName "unknown:unknown:unknown"
# The Default Priority. Use with caution, normally this shouldn't be
# changed globally (at this place)
# DefaultPriority "text"
# The DefaultPauseContext specifies by how many index marks a speech
# cursor should return when resuming after a pause. This is roughly
# equivalent to the number of sentences before the place of the
# execution of pause that will be repeated.
# DefaultPauseContext 0
# -----SPELLING/PUNCTUATION/CAPITAL LETTERS CONFIGURATION-----
# The DefaultPunctuationMode sets the way dots, comas, exclamation
# marks, question marks etc. are interpreted. none: they are ignored
# some: some of them are sent to synthesis (see
# DefaultPunctuationSome) all: all punctuation marks are sent to
# synthesis
# DefaultPunctuationMode "none"
# Whether to use server-side symbols pre-processing by default.
# This controls whether the server should pre-process the messages to insert
# the appropriate words or if the output module is responsible for speaking
# symbols and punctuation.
DefaultSymbolsPreprocessing 0
# The DefaultCapLetRecognition: if set to "spell", capital letters
# should be spelled (e.g. "capital b"), if set to "icon",
# capital letters are indicated by inserting a special sound
# before them but they should be read normally, it set to "none"
# capital letters are not recognized (by default)
# DefaultCapLetRecognition "none"
# The DefaultSpelling: if set to On, all messages will be spelt
# unless set otherwise (this is usually not something you want to do.)
# DefaultSpelling Off
# ----- AUDIO CONFIGURATION -----------
# -- AUDIO OUTPUT --
# Chooses between the possible sound output systems:
# "pulse" - PulseAudio
# "alsa" - Advanced Linux Sound System
# "oss" - Open Sound System
# "nas" - Network Audio System
# "libao" - A cross platform audio library
# Pulse audio is the default and recommended sound server. OSS and ALSA
# are only provided for compatibility with architectures that do not
# include Pulse Audio. NAS provides network transparency, but is not
# very well tested. libao is a cross platform library with plugins for
# different sound systems and provides alternative output for Pulse Audio
# and ALSA as well as for other backends.
AudioOutputMethod pulse
# -- Pulse Audio parameters --
# Pulse audio server name or "default" for the default pulse server
#AudioPulseServer "default"
#AudioPulseMinLength 100
# -- ALSA parameters --
# Audio device for ALSA output
#AudioALSADevice "default"
# -- OSS parameters --
# Audio device for OSS output
#AudioOSSDevice "/dev/dsp"
# -- NAS parameters --
# Route to the Network Audio System server when NAS
# is chosen for the audio output. Note that NAS
# server doesn't need to run on your machine,
# you can use it also over network (for instance
# when working on remote machines).
#AudioNASServer "tcp/localhost:5450"
# -----OUTPUT MODULES CONFIGURATION-----
# Each AddModule line loads an output module.
# Syntax: AddModule "name" "binary" "configuration" "logfile"
# - name is the name under which you can access this module
# - binary is the path to the binary executable of this module,
# either relative (to lib/speech-dispatcher-modules/) or absolute
# - configuration is the path to the config file of this module,
# either relative (to etc/speech-dispatcher/modules/) or absolute
#AddModule "espeak" "sd_espeak" "espeak.conf"
AddModule "espeak-ng" "sd_espeak-ng" "espeak-ng.conf"
#AddModule "festival" "sd_festival" "festival.conf"
#AddModule "flite" "sd_flite" "flite.conf"
#AddModule "ivona" "sd_ivona" "ivona.conf"
#AddModule "pico" "sd_pico" "pico.conf"
AddModule "pico" "sd_generic" "nanotts-generic.conf"
#AddModule "espeak-generic" "sd_generic" "espeak-generic.conf"
AddModule "espeak-ng-mbrola-generic" "sd_generic" "espeak-ng-mbrola-generic.conf"
#AddModule "espeak-mbrola-generic" "sd_generic" "espeak-mbrola-generic.conf"
AddModule "rhvoice" "sd_rhvoice" "rhvoice.conf"
#AddModule "swift-generic" "sd_generic" "swift-generic.conf"
#AddModule "epos-generic" "sd_generic" "epos-generic.conf"
#AddModule "dtk-generic" "sd_generic" "dtk-generic.conf"
#AddModule "pico-generic" "sd_generic" "pico-generic.conf"
#AddModule "ibmtts" "sd_ibmtts" "ibmtts.conf"
#AddModule "cicero" "sd_cicero" "cicero.conf"
#AddModule "kali" "sd_kali" "kali.conf"
#AddModule "mary-generic" "sd_generic" "mary-generic.conf"
# DO NOT REMOVE the following line unless you have
# a specific reason -- this is the fallback output module
# that is only used when no other modules are in use
#AddModule "dummy" "sd_dummy" ""
# The output module testing doesn't actually connect to anything. It
# outputs the requested commands to standard output and reads
# responses from stdandard input. This way, Speech Dispatcher's
# communication with output modules can be tested easily.
# AddModule "testing"
# The DefaultModule selects which output module is the default. You
# must use one of the names of the modules loaded with AddModule.
DefaultModule rhvoice
# The LanguageDefaultModule selects which output modules are prefered
# for specified languages.
#LanguageDefaultModule "en" "espeak"
#LanguageDefaultModule "cs" "festival"
#LanguageDefaultModule "es" "festival"
# -----CLIENT SPECIFIC CONFIGURATION-----
# Here you can include the files with client-specific configuration
# for different types of clients. They must contain one or more sections with
# this structure:
# BeginClient "emacs:*"
# DefaultPunctuationMode "some"
# ...and/or some other settings
# EndClient
# The parameter of BeginClient tells Speech Dispatcher which clients
# it should apply the settings to (it does glob-style matching, you can use
# * to match any number of characters and ? to match one character)
# There are some sample client settings
Include "clients/*.conf"
# The DisableAutoSpawn option will disable the autospawn mechanism.
# Thus the server will not start automatically on requests from the clients
# DisableAutoSpawn