gooofy/py-espeak-ng

No Speech

jsl303 opened this issue · 4 comments

I'm on Raspberry pi with 2020-05-27-raspios-buster-lite-armhf.img.
I'm trying to get speech to come through Bluealsa.
If I run 'espeak-ng "hello"' in terminal, I hear the speech on my bluetooth speaker.
If I play audio through pyaudio on Python, I also hear it on my bluetooth speaker.

However, if I run 'esng.say("Hello World!")', I hear no speech.
Instead, I get <callable_iterator object at 0xb649b650>.

Here's ~/.asound.
pcm.!default {
type plug
slave.pcm {
type bluealsa
device "11:aa:22:bb:33:cc"
profile "a2dp"
}
}

Also synth_wav returns empty.
wavs = esng.synth_wav('Hello World!')
len(wavs)
It returns 0.

hi
I had the same issue, but then saw issue #2, where you have to specify the voice to use before calling esng.say(). That did fix the issue for me.
If that works with you, you may want to close the issue.

↑ indeed, this was true for me as well! Needed to set a voice or I'd get zero-length iterators.

Hi everybode
I have tried the code below, in colab, but no luck, it is empty for me

from espeakng import ESpeakNG
import wave 
import io
esng = ESpeakNG()
esng.voice = 'english-us'
esng.pitch = 32
esng.speed = 150 
wavs = esng.synth_wav('Hello World!') 
print(wavs)

it returns
b''

Any idea of what may be happening? any help is welcome, thanks