SDK Reference · Type
STSSRecordParams
Controls optional recording of synthesized speech to an audio file.
Declaration
public struct STSSRecordParams: Sendable {
public var enable: Bool
public var offlineMode: Bool
public var recordInsertedSilence: Bool
public var fileType: STAudioFileType
public var baseFileName: String
public var destinationURL: URL?
public var audioFormat: STAudioFormat?
}
Overview
Use these options when the application wants to save synthesized speech as audio. Recording generated speech is distinct from capturing microphone input and has different routing and permission implications.
Defaults
The initializer defaults are:
enable:falseofflineMode:falserecordInsertedSilence:falsefileType:.wavbaseFileName:""destinationURL:nilaudioFormat:nil
Properties
enable enables synthesized-speech recording.
offlineMode requests the framework's offline synthesis-recording behavior.
recordInsertedSilence determines whether silence inserted by synthesis playback settings is included in the recorded result.
fileType, baseFileName, and destinationURL describe the output file.
audioFormat optionally supplies the requested output audio format.
Properties
enable— Declared as Bool.offlineMode— Declared as Bool.recordInsertedSilence— Declared as Bool.fileType— Declared asSTAudioFileType.baseFileName— Declared as String.destinationURL— Declared as URL.audioFormat— Declared asSTAudioFormat.