Skip to content

Sound.speak("text").wait() terminating before finished #461

Description

@ddemidov

See ev3dev/ev3dev#1081

The problem is that Sound.speak() returns espeak instead of play here:

def speak(text, espeak_opts='-a 200 -s 130'):
"""
Speak the given text aloud.
"""
with open(os.devnull, 'w') as n:
cmd_line = '/usr/bin/espeak --stdout {0} "{1}"'.format(espeak_opts, text)
espeak = Popen(shlex.split(cmd_line), stdout=PIPE)
play = Popen(['/usr/bin/aplay', '-q'], stdin=espeak.stdout, stdout=n)
return espeak

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions