Message Boards Message Boards

Output or analyse the result of Speak function?

GROUPS:

"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
Answer
8 months 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
Answer
8 months ago

..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
Answer
8 months ago

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
Answer
8 months ago

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

POSTED BY: Luchuan Liu
Answer
8 months ago

Group Abstract Group Abstract