Message Boards Message Boards

0
|
8784 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Output or analyse the result of Speak function?

Posted 7 years ago

"Speak" is a function that can "speak" the string variable in English. For example, Speak["thank you"] will make the computer speak "thank you", but I can't use this sound to do other things: Audio or Sound function cannot record the result of Speak function. There will be mistake if we run

Audio[Speak["thank you"]]

or

Sound[Speak["thank you"]]

, so I can't output the "thank you" sound or analyse the waveform or spectrum of it. How to deal with it?

POSTED BY: Luchuan Liu
4 Replies

On MacOSX you can do a RunProcess call to e.g.:

say -v "Cellos" "Lalalalalala" -o filename.aiff

Then import that file using Import.

POSTED BY: Sander Huisman
Posted 7 years ago

Thank you very much, but how about using the Windows system (For example, Windows 10)?

POSTED BY: Luchuan Liu

..or re-route the sound output back again using a third-party app. For example, on OS X, with AudioHijack http://www.rogueamoeba.com.

POSTED BY: Arno Bosse
Posted 7 years ago

Speak uses the OS speak function, so the waveform is not available for computations, unless of course you record it with a microphone and import the recording.

POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract