Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 442
H Bellamy Avatar asked Oct 22 '22 00:10

H Bellamy


1 Answers

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

like image 164
IanStallings Avatar answered Nov 15 '22 08:11

IanStallings