* How Can I Switch Synthesizers on the Fly?
@ Chime Hart
` K0LNY_Glenn
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Chime Hart @ UTC (permalink / raw)
To: speakup
Hi All: I've asked others in other forums such as Slint-and-Debian
Accessibility, but so far I am striking out. I have a DecTalk U S B, but last
year I purchased some hi quality voices from Oralux, which are software speech.
When I have Allison installed, I can send her text through spd-say. Making
matters more complex, speech-dispatcher will not seem to install on this Debian
Sid machine. Guidance I've received from 2 sources, says I must install and
have espeak talking before I can switch to Allison, which is an embedded voice.
When I was running Slint on a laptop, Didier had created a talk-with command to
easily switch synths, but his script would need to be re written for Debian. In
addition,
if I unload the DecTalk module, I won't have speech, or would their be a way of
having both DecTalk and software speech at the same time? So, can some1 please
provide exact commands I can switch synths on the fly? I ran a locate for
softsynth but nothing found. Thanks so much in advance
Chime
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: How Can I Switch Synthesizers on the Fly? How Can I Switch Synthesizers on the Fly? Chime Hart @ ` K0LNY_Glenn ` K0LNY_Glenn ` Gregory Nowak 2 siblings, 0 replies; 14+ messages in thread From: K0LNY_Glenn @ UTC (permalink / raw) To: Chime Hart, speakup I sure would like to get speakup using the Oralux Voxin Evan or Nathan as well One suggestion I had was to install voxinup, but that may be an old unmaintained package. Glenn ----- Original Message ----- From: "Chime Hart" <chime@hubert-humphrey.com> To: <speakup@linux-speakup.org> Sent: Sunday, April 03, 2022 2:36 PM Subject: How Can I Switch Synthesizers on the Fly? Hi All: I've asked others in other forums such as Slint-and-Debian Accessibility, but so far I am striking out. I have a DecTalk U S B, but last year I purchased some hi quality voices from Oralux, which are software speech. When I have Allison installed, I can send her text through spd-say. Making matters more complex, speech-dispatcher will not seem to install on this Debian Sid machine. Guidance I've received from 2 sources, says I must install and have espeak talking before I can switch to Allison, which is an embedded voice. When I was running Slint on a laptop, Didier had created a talk-with command to easily switch synths, but his script would need to be re written for Debian. In addition, if I unload the DecTalk module, I won't have speech, or would their be a way of having both DecTalk and software speech at the same time? So, can some1 please provide exact commands I can switch synths on the fly? I ran a locate for softsynth but nothing found. Thanks so much in advance Chime ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? How Can I Switch Synthesizers on the Fly? Chime Hart ` K0LNY_Glenn @ ` K0LNY_Glenn ` Gregory Nowak 2 siblings, 0 replies; 14+ messages in thread From: K0LNY_Glenn @ UTC (permalink / raw) To: Chime Hart, speakup I'm using raspberrypi's latest image on an RPI Zero. I'm looking in: /etc/speech-dispatcher/speechd.conf and the default synth is espeak-ng Above that line, it says you must use one of the names added with AddModule. I don't find any other names even though I ran the Voxin-installer.sh for Evan. Seems like this is how to get it going. spd-say still uses espeak for me. Glenn ----- Original Message ----- From: "Chime Hart" <chime@hubert-humphrey.com> To: <speakup@linux-speakup.org> Sent: Sunday, April 03, 2022 2:36 PM Subject: How Can I Switch Synthesizers on the Fly? Hi All: I've asked others in other forums such as Slint-and-Debian Accessibility, but so far I am striking out. I have a DecTalk U S B, but last year I purchased some hi quality voices from Oralux, which are software speech. When I have Allison installed, I can send her text through spd-say. Making matters more complex, speech-dispatcher will not seem to install on this Debian Sid machine. Guidance I've received from 2 sources, says I must install and have espeak talking before I can switch to Allison, which is an embedded voice. When I was running Slint on a laptop, Didier had created a talk-with command to easily switch synths, but his script would need to be re written for Debian. In addition, if I unload the DecTalk module, I won't have speech, or would their be a way of having both DecTalk and software speech at the same time? So, can some1 please provide exact commands I can switch synths on the fly? I ran a locate for softsynth but nothing found. Thanks so much in advance Chime ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? How Can I Switch Synthesizers on the Fly? Chime Hart ` K0LNY_Glenn ` K0LNY_Glenn @ ` Gregory Nowak ` Chime Hart ` Didier Spaier 2 siblings, 2 replies; 14+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: speakup On Sun, Apr 03, 2022 at 12:36:25PM -0700, Chime Hart wrote: > last year I purchased some hi quality voices from Oralux, which are software > speech. When I have Allison installed, I can send her text through spd-say. > Making matters more complex, speech-dispatcher will not seem to install on > this Debian Sid machine. This is contradictory. Having spd-say working implies a working and installed speech-dispatcher. So, I will assume you have speech-dispatcher installed and spd-say installed and working on one machine, but not another. In that case saying speech-dispatcher won't install doesn't help us help you. > Guidance I've received from 2 sources, says I must > install and have espeak talking before I can switch to Allison, which is an > embedded voice. If these voices interface through speech-dispatcher, then that would make sense. However, the only way I know of to interface speakup to speech-dispatcher right now is through speechd-up. So, it seems like you would have to install speechd-up, get that working with speech-dispatcher and espeak-ng, and once you have that working get speech-dispatcher to use your purchased voices. > When I was running Slint on a laptop, Didier had created a > talk-with command to easily switch synths, but his script would need to be > re written for Debian. I can confirm the talkwith provided in the speakup-tools package for debian bullseye seems to be broken. Issuing talkwith soft comes back with: /usr/sbin/talkwith: 88: shift: can't shift that many I took a look at the script, but don't see where the problem is. > In addition, if I unload the DecTalk module, I won't > have speech, or would their be a way of having both DecTalk and software > speech at the same time? No, you can't have both your dectalk and software speech at the same time. > So, can some1 please provide exact commands I can > switch synths on the fly? I ran a locate for softsynth but nothing found. No surprise. What you want is the speakup_soft module. You would as root load that with: modprobe speakup_soft then start espeakup or speechd-up, depending on which one you use. I think that would be something like: systemctl speechd-up start or systemctl espeakup start I'm not a systemd user, so someone else can correct the above if they're not correct. Now, assuming you have both speakup_soft and speakup_dectlk kernel modules loaded, you can switch between them as root with: echo dectlk >/sys/accessibility/speakup/synth for the dectalk, and echo soft >/sys/accessibility/speakup/synth for software speech. Remember that before switching to dectlk you should stop espeakup or speechd-up, and after switching to soft you should start espeakup or speechd-up. I seem to recall you use csh, so maybe someone can roll all that into a csh script for you. Greg -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Gregory Nowak @ ` Chime Hart ` Gregory Nowak ` Joseph C. Lininger ` Didier Spaier 1 sibling, 2 replies; 14+ messages in thread From: Chime Hart @ UTC (permalink / raw) To: Gregory Nowak; +Cc: speakup Thank you Greg for your analysis. Yes I am in TCSH. When I run with sudo echo soft >/sys/accessibility/speakup/synth I get a permission error. As far as speechd-up if I run an apt install in Debian, it tries installing a 0.5 version from 2011, but errors out. Here is an output Preparing to unpack .../speechd-up_0.5~20110719-11_amd64.deb ... Unpacking speechd-up (0.5~20110719-11) ... Setting up speechd-up (0.5~20110719-11) ... Job for speechd-up.service failed because the control process exited with error code. See "systemctl status speechd-up.service" and "journalctl -xeu speechd-up.service" for details. invoke-rc.d: initscript speechd-up, action "restart" failed. x speechd-up.service - LSB: Interface between speakup and speech-dispatcher Loaded: loaded (/etc/init.d/speechd-up; generated) Active: failed (Result: exit-code) since Sun 2022-04-03 17:46:08 PDT; 82ms ago Docs: man:systemd-sysv-generator(8) Process: 1576174 ExecStart=/etc/init.d/speechd-up start (code=exited, status=1/FAILURE) CPU: 37ms Apr 03 17:46:06 chime speechd-up[1576174]: Starting Interface between speakup and speech-dispatcher : speechd-up Apr 03 17:46:06 chime speechd-up[1576190]: [Sun Apr 3 17:46:06 2022] speechd: Configuration has been read from "/etc/speechd-up.conf" Apr 03 17:46:06 chime speechd-up[1576174]: Starting speechd-up... Apr 03 17:46:06 chime speechd-up[1576174]: To work, speechd-up needs speakup and speakup_soft modules. Apr 03 17:46:06 chime speechd-up[1576174]: They are loaded automatically. If you don't want, type Apr 03 17:46:06 chime speechd-up[1576174]: rmmod speakup speakup_soft Apr 03 17:46:08 chime speechd-up[1576300]: failed! Apr 03 17:46:08 chime systemd[1]: speechd-up.service: Control process exited, code=exited, status=1/FAILURE Apr 03 17:46:08 chime systemd[1]: speechd-up.service: Failed with result 'exit-code'. Apr 03 17:46:08 chime systemd[1]: Failed to start LSB: Interface between speakup and speech-dispatcher. dpkg: error processing package speechd-up (--configure): installed speechd-up package post-installation script subprocess returned error exit status 1 Processing triggers for man-db (2.10.2-1) ... Processing triggers for install-info (6.8-4+b1) ... Errors were encountered while processing: speechd-up E: Sub-process /usr/bin/dpkg returned an error code (1) Back again live. If this list thinks 54lines is too long, I can write you off-list with that output. Thanks in advance. Chime ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Chime Hart @ ` Gregory Nowak ` Chime Hart ` Joseph C. Lininger 1 sibling, 1 reply; 14+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: speakup On Sun, Apr 03, 2022 at 05:51:44PM -0700, Chime Hart wrote: > sudo echo soft >/sys/accessibility/speakup/synth > I get a permission error. I don't know how the echo in bash differs from the echo in tcsh if at all. Did you modprobe the speakup_soft module? >As far as speechd-up if I run an apt install in > Debian, it tries installing a 0.5 version from 2011, but errors out. Here is > an output You mentioned you had trouble installing speech-dispatcher. To work, speechd-up requires an installed and configured speech-dispatcher. Do you have speech-dispatcher installed and working with espeak-ng? If you do, do you have a /var/log/speechd-up.log file? If yes, what does it say? Greg -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Gregory Nowak @ ` Chime Hart ` Gregory Nowak 0 siblings, 1 reply; 14+ messages in thread From: Chime Hart @ UTC (permalink / raw) To: Gregory Nowak; +Cc: speakup Hi Greg: I did not run any modprobe commands today. I guess unless I needed to string 2 of them together to switch off the DecTalk-and-enable soft synth, because otherwise I might not have speech. I suppose I could use 2 separate consoles for both commands. Anyway, here are the contents of /var/log/speechd-up.log [Sun Apr 3 17:46:06 2022] speechd: Speechd-speakup starts! [Sun Apr 3 17:46:06 2022] speechd: Error while openning the device in read/write mode 2,No such file or directory [Sun Apr 3 17:46:06 2022] speechd: Trying to open the device in the old way. [Sun Apr 3 17:46:06 2022] speechd: Error while openning the device in read mode 2,No such file or directory [Sun Apr 3 17:46:06 2022] speechd: ERROR! Unable to open soft synth device (/dev/softsynth) Chime ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Chime Hart @ ` Gregory Nowak 0 siblings, 0 replies; 14+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: Chime Hart; +Cc: speakup On Sun, Apr 03, 2022 at 09:57:45PM -0700, Chime Hart wrote: > [Sun Apr 3 17:46:06 2022] speechd: Error while openning the device in > read/write mode 2,No such file or directory > [Sun Apr 3 17:46:06 2022] speechd: Trying to open the device in the old way. > [Sun Apr 3 17:46:06 2022] speechd: Error while openning the device in read > mode 2,No such file or directory > [Sun Apr 3 17:46:06 2022] speechd: ERROR! Unable to open soft synth device > (/dev/softsynth) It looks like modprobe speakup_soft would solve this. Greg -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Chime Hart ` Gregory Nowak @ ` Joseph C. Lininger ` Chime Hart 1 sibling, 1 reply; 14+ messages in thread From: Joseph C. Lininger @ UTC (permalink / raw) To: Chime Hart, Gregory Nowak; +Cc: speakup I think your permission error might actually be a shell thing, not a speakup thing. Allow me to explain. I'm not trying to be condescending if you already understand the mechanics here, but I need to explain for my explanation of the problem to make sense. When you type: sudo echo soft >/sys/accessibility/speakup/synth What you're doing is to run the command "sudo echo soft" as root, then telling your existing shell to redirect its output to the file /sys/accessibility/speakup/synth. Here in lies the problem; your existing (non-root) shell handles that file write operation. Only "echo soft" is actually run as root. The file /sys/accessibility/speakup/synth. can only be written by root, so you get a permission error. I tested this on my own system by creating a root-owned file, then trying "sudo echo test" and redirecting to that file. I got a permission error, as expected. The only solution I know of is to create a shell script with the line sudo echo soft >/sys/accessibility/speakup/synth Then run that using sudo. That causes the write to take place as the root user, which is what you want. -- Joe On 4/3/2022 8:51 PM, Chime Hart wrote: > Thank you Greg for your analysis. Yes I am in TCSH. When I run with > sudo echo soft >/sys/accessibility/speakup/synth > I get a permission error. As far as speechd-up if I run an apt > install in Debian, it tries installing a 0.5 version from 2011, but > errors out. Here is an output > Preparing to unpack .../speechd-up_0.5~20110719-11_amd64.deb ... > Unpacking speechd-up (0.5~20110719-11) ... > Setting up speechd-up (0.5~20110719-11) ... > Job for speechd-up.service failed because the control process exited > with error code. > See "systemctl status speechd-up.service" and "journalctl -xeu > speechd-up.service" for details. > invoke-rc.d: initscript speechd-up, action "restart" failed. > x speechd-up.service - LSB: Interface between speakup and > speech-dispatcher > Loaded: loaded (/etc/init.d/speechd-up; generated) > Active: failed (Result: exit-code) since Sun 2022-04-03 17:46:08 > PDT; 82ms ago > Docs: man:systemd-sysv-generator(8) > Process: 1576174 ExecStart=/etc/init.d/speechd-up start > (code=exited, status=1/FAILURE) > CPU: 37ms > > Apr 03 17:46:06 chime speechd-up[1576174]: Starting Interface between > speakup and speech-dispatcher : speechd-up > Apr 03 17:46:06 chime speechd-up[1576190]: [Sun Apr 3 17:46:06 2022] > speechd: Configuration has been read from "/etc/speechd-up.conf" > Apr 03 17:46:06 chime speechd-up[1576174]: Starting speechd-up... > Apr 03 17:46:06 chime speechd-up[1576174]: To work, speechd-up needs > speakup and speakup_soft modules. > Apr 03 17:46:06 chime speechd-up[1576174]: They are loaded > automatically. If you don't want, type > Apr 03 17:46:06 chime speechd-up[1576174]: rmmod speakup speakup_soft > Apr 03 17:46:08 chime speechd-up[1576300]: failed! > Apr 03 17:46:08 chime systemd[1]: speechd-up.service: Control process > exited, code=exited, status=1/FAILURE > Apr 03 17:46:08 chime systemd[1]: speechd-up.service: Failed with > result 'exit-code'. > Apr 03 17:46:08 chime systemd[1]: Failed to start LSB: Interface > between speakup and speech-dispatcher. > dpkg: error processing package speechd-up (--configure): > installed speechd-up package post-installation script subprocess > returned error exit status 1 > Processing triggers for man-db (2.10.2-1) ... > Processing triggers for install-info (6.8-4+b1) ... > Errors were encountered while processing: > speechd-up > E: Sub-process /usr/bin/dpkg returned an error code (1) > Back again live. If this list thinks 54lines is too long, I can write > you off-list with that output. Thanks in advance. > Chime > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Joseph C. Lininger @ ` Chime Hart ` Joseph C. Lininger 0 siblings, 1 reply; 14+ messages in thread From: Chime Hart @ UTC (permalink / raw) To: Joseph C. Lininger; +Cc: Gregory Nowak, speakup Thank you Joe for a `wonderful explainer-and-I think you are most likely correct. We had similar results running an inflection script for the DecTalk. Chime ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Chime Hart @ ` Joseph C. Lininger ` Chime Hart 0 siblings, 1 reply; 14+ messages in thread From: Joseph C. Lininger @ UTC (permalink / raw) To: Chime Hart; +Cc: Gregory Nowak, speakup My explanation of how to fix it was slightly incorrect actually. I told you to run sudo under sudo, basically, which is not necessary. I've provided what should be a full working script below. Try this script. It won't matter that you're running this under tcsh, as long as you have a working bash on your system. I've set it up to automatically execute bash. -- begin script -- #!/bin/bash # Force a couple of environment variables to sane values for security reasons PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin IFS=" \t\n" # Change the synth echo "soft" > /sys/accessibility/speakup/synth -- end script -- You could also add lines to the script to run whatever support programs you need to make the synthesizer work once you've switched it in Speakup. Don't add "sudo" to any lines in this script since it's already running as root. You'll run the script itself using sudo. For example, if you were to name the script enablesoft, and it were in your path, you'd type this. sudo enablesoft Assuming the rest of the parts are working, that should do it for you. -- Joe On 4/4/2022 2:17 PM, Chime Hart wrote: > Thank you Joe for a `wonderful explainer-and-I think you are most > likely correct. We had similar results running an inflection script > for the DecTalk. > Chime > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Joseph C. Lininger @ ` Chime Hart 0 siblings, 0 replies; 14+ messages in thread From: Chime Hart @ UTC (permalink / raw) To: Joseph C. Lininger; +Cc: Gregory Nowak, speakup Thanks Joe, I put it in /usr/local/bin. An inquiree? Wouldn't I need to unload the DecTalk module before your script would work? Thanks in advance Chime ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Gregory Nowak ` Chime Hart @ ` Didier Spaier ` Didier Spaier 1 sibling, 1 reply; 14+ messages in thread From: Didier Spaier @ UTC (permalink / raw) To: speakup [-- Attachment #1: Type: text/plain, Size: 4315 bytes --] Well Chime_and_all, let me chime in. 1. Slint doesn't ship the talkwith script, but a different one, named speak-with. 2. talkwith can be found in the archive provided here: ftp://linux-speakup.org/pub/speakup/speakup-3.1.6.tar.bz2 in the tools directory I ran talkwith here (in a yet to be released Slint64-15.0) and it still works. I attach a copy of the script. I having both espeakup and speechd-up installed, As in the kernel I run currently has the speakup drivers provided as modules, I first typed as root: mopdrobe speakup_soft # this also loads the speakup module as a dependency then to start espeakup: talkwith soft espeakup then to start speechd-up talkwith spd then to start a my (non existing) Dec Talk: modprobe speakup_dectlk talkwith dectlk All worked, but I can't check the last command as I do not owning such hardware. So no need to fiddle manually with /sys if you use talkwith. I can't help with installating speechd-up in Debian that I do not use. PS I also typed: tcsh talkwith soft espeakup which displayed: Illegal variable name So Chime, I know that tcsh is the shell you are used to, but you certainly would do us a favor typing your commands from another one before requesting help. Here I use the bash shell, you could probably use ash or dash as well. Cheers, Didier Le 04/04/2022 à 02:37, Gregory Nowak a écrit : > On Sun, Apr 03, 2022 at 12:36:25PM -0700, Chime Hart wrote: >> last year I purchased some hi quality voices from Oralux, which are software >> speech. When I have Allison installed, I can send her text through spd-say. >> Making matters more complex, speech-dispatcher will not seem to install on >> this Debian Sid machine. > > This is contradictory. Having spd-say working implies a working and > installed speech-dispatcher. So, I will assume you have > speech-dispatcher installed and spd-say installed and working on one > machine, but not another. In that case saying speech-dispatcher won't > install doesn't help us help you. > >> Guidance I've received from 2 sources, says I must >> install and have espeak talking before I can switch to Allison, which is an >> embedded voice. > > If these voices interface through speech-dispatcher, then that would > make sense. However, the only way I know of to interface speakup to > speech-dispatcher right now is through speechd-up. So, it seems like > you would have to install speechd-up, get that working with > speech-dispatcher and espeak-ng, and once you have that working get > speech-dispatcher to use your purchased voices. > >> When I was running Slint on a laptop, Didier had created a >> talk-with command to easily switch synths, but his script would need to be >> re written for Debian. > > I can confirm the talkwith provided in the speakup-tools package for > debian bullseye seems to be broken. Issuing talkwith soft comes back > with: > > /usr/sbin/talkwith: 88: shift: can't shift that many > > I took a look at the script, but don't see where the problem is. > >> In addition, if I unload the DecTalk module, I won't >> have speech, or would their be a way of having both DecTalk and software >> speech at the same time? > > No, you can't have both your dectalk and software speech at the same time. > >> So, can some1 please provide exact commands I can >> switch synths on the fly? I ran a locate for softsynth but nothing found. > > No surprise. What you want is the speakup_soft module. You would as > root load that with: > > modprobe speakup_soft > > then start espeakup or speechd-up, depending on which one you use. I > think that would be something like: > > systemctl speechd-up start > or > systemctl espeakup start > > I'm not a systemd user, so someone else can correct the above if > they're not correct. > > Now, assuming you have both speakup_soft and speakup_dectlk kernel > modules loaded, you can switch between them as root with: > > echo dectlk >/sys/accessibility/speakup/synth > > for the dectalk, and > > echo soft >/sys/accessibility/speakup/synth > > for software speech. Remember that before switching to dectlk you > should stop espeakup or speechd-up, and after switching to soft you > should start espeakup or speechd-up. I seem to recall you use csh, so > maybe someone can roll all that into a csh script for you. > > Greg > > [-- Attachment #2: talkwith --] [-- Type: text/plain, Size: 3730 bytes --] #!/bin/sh # # talkwith -- switches speakup synthesizers on the fly # # Copyright (c) 2009 by the Speakup Team # Copyright (c) 2008, 2009 by Charles Hallenbeck # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # Requirements: Linux speakup 3.1.0 or later # # To install, copy this script to a directory on the execution path # e.g. /usr/sbin, or /usr/local/sbin. # This script should be run as root. # be sure we are root if [ $(id -ru) -gt "0" ]; then echo "$(basename $0) must be run as root." exit fi # Define some variables SPEAKUPDIR="/sys/accessibility/speakup" # make sure speakup is loaded if [ ! -d $SPEAKUPDIR ]; then echo "Speakup does not seem to be installed." exit fi # Check the command line for options if [ "$1" = "" ]; then echo echo "Usage: $(basename $0) <synth> <daemon> [options]" echo echo "synth - any synthesizer supported by speakup" echo echo "daemon - for the 'soft' synthesizer, this should be either" echo "spd for speechd-up, or espeakup to run espeakup." echo "For the other synthesizers, this is ignored." echo echo "options - for a software synthesizer, the rest of the command line" echo "is passed on to the daemon; otherwise it is ignored." echo echo "Talkwith does not install or remove modules, so make sure any" echo "required driver modules are installed or built into the kernel" echo "before running talkwith." echo exit fi NEWMOD=$1 shift # for backward compatibility if [ "$NEWMOD" = "spd" -o "$NEWMOD" = "espeakup" ]; then DAEMON=$NEWMOD NEWMOD=soft fi if [ "$NEWMOD" = "soft" ]; then if which espeakup > /dev/null 2>&1 ; then HAVE_ESPEAKUP=1 fi if which speechd-up > /dev/null 2>&1 ; then HAVE_SPD=1 fi if [ -z "$HAVE_ESPEAKUP" -a -z "$HAVE_SPD" ]; then echo "no software speech synthesizers are installed." exit fi if [ -z "$DAEMON" ]; then DAEMON=$1 shift fi if [ -z "$DAEMON" -a ! -z "$HAVE_ESPEAKUP" ]; then DAEMON="espeakup" elif [ -z "$DAEMON" -a ! -z "$HAVE_SPD" ]; then DAEMON="spd" fi if [ "$DAEMON" = "espeakup" -a -z "$HAVE_ESPEAKUP" ]; then echo "espeakup does not appear to be available." exit elif [ "$DAEMON" = "spd" -a -z "$HAVE_SPD" ]; then echo "speechd-up does not appear to be available." exit fi fi OLDMOD="$(cat $SPEAKUPDIR/synth)" echo "$NEWMOD" > $SPEAKUPDIR/synth 2> /dev/null if [ $? != 0 ]; then echo "Unable to switch to the $NEWMOD synthesizer." echo "This means that the driver is not built in, the module" echo "is not loaded, or $NEWMOD is not a valid synthesizer." exit 1 fi if [ "$OLDMOD" = "soft" ]; then if [ -f /var/run/espeakup.pid ]; then kill $(cat /var/run/espeakup.pid) 2> /dev/null if [ -f /var/run/espeakup.pid ]; then rm -f /var/run/espeakup.pid fi fi if [ -f /var/run/speechd-up.pid ]; then kill $(cat /var/run/speechd-up.pid) 2> /dev/null if [ -f /var/run/speechd-up.pid ]; then rm -f /var/run/speechd-up.pid fi fi sleep 2 fi if [ "$NEWMOD" = "none" ]; then exit elif [ "$NEWMOD" = "soft" ]; then if [ "$DAEMON" = "espeakup" ]; then espeakup $* elif [ "$DAEMON" = "spd" ]; then nice -n 5 speechd-up $* fi fi ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How Can I Switch Synthesizers on the Fly? ` Didier Spaier @ ` Didier Spaier 0 siblings, 0 replies; 14+ messages in thread From: Didier Spaier @ UTC (permalink / raw) To: speakup Correction: instead of talkwith spd read: talkwith soft spd Le 04/04/2022 à 23:19, Didier Spaier a écrit : > Well Chime_and_all, let me chime in. > > 1. Slint doesn't ship the talkwith script, but a different one, named speak-with. > > 2. talkwith can be found in the archive provided here: > ftp://linux-speakup.org/pub/speakup/speakup-3.1.6.tar.bz2 > in the tools directory > > I ran talkwith here (in a yet to be released Slint64-15.0) and it still works. > I attach a copy of the script. > > I having both espeakup and speechd-up installed, As in the kernel I run > currently has the speakup drivers provided as modules, I first typed as root: > mopdrobe speakup_soft # this also loads the speakup module as a dependency > then to start espeakup: > talkwith soft espeakup > then to start speechd-up > talkwith spd > then to start a my (non existing) Dec Talk: > modprobe speakup_dectlk > talkwith dectlk > All worked, but I can't check the last command as I do not owning such hardware. > > So no need to fiddle manually with /sys if you use talkwith. > > I can't help with installating speechd-up in Debian that I do not use. > > PS I also typed: > tcsh talkwith soft espeakup > which displayed: > Illegal variable name > So Chime, I know that tcsh is the shell you are used to, but you certainly would > do us a favor typing your commands from another one before requesting help. > > Here I use the bash shell, you could probably use ash or dash as well. > > Cheers, > Didier > > > Le 04/04/2022 à 02:37, Gregory Nowak a écrit : >> On Sun, Apr 03, 2022 at 12:36:25PM -0700, Chime Hart wrote: >>> last year I purchased some hi quality voices from Oralux, which are software >>> speech. When I have Allison installed, I can send her text through spd-say. >>> Making matters more complex, speech-dispatcher will not seem to install on >>> this Debian Sid machine. >> >> This is contradictory. Having spd-say working implies a working and >> installed speech-dispatcher. So, I will assume you have >> speech-dispatcher installed and spd-say installed and working on one >> machine, but not another. In that case saying speech-dispatcher won't >> install doesn't help us help you. >> >>> Guidance I've received from 2 sources, says I must >>> install and have espeak talking before I can switch to Allison, which is an >>> embedded voice. >> >> If these voices interface through speech-dispatcher, then that would >> make sense. However, the only way I know of to interface speakup to >> speech-dispatcher right now is through speechd-up. So, it seems like >> you would have to install speechd-up, get that working with >> speech-dispatcher and espeak-ng, and once you have that working get >> speech-dispatcher to use your purchased voices. >> >>> When I was running Slint on a laptop, Didier had created a >>> talk-with command to easily switch synths, but his script would need to be >>> re written for Debian. >> >> I can confirm the talkwith provided in the speakup-tools package for >> debian bullseye seems to be broken. Issuing talkwith soft comes back >> with: >> >> /usr/sbin/talkwith: 88: shift: can't shift that many >> >> I took a look at the script, but don't see where the problem is. >> >>> In addition, if I unload the DecTalk module, I won't >>> have speech, or would their be a way of having both DecTalk and software >>> speech at the same time? >> >> No, you can't have both your dectalk and software speech at the same time. >> >>> So, can some1 please provide exact commands I can >>> switch synths on the fly? I ran a locate for softsynth but nothing found. >> >> No surprise. What you want is the speakup_soft module. You would as >> root load that with: >> >> modprobe speakup_soft >> >> then start espeakup or speechd-up, depending on which one you use. I >> think that would be something like: >> >> systemctl speechd-up start >> or >> systemctl espeakup start >> >> I'm not a systemd user, so someone else can correct the above if >> they're not correct. >> >> Now, assuming you have both speakup_soft and speakup_dectlk kernel >> modules loaded, you can switch between them as root with: >> >> echo dectlk >/sys/accessibility/speakup/synth >> >> for the dectalk, and >> >> echo soft >/sys/accessibility/speakup/synth >> >> for software speech. Remember that before switching to dectlk you >> should stop espeakup or speechd-up, and after switching to soft you >> should start espeakup or speechd-up. I seem to recall you use csh, so >> maybe someone can roll all that into a csh script for you. >> >> Greg >> ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
How Can I Switch Synthesizers on the Fly? Chime Hart
` K0LNY_Glenn
` K0LNY_Glenn
` Gregory Nowak
` Chime Hart
` Gregory Nowak
` Chime Hart
` Gregory Nowak
` Joseph C. Lininger
` Chime Hart
` Joseph C. Lininger
` Chime Hart
` Didier Spaier
` Didier Spaier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).