ios - 是否可以使用 avspeechsynthesizer 保存音频?
问题描述
语音合成器
当我将文本转换为语音时。我想保存该音频文件,但我无法使用avspeechsynthesizer保存该音频。
解决方案
为了更深入地了解E.Coms
注释,该文件提供了有关变量AVSpeechSynthesis.h
的以下信息:outputChannels
指定用于合成语音的音频通道,如 AVAudioSession 的当前路由中的通道描述所述。
语音音频将被复制到每个指定的通道。
默认值为 nil,这意味着系统默认值。
@available(iOS 10.0, *)
open var outputChannels: [AVAudioSessionChannelDescription]?
推荐阅读
- python - Discord Python Bot - 使用 APScheduler 在 Aux 函数中发送消息
- javascript - 如何根据错误将标记注入 Vue 组件?
- r - 使用 grid_arrange_shared_legend 按列绘制
- c++ - C++:矩阵类中的双重析构函数调用
- aws-lambda - 使用 AWS Lambda 层时,我应该更喜欢多层还是具有所有依赖项的单层?
- php - 获取最新博客文章的当前年份
- javascript - 运行时的 Javascript 前端配置
- flutter - 已解决-使用 Firebase 和 Flutter 进行 Facebook 身份验证
- excel-addins - Microsoft.Office.Tools.Excel.ListObject.GetVstoObject 方法缺少 excel 列表对象
- c++ - 使数组结构看起来像结构数组的 std::vector 包装器