espeak

I am trying to pass some strings trough espeak and it reads them but I get “segmentation fault”

北城余情 提交于 2019-12-24 21:35:23
问题 This is my code. I want to get 5 strings from the user and espeak reads each of them when user interred it. But I get segmentation fault(core dumped) message. #include <string.h> #include <malloc.h> #include <espeak/speak_lib.h> int test() { 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"}; int i=0; char text[1000]; unsigned int

Running a command that is stored in a variable (including pipes and redirects)

北战南征 提交于 2019-12-24 11:42:06
问题 I'm writing a script that functions as a "talking terminal" (you type in commands and it says the output) and so far my code is: #!/bin/bash while [ 1=1 ]; do echo -n "~>" read COMMAND espeak "$($COMMAND)" done and it works for simple commands: bash$ ./talkingterminal.sh ~> ls # espeak says "talkingterminal.sh" but when I use pipes etc: bash$ ./talkingterminal.sh ~>ip addr | grep inet Command "|" is unknown, try "ip addr help". ~> and that command works in bash and gives the expected output.

How to use python Popen with a espeak and aplay

喜夏-厌秋 提交于 2019-12-22 11:14:31
问题 I'm trying to call espeak -ves -s130 'HEY' --stdout | aplay -D 'sysdefault' through subprocess.Popen, with espeak_process = Popen(["espeak", "-ves -s100 'HEY' --stdout"], stdout=subprocess.PIPE) aplay_process = Popen(["aplay", "-D 'sysdefault'"], stdin=espeak_process.stdout, stdout=subprocess.PIPE) But it doesn't work ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM 'sysdefault' aplay: main:682: audio open error: No such file or directory Any idea how to implement this? Thx 回答1: Your

How to use espeak with python

不羁的心 提交于 2019-12-18 05:06:33
问题 I want to use espeak(http://espeak.sourceforge.net) with python2.7.0-32 bit in windows7. Additionally, I also want to save the audio files generated by espeak. 回答1: I tried to install this package in Windows 8 but couldn't really get it in the first few attempts. But this is what i did to get espeak to work with python Download and Install espeak for Windows from here Add the eSpeak/command-line folder to PATH so that the command espeak is available Call espeak commands using python module

How to programmatically send a unix socket command to a system server autospawned by browser or convert JavaScript to C++ souce code for Chromium?

让人想犯罪 __ 提交于 2019-12-17 16:46:21
问题 Presently the implementation of the Web Speech API Specification by Chromium and Firefox does not support parsing Speech Synthesis Markup Language (SSML) when SSML is set at text property of SpeechSyntheisUtterance instance and passed to window.speechSynthesis.speak() call; see SSML parsing implementation at browsers; 5.2.3 SpeechSynthesisUtterance Attributes; How to set options of commands called by browser?. Chromium source code for the unix socket connect to speech-dispatcher connection

eSpeak to mp3 in php on both windows and linux (online text-to-speech)

妖精的绣舞 提交于 2019-12-11 18:58:38
问题 I want to implement simple text-to-speech script in my web application that would dynamically generate mp3's out of given texts. It needs to run in both: my local WAMP server on windows and my online linux server eSpeak doesn't offer the highest quality in sound but at least a strong support in languages, simple implementation and also it's free. So after a little digging i realized there are not much examples of integrating it into php. I concluded StackOverflow should contain a simple

How to find if espeak ended the speech?

偶尔善良 提交于 2019-12-11 16:57:26
问题 I want to use espeak in my program. I'd like to know when espeak stops speaking. Are there any flags or functions to check? Let's consider this is my program: Line 1 espeak Line 2 When I execute this code, espeak starts to say "hello, this is espeak" but before it ends, Line 2 of code is executed, and I don't like this. I am looking for a way to pause the program until espeak ends the speaking! EDIT: This is my complete code, I use pocketsphinx to recognize what the user say, then save it

./speaks: error while loading shared libraries: libespeak-ng.so.1: cannot open shared object file: No such file or directory

99封情书 提交于 2019-12-11 05:08:52
问题 I have downloaded the last version of espeak-ng from github, and did ./autogen.sh ./configure make make install . so I wrote a test program as you can see below: #include <string.h> #include <vector> #include </usr/local/include/espeak-ng/speak_lib.h> int samplerate; // determined by espeak, will be in Hertz (Hz) const int buflength = 200; // passed to espeak, in milliseconds (ms) std::vector<short> sounddata; int SynthCallback(short *wav, int numsamples, espeak_EVENT *events) { if (wav ==

pyttsx and gTTS module errors

纵饮孤独 提交于 2019-12-10 17:47:10
问题 windows 10-64bit I'm trying to use some text-to-speech tool to read text from lines of .txt document, something like this: so with pyttsx: import pyttsx engine = pyttsx.init() engine.say('my voice') engine.runAndWait() I got this error: Traceback (most recent call last): File "...", line 1, in <module> import pyttsx File "/.../pyttsx/__init__.py", line 18, in <module> from engine import Engine ImportError: No module named 'engine' now gTTS, available as gtts_token, so how to use it? because

How to use python Popen with a espeak and aplay

不打扰是莪最后的温柔 提交于 2019-12-05 20:20:20
I'm trying to call espeak -ves -s130 'HEY' --stdout | aplay -D 'sysdefault' through subprocess.Popen, with espeak_process = Popen(["espeak", "-ves -s100 'HEY' --stdout"], stdout=subprocess.PIPE) aplay_process = Popen(["aplay", "-D 'sysdefault'"], stdin=espeak_process.stdout, stdout=subprocess.PIPE) But it doesn't work ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM 'sysdefault' aplay: main:682: audio open error: No such file or directory Any idea how to implement this? Thx Your example is the equivalent of typing this in the shell: $ espeak '-ves -s100 \'HEY\' --stdout' $ aplay '-D \