bufferFormat
TypeScriptget bufferFormat(): _AVFAudio_AVAudioFormatSwift declarationlet bufferFormat: AVAudioFormatThe audio format of this input.
struct · iOS 26.0+ · SDK 27.1
struct AnalyzerInputTime-coded audio data. The audio data must have an audio format that is supported by the analyzer's modules; the analyzer does not perform audio conversion. Call ``SpeechAnalyzer/bestAvailableAudioFormat(compatibleWith:considering:)-([SpeechModule],_)`` (or its variants) to select an appropriate format to convert to. The audio format may differ from one `AnalyzerInput` object to the next. If the new audio format is supported by the modules, the modules will be reconfigured as needed.
get bufferFormat(): _AVFAudio_AVAudioFormatSwift declarationlet bufferFormat: AVAudioFormatThe audio format of this input.
get bufferDuration(): _CoreMedia_CMTimeSwift declarationlet bufferDuration: CMTimeThe length of this input.
get bufferStartTime(): (_CoreMedia_CMTime) | nullSwift declarationlet bufferStartTime: CMTime?The time-code of this input.
static initBufferBufferStartTime(buffer: _AVFAudio_AVAudioPCMBuffer, bufferStartTime?: (_CoreMedia_CMTime) | null): AnalyzerInputSwift declarationinit(buffer: AVAudioPCMBuffer, bufferStartTime: CMTime?)Creates an audio input object for audio that may be discontiguous with previous input. The audio buffer must not overlap or precede other audio input, as determined by the `bufferStartTime` value. - Important: If the buffer is converted from other differently-formatted audio, ensure that the buffer's start time is accurate. Some conversion algorithms can use a "priming" method that may shift some audio to a later converted buffer. This shift will misalign the original and converted audio buffers; the original buffer's start time would not be usable as the `bufferStartTime` value for the converted buffer. - Tip: Convert an `AVAudioTime` instance to a `CMTime` instance with this code. ```swift CMTime(value: avAudioTime.sampleTime, timescale: CMTimeScale(avAudioTime.sampleRate)) ``` - Parameters: - buffer: An audio buffer. - bufferStartTime: The time-code of the start of the audio buffer. If `nil`, this audio buffer is assumed to start immediately after the previous buffer (or at time-code zero if there is no previous buffer). The `CMTime` can have a different timescale than the sample rate of the audio data.
static initBuffer(buffer: _CoreMedia_CMReadySampleBuffer<_CoreMedia_CMReadOnlyDataBlockBuffer>): AnalyzerInputSwift declarationinit(buffer: CMReadySampleBuffer<CMReadOnlyDataBlockBuffer>)Creates an audio input object. The audio buffer must not overlap or precede other audio input, as determined by the buffer's `presentationTimeStamp` value. - Tip: To convert a `CMSampleBuffer` to a `CMReadySampleBuffer`, use `CMReadySampleBuffer(unsafeWithDataBuffer:)`. You should not alter the original `CMSampleBuffer` after passing it to that initializer. - Parameters: - buffer: An audio buffer.
static initBuffer73090(buffer: _AVFAudio_AVAudioPCMBuffer): AnalyzerInputSwift declarationinit(buffer: AVAudioPCMBuffer)Creates an audio input object. This audio buffer is assumed to start immediately after the previous buffer (or at time-code zero if there is no previous buffer). - Parameters: - buffer: An audio buffer.
get buffer(): _AVFAudio_AVAudioPCMBufferSwift declarationvar buffer: AVAudioPCMBuffer { get }A new copy of the audio data for this input.
No declarations were skipped in this snapshot.