is it possible to save audio using avspeechsynthesizer?

354 Views Asked by At

avspeechsynthesizer

when I'm converting text to speech. And I want to save that audio file, but I'm not able to save that audio using avspeechsynthesizer.

1

There are 1 best solutions below

0
On

To dive a little deeper the E.Coms comment, the AVSpeechSynthesis.h file provides the following information about the outputChannels variable:

Specify the audio channels to be used for synthesized speech as described by the channel descriptions in AVAudioSession's current route.

Speech audio will be replicated to each specified channel.

Default is nil, which implies system defaults.

@available(iOS 10.0, *)
open var outputChannels: [AVAudioSessionChannelDescription]?