Jump to content

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?
Link to comment
https://forums.phpfreaks.com/topic/10982-generating-dynamic-wav-file/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.