[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

retrieving synthesized auio data?

From: A
Subject: retrieving synthesized auio data?
Date: Fri, 5 Feb 2010 10:26:20 +0200

One more thing that took me some time to dig out of the global
misinformation network:
 pcm.teemp3 {
    type file
    format "raw"
    slave.pcm "default"
    file '|/home/user/bin/lame -S -r -s %r --bitwidth %b -m j -
This or something like this should create files for every stream it
gets. I haven't tested it yet though because my ALSA library is too
old for this configuration. So you may need to play with it a bit.

On Fri, Feb 5, 2010 at 10:19 AM, A <avalon at friendofpooh.com> wrote:
> On Fri, Feb 5, 2010 at 9:28 AM, Tim Cross <tcross at rapttech.com.au> wrote:
>> If all that is needed is to catch audio output into a .wav file (or similar),
>> it can be done very easily with ALSA using a .asoundrc file. For example, 
>> this
>> is how I had mine configured so that all sound output sent to the audio card
>> was captured
>> ?pcm.copy {
>> ? ? type plug
>> ? ? slave {
>> ? ? ? ? pcm "hw"
>> ? ? }
>> ?route_policy copy
>> }
>> this will generate a wav file, which you can redirect to something like lame
>> and generate an mp3 file to save space. By default, it writes to a file in 
>> the
>> /var hierarchy (see the ALSA plugins docs for more details).
> I think that will do nothing interesting.
> Try something like:
> pcm.teeraw {
> ? type empty
> ? slave.pcm "tee:default,'/tmp/out.raw',raw"
> ? # 48000 S16_LE 2ch (aplay -t raw -f dat)
> }
> Recent alsa can output wav but I'm on a debian ;) You can change
> "default" to whatever pcm you like (including null). Of course that's
> again not what you want... I know alsa has a shared memory plug-in so
> instead of a file, it outputs to a shm location what can be more
> convenient for you. But it should be as easy for you to read that file
> (you can even create it as fifo).
> I see a value for SD API to return the audio but seems like it just
> cannot work with every possible TTS engine out there. And some people
> are forced to use closed source ones due to unavailability of free
> alternatives.
> Regards

reply via email to

[Prev in Thread] Current Thread [Next in Thread]