Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

3 votes
1 answers
3363 views
Speech Dispatcher failing to start on Arch Linux
I use `pulseaudio` on my system. I have installed the tts applications `espeak` and `flite`. Both of which work perfectly when called from the commandline, but fail to work when called via `spd-say`. I need them to work via `spd-say`, because I want to configure a TTS engine for Okular. Here is the...
I use pulseaudio on my system. I have installed the tts applications espeak and flite. Both of which work perfectly when called from the commandline, but fail to work when called via spd-say. I need them to work via spd-say, because I want to configure a TTS engine for Okular. Here is the output for sudo systemctl status speech-dispatcherd.service
● speech-dispatcherd.service - Speech-Dispatcher an high-level device independent layer for speech synthesis.
   Loaded: loaded (/usr/lib/systemd/system/speech-dispatcherd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2019-01-18 00:30:18 IST; 2min 9s ago
  Process: 1067 ExecStart=/usr/bin/speech-dispatcher -d (code=exited, status=1/FAILURE)

Jan 18 00:30:18 archlinux-hostname systemd: Starting Speech-Dispatcher an high-level device independent layer for speech synthesis....
Jan 18 00:30:18 archlinux-hostname speech-dispatcher: [Fri Jan 18 00:30:18 2019 : 363344] speechd: Speech Dispatcher 0.8.8 starting
Jan 18 00:30:18 archlinux-hostname systemd: speech-dispatcherd.service: Control process exited, code=exited, status=1/FAILURE
Jan 18 00:30:18 archlinux-hostname systemd: speech-dispatcherd.service: Failed with result 'exit-code'.
Jan 18 00:30:18 archlinux-hostname systemd: Failed to start Speech-Dispatcher an high-level device independent layer for speech synthesis..
Here is the output for journalctl -xe
➜ journalctl -xe

Jan 18 00:30:18 archlinux-hostname sudo:       codingcoffee : TTY=pts/1 ; PWD=/home/codingcoffee ; USER=root ; COMMAND=/usr/bin/systemctl restart speech-dispatcherd.service
Jan 18 00:30:18 archlinux-hostname sudo: pam_unix(sudo:session): session opened for user root by codingcoffee(uid=0)
Jan 18 00:30:18 archlinux-hostname systemd: Starting Speech-Dispatcher an high-level device independent layer for speech synthesis....
-- Subject: A start job for unit speech-dispatcherd.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel 
-- 
-- A start job for unit speech-dispatcherd.service has begun execution.
-- 
-- The job identifier is 4254.
Jan 18 00:30:18 archlinux-hostname speech-dispatcher: [Fri Jan 18 00:30:18 2019 : 363344] speechd: Speech Dispatcher 0.8.8 starting
Jan 18 00:30:18 archlinux-hostname systemd: speech-dispatcherd.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel 
-- 
-- An ExecStart= process belonging to unit speech-dispatcherd.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Jan 18 00:30:18 archlinux-hostname systemd: speech-dispatcherd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel 
-- 
-- The unit speech-dispatcherd.service has entered the 'failed' state with result 'exit-code'.
Jan 18 00:30:18 archlinux-hostname systemd: Failed to start Speech-Dispatcher an high-level device independent layer for speech synthesis..
-- Subject: A start job for unit speech-dispatcherd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel 
-- 
-- A start job for unit speech-dispatcherd.service has finished with a failure.
-- 
-- The job identifier is 4254 and the job result is failed.
Jan 18 00:30:18 archlinux-hostname audit: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=speech-dispatcherd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=fail>
Jan 18 00:30:18 archlinux-hostname kernel: audit: type=1130 audit(1547751618.383:189): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=speech-dispatcherd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=>
Jan 18 00:30:18 archlinux-hostname sudo: pam_unix(sudo:session): session closed for user root
Jan 18 00:30:19 archlinux-hostname sudo:       codingcoffee : TTY=pts/1 ; PWD=/home/codingcoffee ; USER=root ; COMMAND=/usr/bin/systemctl status speech-dispatcherd.service
Jan 18 00:30:19 archlinux-hostname sudo: pam_unix(sudo:session): session opened for user root by codingcoffee(uid=0)
Jan 18 00:30:19 archlinux-hostname sudo: pam_unix(sudo:session): session closed for user root
Here is the output to my speech-dispatcher config file ~/.config/speech-dispatcher/speechd.conf
LogLevel  3
LogDir  "default"
DefaultRate   0
DefaultPitch   0  
DefaultVolume 100
DefaultLanguage   en
AudioOutputMethod   pulse
DefaultModule   espeak
Include "clients/*.conf"
codingCoffee (133 rep)
Jan 17, 2019, 08:32 PM • Last activity: Aug 2, 2025, 11:08 AM
5 votes
1 answers
2570 views
Sound output not working properly in chroot
So I have a 64-bit Linux Mint 17 system and I am trying to set up a chroot environment with a 64-bit Ubuntu 12.04-based system (actually something called Vinux, an Ubuntu remix). The problem is that an application using the sound output (both systems use pulseaudio) from within the chroot is not hea...
So I have a 64-bit Linux Mint 17 system and I am trying to set up a chroot environment with a 64-bit Ubuntu 12.04-based system (actually something called Vinux, an Ubuntu remix). The problem is that an application using the sound output (both systems use pulseaudio) from within the chroot is not heard until I switch back to the console where my host system is running (namely, my host's X server; haven't tried the text consoles). Here are the steps that I am using to set up, enter and test the chroot. The chroot filesystem is mounted on /mnt: sudo mount --rbind /dev /mnt/dev sudo mount --rbind /proc /mnt/proc sudo mount --rbind /sys /mnt/sys sudo mount --rbind /tmp /mnt/tmp sudo mount --rbind /run /mnt/run sudo mount --bind /var/lib/dbus /mnt/var/lib/dbus sudo chroot /mnt now in chroot as root user: su export XDG_RUNTIME_DIR=/run/user/1000 startx -- :1 automatic switch to second X server Ctrl-Alt-T to open terminal now in terminal cat /dev/urandom | grep -ao "[a-z]" | espeak sound only plays when I press the Ctrl-Alt-... sequence to switch back to my host X server. I have read every page that I can find about setting up pulseaudio for a chroot but none of the instructions cause any change in this behaviour. EDIT: Got it to work such that the sound output from the chroot plays, but now any sound output from the host system is suspended until the chroot session ends, not matter which console I switch to.
micheal65536 (247 rep)
Jul 12, 2015, 09:32 AM • Last activity: Jul 2, 2023, 06:08 AM
2 votes
2 answers
467 views
How do I redirect output from a command line app (howie AIML interpreter) to another command line app (espeak)?
I'd like to interact with an AIML interpreter that runs on the command line (Howie) using standard input and have the output played using espeak. I've tried: > ./runme.py | espeak --stdin No success yet.
I'd like to interact with an AIML interpreter that runs on the command line (Howie) using standard input and have the output played using espeak. I've tried: > ./runme.py | espeak --stdin No success yet.
Yusufk (171 rep)
Jan 9, 2014, 03:49 PM • Last activity: Jul 11, 2020, 09:44 AM
1 votes
0 answers
864 views
executing commands when network goes down or up
I'm trying to get the Network Manager dispatcher to run a script when the network interface comes up or goes down. I want to execute an espeak command when the connection goes up or goes down. ***I can get it to write to the file /tmp/log but I don't hear any sound from the espeak command*** even th...
I'm trying to get the Network Manager dispatcher to run a script when the network interface comes up or goes down. I want to execute an espeak command when the connection goes up or goes down. ***I can get it to write to the file /tmp/log but I don't hear any sound from the espeak command*** even though I can type it directly on the terminal and it works. The way I test it is by disconnecting my usb network card (this is the only network card I have in the machine) I've place the executable file in /etc/NetworkManager/dispatcher.d (it's called **02-ifupdowntest**) -rwxr-xr-x 1 root root 2293 Mar 26 2018 01-ifupdown -rwxr-xr-x 1 root root 534 Jan 23 16:42 02-ifupdowntest -rwxr-xr-x 1 root root 5383 Mar 27 2018 99tlp-rdw-nm >See contents of **02-ifupdowntest** below: #!/bin/bash -e if [ "$2" = "up" ]; then echo "date" > /tmp/log echo "$1" >> /tmp/log echo "$2" >> /tmp/log echo "/usr/bin/espeak "network up"" fi if [ "$2" = "down" ]; then echo "$2" >> /tmp/log echo "/usr/bin/espeak "network down"" fi exit 0 I'm using Ubuntu 18.04 64bit Linux
Rick T (357 rep)
Jan 23, 2020, 10:20 PM • Last activity: Jan 24, 2020, 04:32 AM
3 votes
2 answers
1613 views
Access highlighted text from script?
Is it possible to access highlighted text via a shell script? I want to make a keyboard shortcut to use 'espeak' to read highlighted text.
Is it possible to access highlighted text via a shell script? I want to make a keyboard shortcut to use 'espeak' to read highlighted text.
Philip Kirkbride (10746 rep)
Oct 25, 2016, 12:38 AM • Last activity: Oct 19, 2019, 06:13 PM
-2 votes
1 answers
1923 views
Is using system() function inside C++ code a fast way as using source codes?
As I know I can use `system()` function to using Linux terminal's commands inside my C++ code. For example `system("aplay sound.wav");`. I don't know can I write all the Linux commands like this or not, but `aplay` works. I want to use `espeak` in my C++ program.I like espeak reads each string I pas...
As I know I can use system() function to using Linux terminal's commands inside my C++ code. For example system("aplay sound.wav");. I don't know can I write all the Linux commands like this or not, but aplay works. I want to use espeak in my C++ program.I like espeak reads each string I pass trough it(something like what aplay does in above code but respect to "strings"). Is it better to call it by system() function or it's better to write a code like this inside my C++ code and change the char* text whenever I wanted to read a new string?: #include #include #include espeak_POSITION_TYPE position_type; espeak_AUDIO_OUTPUT output; char *path=NULL; int Buflength = 500, Options=0; void* user_data; t_espeak_callback *SynthCallback; espeak_PARAMETER Parm; char Voice[] = {"English"}; char *text = {"this is a english test"}; unsigned int Size,position=0, end_position=0, flags=espeakCHARS_AUTO, *unique_identifier; int main(int argc, char* argv[] ) { output = AUDIO_OUTPUT_PLAYBACK; int I, Run = 1, L; espeak_Initialize(output, Buflength, path, Options ); espeak_SetVoiceByName(Voice); const char *langNativeString = "en"; //Default to US English espeak_VOICE voice; memset(&voice, 0, sizeof(espeak_VOICE)); // Zero out the voice first voice.languages = langNativeString; voice.name = "US"; voice.variant = 2; voice.gender = 1; espeak_SetVoiceByProperties(&voice); Size = strlen(text)+1; espeak_Synth( text, Size, position, position_type, end_position, flags, unique_identifier, user_data ); espeak_Synchronize( ); return 0; } Which one is faster?
user3486308 (609 rep)
Nov 26, 2017, 12:24 PM • Last activity: Apr 6, 2019, 02:12 AM
2 votes
1 answers
2526 views
How to preload my .so every time an application executes?
I've successfully used a hook under Linux with this article: http://hackerboss.com/overriding-system-functions-for-fun-and-profit/ Now I want to make my .so file load every time `espeak` loads up, no matter if it's called from another application. How do I do that?
I've successfully used a hook under Linux with this article: http://hackerboss.com/overriding-system-functions-for-fun-and-profit/ Now I want to make my .so file load every time espeak loads up, no matter if it's called from another application. How do I do that?
blez (183 rep)
May 7, 2012, 11:47 AM • Last activity: Sep 9, 2018, 09:18 PM
3 votes
1 answers
1954 views
Espeak showing some warnings and Input output error
I am running `espeak` on Linux Mint 14. Whenever I try to run it, it shows following warnings ( Not errors as it works correctly ). ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:...
I am running espeak on Linux Mint 14. Whenever I try to run it, it shows following warnings ( Not errors as it works correctly ). ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started I searched on the net about these kinds of error and got this answer. I tried using this : espeak "Hello, I am Espeak, the voice synthesizer" 2>/dev/null This shows no warnings but when I use it within my code, It shows the error.
tusharmakkar08 (1985 rep)
May 16, 2013, 05:49 AM • Last activity: Jul 22, 2018, 02:34 AM
1 votes
1 answers
1059 views
How can I emphasize certain words spoken by espeak?
I used espeak to speak some text in plain text files. However, some words in the file are emphasized using asterisks ("did you mean the \*green* beans?"), and espeak will read them out literally ("did you mean the asterisk green asterisk beans?"). What should I replace the asterisks with, in order t...
I used espeak to speak some text in plain text files. However, some words in the file are emphasized using asterisks ("did you mean the \*green* beans?"), and espeak will read them out literally ("did you mean the asterisk green asterisk beans?"). What should I replace the asterisks with, in order to have espeak read them emphasized correctly?
Luc (3960 rep)
May 5, 2018, 08:45 PM • Last activity: May 5, 2018, 08:54 PM
3 votes
2 answers
221 views
Chaining Linux terminal commands
I have a function that has my EV3 speak speak(){ espeak -a 200 -s 130 -v la --stdout "$@" | aplay; } it works by simply speak "Say this" I want it to say the contents of a file, so I have this printf '%b\n' "$(cat joyPhrase)" How do get the output from the printf into the quotes for speak?
I have a function that has my EV3 speak speak(){ espeak -a 200 -s 130 -v la --stdout "$@" | aplay; } it works by simply speak "Say this" I want it to say the contents of a file, so I have this printf '%b\n' "$(cat joyPhrase)" How do get the output from the printf into the quotes for speak?
OrigamiEye (223 rep)
May 3, 2016, 07:07 PM • Last activity: Jan 24, 2018, 12:53 PM
4 votes
1 answers
593 views
How to prevent xbindkeys from consuming keyboard messages?
I thought I can get `xbindkeys` run this command: espeak -v en "a" whenever the key a is pressed. But `xbindkeys` expropriates (*consumes*) the keyboard message `a`. I thought this may fix: espeak -v en "a" killall xbindkeys xdotool key a xbindkeys This fixes that problem. But it creates new ones: S...
I thought I can get xbindkeys run this command: espeak -v en "a" whenever the key a is pressed. But xbindkeys expropriates (*consumes*) the keyboard message a. I thought this may fix: espeak -v en "a" killall xbindkeys xdotool key a xbindkeys This fixes that problem. But it creates new ones: Slowing down everything, inappropriate place for a, etc Is there a better solution?
Minimus Heximus (2537 rep)
Mar 29, 2014, 01:24 PM • Last activity: Jan 24, 2018, 12:37 PM
4 votes
3 answers
2703 views
how to get espeak to continuously speak stdout piped from netcat
I have a Raspberry pi 3 that I want to use as a sort of PA system, using espeak to announce stuff piped from netcat, which is getting input from a remote server. On the pi, I initiate the listener like so: nc -lk 7777 | espeak and on the remote remote machine (a Macbook pro for testing purposes) I i...
I have a Raspberry pi 3 that I want to use as a sort of PA system, using espeak to announce stuff piped from netcat, which is getting input from a remote server. On the pi, I initiate the listener like so: nc -lk 7777 | espeak and on the remote remote machine (a Macbook pro for testing purposes) I issue echo "hello world" | nc raspberrypi 7777 It speaks the first thing I send, but if I try sending more stuff, it won't output speech, and there's no text written to the terminal, either. It's as if espeak has stopped, even though netcat is still running. I've tried initiating the listener without a pipe, so that it just puts stdout on the terminal, and I can spam the echo | nc command from the Mac and have all of it appear as expected on the pi. I've tried googling a solution, and there's stuff about continuously feeding the stdout from an nc listener to a data file, but I can't see anything relating to espeak specifically. I've also tried piping nc to other commands like tee and logsave, and they behave as I expect, continuously writing the output of nc to a file. **UPDATE** I noted in a comment below that I was able to get the setup mentioned above to work swimmingly with my beefy desktop running Linux Mint as the listener and an almost-as-beefy server box running Ubuntu server as the client sending the echoes. This made me think that something about the Pi, not nc, was to blame. My suspicion is that it has something to do with the Pi's audio, so I've tried a few things: * Streaming an mp3 radio station over wifi through both HDMI and the 3.5 mm jack using mplayer resulted in massive stuttering, although I could kind of make out what was going on. Trying it over ethernet yielded the same result. * Using mplayer to play a locally stored mp3 file over HDMI also resulted in the same stuttering. * using aplay to play the same mp3 over HDMI produced loud white noise. I also tried espeak in interactive mode, and the same problem manifests. It says the first line I type, but ignores all subsequent lines. Sometimes, while messing with nc as above, it'll rapidly spit out all the lines I've tried feeding it at once.
user2368261 (41 rep)
Apr 28, 2016, 01:12 AM • Last activity: Jan 24, 2018, 12:29 PM
Showing page 1 of 12 total questions