Fix typos.

PiperOrigin-RevId: 488416345
This commit is contained in:
Jiuqiang Tang 2022-11-14 11:06:13 -08:00 committed by Copybara-Service
parent 4b5c3521af
commit b40b2ade14
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ public class BaseAudioTaskApi implements AutoCloseable {
* *
* @param sampleRate the audio sample rate. * @param sampleRate the audio sample rate.
* @throws MediaPipeException if the task is not in the audio stream mode or the provided sample * @throws MediaPipeException if the task is not in the audio stream mode or the provided sample
* rate is inconsisent with the previously recevied. * rate is inconsistent with the previously received.
*/ */
protected void checkOrSetSampleRate(double sampleRate) { protected void checkOrSetSampleRate(double sampleRate) {
if (runningMode != RunningMode.AUDIO_STREAM) { if (runningMode != RunningMode.AUDIO_STREAM) {

View File

@ -257,7 +257,7 @@ class AudioClassifier(base_audio_task_api.BaseAudioTaskApi):
Raises: Raises:
ValueError: If any of the followings: ValueError: If any of the followings:
1) The sample rate is not provided in the `AudioData` object or the 1) The sample rate is not provided in the `AudioData` object or the
provided sample rate is inconsisent with the previously recevied. provided sample rate is inconsistent with the previously received.
2) The current input timestamp is smaller than what the audio 2) The current input timestamp is smaller than what the audio
classifier has already processed. classifier has already processed.
""" """
@ -270,7 +270,7 @@ class AudioClassifier(base_audio_task_api.BaseAudioTaskApi):
elif audio_block.audio_format.sample_rate != self._default_sample_rate: elif audio_block.audio_format.sample_rate != self._default_sample_rate:
raise ValueError( raise ValueError(
f'The audio sample rate provided in audio data: ' f'The audio sample rate provided in audio data: '
f'{audio_block.audio_format.sample_rate} is inconsisent with ' f'{audio_block.audio_format.sample_rate} is inconsistent with '
f'the previously received: {self._default_sample_rate}.') f'the previously received: {self._default_sample_rate}.')
self._send_audio_stream_data({ self._send_audio_stream_data({