# NOT RUN {
if (have_ms_tts_key()) {
res = ms_synthesize(
script = "hey, how are you doing? I'm doing pretty good",
output_format = "audio-16khz-128kbitrate-mono-mp3")
tmp <- tempfile()
writeBin(res$content, con = tmp)
mp3 = tuneR::readMP3(tmp)
}
# }
Run the code above in your browser using DataLab