How to export Speak["valentine"]
to wav or mp3 file?
1 Answer
Speak
does not generate an output object (it returns Null
). It only has the side effect of producing the synthesized sounds, so it is not straightforward to export the generated audio directly.
On the other hand, SpeechSynthesize
returns an Audio
object, which here appears to behave essentially as a wrapper for a .WAV file automatically generated somewhere on your computer.
As Carl Lange mentioned in his comment, this object can be exported directly using Export
:
Export["valentine.wav", SpeechSynthesize["valentine"]
SpeechSynthesize
instead.Export["valentine.wav", SpeechSynthesize["valentine"]]
works fine. $\endgroup$