将音频流保存到mp3文件(iOS) [英] Save audio stream to mp3 file (iOS)

查看:664
本文介绍了将音频流保存到mp3文件(iOS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个AVSpeechSynthesizer可以将文本转换为语音,但我遇到了问题。

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!

所以这是我的问题,如何保存AVSpeechSynthesizer输出,如果这是不可能的,我可以使用AVFoundation,CoreMedia或其他公共API来捕获扬声器的输出,但在它出来之前?

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?

谢谢!

推荐答案

不幸的是,没有公共API可用于捕获扬声器输出并查看AVSpeechSynthesizer和相关类的文档我看不到从中捕获任何音频。您可能需要查看第三方库以帮助解决此问题。

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.

相关问题:

仅从iphone扬声器录制音频输出,不包括麦克风

文字 - 适用于iPhone的语音库

这篇关于将音频流保存到mp3文件(iOS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆