I have once tried to make a TTS engine write to a pipe file and have
lame read from the pipe file but that failed badly. I found a
workaround so didn't find a fix.

Is this Linux? You could try some magic with ALSA. For example writing
to file or memory and have lame read from there. As well I've heard
sound servers are also quite capable (pulseaudio, etc.).

And btw for me encoding is often at 50x on my old laptop so I'm not
sure why encoding for you takes so much time.

On Tue, Sep 8, 2009 at 10:44 AM, Andreas Karlsson<andreas_k...@yahoo.com> wrote:
> Hi guys,
> I'm into writing an application in JAVA that takes the output from a TTS 
> (Text to speech) engine and outputs that as a mp3 stream on a webpage.
> My problem is the TTS-engine generating raw PCM as output and I have to start 
> sending the mp3-stream before the TTS is done since 10 second of speeach 
> takes 10 second to generate.
> I read some parts from the LAME documentation and I'm into trying calling the 
> command line version of LAME (linux) from within my program with something 
> like
> cat PCMFileUnderConstruction | lame -r -m m -b 32 -s 22.05 - - > output.mp3
>
> The raw PCM is sampled with 22.05 kHz.
>
> Will this work, reading from a file that the TTS is still generating?
> I want Lame to process the content being written to that file until the file 
> PCMFileUnderConstruction is closed.
>
> brgds
> Andreas
>
>
>
>
>
> _______________________________________________
> mp3encoder mailing list
> mp3encoder@minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/mp3encoder
>
_______________________________________________
mp3encoder mailing list
mp3encoder@minnie.tuhs.org
https://minnie.tuhs.org/mailman/listinfo/mp3encoder

Reply via email to