Can Rev turn text to speech and record it?

Richard Miller wow at
Fri Apr 10 07:15:40 EDT 2009


The original purpose for going this route was to use Skype to generate a 
text-to-speech solution. The only significant differences between Skype 
and are that Skype is a bit less costly (I think 2-4 
cents less per call) and one could potentially have many more options 
for adjusting the voice itself that plays through the call. With 
telemessage, you have their one voice and that's it (though that voice 
appears to be optimized for this application). On the plus side, 
telemessage provides a simple solution for text-to-speech, to SMS, to 
email... whatever.

I did a lot more tests with Skype. I finally got the Applescript to 
generate a call, allowing me to speak through a mic into that call, then 
have Skype record all of that into a wav file. With this, I could then 
easily see where Applescript was putting the wav file (which was a 
mystery before). Given that, it should be possible to create a wav file, 
stick it in this location, then use Applescript to play that wav file 
back through a call.

What I did next was create a new wav file (using Audacity) to the 
16/16/pcm/mono specs. I then compared that file to the one Skype had 
created. What I found was a very slight, but significant, difference 
between the two in terms of the recording rate (kb/sec). But this 
difference is enough so that the wav file I created through Audacity 
doesn't play back well through Skype... but the one Skype created plays 
fine. I'd need to investigate further why this is and figure out how to 
fix it.

With the solution you are suggesting, it sounds like it is possible to 
create a text-to-speech file on the fly through Rev. If this approach 
made sense, I could use ffmpegx and Rev to take that wav file and 
convert it to the proper format. But in thinking this through, I am 
thinking that maybe it's not a good idea to have Skype running in the 
background on my (MacMini) server. It seems to randomly use CPU time on 
my home computer, and when it is actively being used, it could become an 
interference with my cgi scripts running constantly on this server. For 
this reason, I'm thinking the telemessage solution is the better route 
to go.


Kay C Lan wrote:
> On Fri, Apr 10, 2009 at 8:16 AM, Richard Miller <wow at> wrote:
>> Is there a reasonably elegant way (on a Mac) to have Rev turn text into
>> speech and record it as a wav file...
> Ah, so you are on Mac. Well, it looks like AppleScript or Automator is your
> friend again. Take a look here:
> Then there is the problem of converting the AIFF file to WAV. It is possible
> to do this with Automator using the Import Audio Files action. You can
> specify the WAV encoder, but that is all you can specify, there are no
> options to set 16 bit 16k mono :-( Unfortunately Audacity doesn't have
> AppleScript support.
> Another option maybe to preset your iTunes Preferences to import to 16 bit
> 16k mono WAV format and then use AppleScript to tell iTunes to import the
> files you just created with 'text-to-audio' action above. In this case
> basically all you need is:
> tell application "iTunes"
>   launch
>   try
>     add this_file
>   end try
> end tell
> Of course it's probably worth testing to see what format (bit/k/channels)
> the Automator Music Action 'Import Audio Files' outputs. You may be lucky,
> if you set iTunes Preferences to 16 bit 16 k mono WAV and you use Import
> Audio Files to encode to WAV it might possibly come out at 16 bit 16 K mono
> thereby eliminating that need to actual import into iTunes.
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list