Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with espeak
#1
Hi all!

I've been using espeak for one of my projects. I noticed a while back that sometimes it sounded like the synth voice would stutter or sound garbled. I thought the problem was caused because I had other stuff playing (via pygame) at the same time as the synth voice was speaking, but I've tried to play the synth without any music or sounds and the problem hasn't gone away Think .

import pygame

APP_NAME = "Fitness Robot Trainer"

pygame.mixer.pre_init(44100, -16, 2, 1024)
pygame.init()

from espeak import espeak

sentence = "get ready for some situp twists"
phrases = ["get ready", "for some", "situp twists"]


for words in phrases:
    espeak.synth(words)
    while espeak.is_playing():
        pygame.time.wait(100)

# The stutter is made near the end of the sentence 'twists', the longer
# the sentence the worse it gets.
input("Press [Enter] to put it together and say the sentence. ")
espeak.synth(sentence)
It seems to manage just fine when I send it a couple of words at a time, but when I send it a sentence it struggles. I used the python help command to see if there were any options I could use to configure it Huh but its not easy.

Also, Angel I would love to see some examples of python code that configures the synth to use a different voice, or speak slower or faster.

Thanks,

MH.

Hardware: RaspberryPi2B+
OS: Debain
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020