SpeechAudioFormat Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | SpeechAudioFormat.m SpeechRecognitionService.h |
Overview
The SpeechAudioFormat contains information about how the audio data was recorded and stored, including the type of compression used, number of channels, sample rate, bits per sample and other attributes.
Other Methods
– init
Initializes a SpeechAudioFormat object
- (id)initDiscussion
Initializes a SpeechAudioFormat object
Declared In
SpeechAudioFormat.m
+ createSiren7Format:
Produces a SpeechAudioFormat for data encoded in Siren7. The data must be encoded in mono, such that a 320 sample mono input frame produces a 40 bytes output frame.
+ (SpeechAudioFormat *)createSiren7Format:(int)sampleRateParameters
sampleRate |
The samples per second of the audio that was encoded (can only be 16000). |
|---|
Return Value
The created SpeechAudioFormat.
Discussion
Produces a SpeechAudioFormat for data encoded in Siren7. The data must be encoded in mono, such that a 320 sample mono input frame produces a 40 bytes output frame.
Declared In
SpeechAudioFormat.m
+ create16BitPCMFormat:
Produces a SpeechAudioFormat for 16-bit PCM data.
+ (SpeechAudioFormat *)create16BitPCMFormat:(int)sampleRateParameters
sampleRate |
The samples per second of the audio that was encoded (can only be 16000). |
|---|
Return Value
The created SpeechAudioFormat.
Discussion
Produces a SpeechAudioFormat for 16-bit PCM data.
Declared In
SpeechAudioFormat.m
Other Methods
AverageBytesPerSecond
This value indicates how many bytes of audio data must be streamed to a D/A converter per second in order to play the audio.
@property (nonatomic, assign) int AverageBytesPerSecondDiscussion
This value indicates how many bytes of audio data must be streamed to a D/A converter per second in order to play the audio.
Declared In
SpeechRecognitionService.h
BitsPerSample
The number of significant bits in each audio sample. Usually 16 or 24.
@property (nonatomic, assign) short BitsPerSampleDiscussion
The number of significant bits in each audio sample. Usually 16 or 24.
Declared In
SpeechRecognitionService.h
BlockAlign
The number of data bytes per sample slice.
@property (nonatomic, assign) short BlockAlignDiscussion
The number of data bytes per sample slice.
Declared In
SpeechRecognitionService.h
ChannelCount
The number of separate audio signals in the audio data. A value of 1 means a mono signal, a value of 2 means a stereo signal.
@property (nonatomic, assign) short ChannelCountDiscussion
The number of separate audio signals in the audio data. A value of 1 means a mono signal, a value of 2 means a stereo signal.
Declared In
SpeechRecognitionService.h
EncodingFormat
Specifies the type of compression used on the audio data. Default value is AudioCompressionType_PCM.
@property (nonatomic, assign) AudioCompressionType EncodingFormatDiscussion
Specifies the type of compression used on the audio data. Default value is AudioCompressionType_PCM.
Declared In
SpeechRecognitionService.h
FormatSpecificData
Extra bytes for use to describe parameters to certain audio compression types.
@property (nonatomic, strong) NSData *FormatSpecificDataDiscussion
Extra bytes for use to describe parameters to certain audio compression types.
This field should be null for PCM.
Declared In
SpeechRecognitionService.h
SamplesPerSecond
Audio sample slices per second, where one slice includes all the channel samples. This value is unaffected by the number of channels.
@property (nonatomic, assign) int SamplesPerSecondDiscussion
Audio sample slices per second, where one slice includes all the channel samples. This value is unaffected by the number of channels.
Declared In
SpeechRecognitionService.h