Jump to content
Updating IPB tonight Read more... ×

Archived

This topic is now archived and is closed to further replies.

sliderool

Generating dynamic .wav file

Recommended Posts

Hello all, here's an issue I'm struggling with:

I'm trying to create a live text-to-speech (TTS) page in PHP.
My TTS software is Cepstral for linux. It's a command line utility which works like this:

[code]$ swift -n William "hello" -o hello.wav[/code]

This uses the "William" voice and outputs "hello" to a wave file.

I would like to create a form for a user to enter in text and press a submit button, in which the user then hears the sound. An example is on the Cepstral website main page at [a href=\"http://www.cepstral.com\" target=\"_blank\"]http://www.cepstral.com[/a] . Their setup appears to use an IFRAME and upon submission it embeds the file in the IFRAME below the textbox.

Ideally, it would be resourceful to have the sound file created dynamically within a PHP script and sent to the browser for play, thus eliminating the need to create the file locally on the webserver, play it, and then delete it.

Is this possible? If not, how are they doing it at cepstral.com ? Any ideas or help would be appreciated.

I'm looking into the possibility of using passthru() but the command line utility only outputs to a file. Is there a way to redirect output to PHP?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.