简体   繁体   中英

Save audio stream to mp3 file (iOS)

I have an AVSpeechSynthesizer which converts text to speech, but i've encountered a problem.

I don't know how to save the audio file that it generates to a music file, which I would quite like to be able to do!

So here's my question, how do you save the AVSpeechSynthesizer output and if this isn't possible, can I us AVFoundation, CoreMedia or other public API to capture the output of the speakers, but before it has come out?

Thanks!

Unfortunately no, there is no public API available to capture the speaker output and looking over the docs for AVSpeechSynthesizer and related classes I don't see a way to capture any audio from it. You may want to look at 3rd party libraries to help with this.

Related questions:

Recording audio output only from speaker of iphone excluding microphone

Text-to-speech libraries for iPhone

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM