8

I saw many tts engines, like festival, espeak, etc.. I wanted to know if any of these could select the output device, like an USB sound device. If it's possible, what the command line to make it happens?

SlySven
3,6311 gold badge20 silver badges46 bronze badges
asked Jun 14, 2013 at 11:41

1 Answer 1

4

I don't have my Pi in reach right now, but you can do it like this: First, find out which playback devices you have. You can do this with aplay:

$ aplay -L
null
 Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
 HDA Intel PCH, ALC892 Analog
 Default Audio Device
front:CARD=PCH,DEV=0
 HDA Intel PCH, ALC892 Analog
 Front speakers
surround40:CARD=PCH,DEV=0
 HDA Intel PCH, ALC892 Analog
 4.0 Surround output to Front and Rear speakers
...

This is for my Linux PC, but the Raspberry Pi will show something similar. Then tell you TTS tool to output to stdout, which is easy for espeak. Pipe the output through aplay, with the specified device:

espeak "Hello world" --stdout | aplay -D 'default'

Instead of default, you can use any of the listed device names.

answered Jun 14, 2013 at 14:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.