G4UFS
Posts: 10
Joined: Tue Jan 08, 2013 1:24 am

Text to speech through a USB sound card

Mon Jan 14, 2013 7:07 pm

Hi,

I have installed a USB sound card and all is well using MPD but I need to use a text to speech engine that will play through the new USB card.

I have tried, Espeak, Festival, Flite and Google but none of them seem to be configurable to work with the add on sound card.

I believe that it is the sound card device number which is the root cause since configuring MPD to use h1,0 makes it play through it - My USB sound card number shows as "card 1" when I run aplay -l

I am happy to disable the onboard Pi sound card so if there were a way to either configure Espeak to use card 1 or configure the Pi so that the USB card is "0" I think it would all work.

Any ideas?

Dave

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Text to speech through a USB sound card

Tue Jan 15, 2013 2:14 pm

Search for 'USB audio' on this forum to find instructions how to configure the new device to be the first one. Maybe that would help?
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

G4UFS
Posts: 10
Joined: Tue Jan 08, 2013 1:24 am

Re: Text to speech through a USB sound card

Tue Jan 15, 2013 10:37 pm

Thanks for the reply and I have searched the forum but I cannot seem to find anything about making the USB sound card the first device? Have I missed something?

Regards
Dave


-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Text to speech through a USB sound card

Wed Jan 16, 2013 11:47 am

G4UFS wrote:Thanks for the reply and I have searched the forum but I cannot seem to find anything about making the USB sound card the first device? Have I missed something?

Regards
Dave
Well, coming up with suitable search keywords is sometimes hard - mostly because there is too much waffle on the internet...

Cloudcentric pointed the relevant wiki section - the 'alsa-base.conf' bit there.
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

G4UFS
Posts: 10
Joined: Tue Jan 08, 2013 1:24 am

Re: Text to speech through a USB sound card

Wed Jan 16, 2013 7:04 pm

Thanks guys. Initially, I missed the top part of the page where it discusses making the card the first one to be detected. Oopps.

I will test this evening and see what I get

Dave

aguirrech
Posts: 22
Joined: Sun Sep 02, 2012 11:51 am

Re: Text to speech through a USB sound card

Sun May 12, 2013 7:50 pm

USB sound card must be fixed as hw 0,0 in " /etc/modprobe.d/alsa-base.conf " :

options snd-usb-audio index=0

And make the usb card as the default device in ” /etc/asound.conf ”
Just erase all and replace with this :

pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}

maxchess42
Posts: 14
Joined: Thu May 23, 2013 1:11 pm
Location: Guildford, UK
Contact: Website

Re: Text to speech through a USB sound card

Thu May 29, 2014 2:26 pm

I had a similar problem with a USB card.
At first neither my USB attached mic or speakers worked.
Then I checked what devices I had using
$ aplay –l

The command the shows the RPI default card as 0 and the USB device as 1
So I put the following in my config file:

pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}

Note I have Card 1 not 0

After that aplay and a record worked fine through the USB device, but when I installed Espeak it stubbornly refused to find the USB device, gave errors and sent the output through the on-board sound output.

Does anyone know how to fix this, all the discussions I have found so far suggest card 0 might be hard coded into espeak.
Pi A's, Bs, 2s, 3s & zeros 's in Birdboxes, Chess Sets, games, RuneAudio servers Arduinos everywhere else

See: http://www.chess.fortherapy.co.uk\

maxchess42
Posts: 14
Joined: Thu May 23, 2013 1:11 pm
Location: Guildford, UK
Contact: Website

Re: Text to speech through a USB sound card

Thu May 29, 2014 2:39 pm

Ignore my last post, just re-read the previous post and the bit about making the USB as device 0. Works great now with all the stuff as per the original post.
Pi A's, Bs, 2s, 3s & zeros 's in Birdboxes, Chess Sets, games, RuneAudio servers Arduinos everywhere else

See: http://www.chess.fortherapy.co.uk\

Return to “General discussion”