From c2820c94916e34baf4486accae74760972183a2f Mon Sep 17 00:00:00 2001 From: Arthur Zucker Date: Thu, 24 Oct 2024 10:03:56 +0200 Subject: [PATCH] fix list 3.8 --- src/transformers/pipelines/audio_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/transformers/pipelines/audio_utils.py b/src/transformers/pipelines/audio_utils.py index 4a8a93c9683a82..3fed45ff7f20d9 100644 --- a/src/transformers/pipelines/audio_utils.py +++ b/src/transformers/pipelines/audio_utils.py @@ -2,7 +2,7 @@ import datetime import platform import subprocess -from typing import Optional, Tuple, Union +from typing import Optional, Tuple, Union, List import numpy as np @@ -51,7 +51,7 @@ def ffmpeg_microphone( chunk_length_s: float, format_for_conversion: str = "f32le", ffmpeg_input_device: Optional[str] = None, - ffmpeg_additional_args: Optional[list[str]] = None, + ffmpeg_additional_args: Optional[List[str]] = None, ): """ Helper function to read audio from a microphone using ffmpeg. The default input device will be used unless another @@ -138,7 +138,7 @@ def ffmpeg_microphone_live( stride_length_s: Optional[Union[Tuple[float, float], float]] = None, format_for_conversion: str = "f32le", ffmpeg_input_device: Optional[str] = None, - ffmpeg_additional_args: Optional[list[str]] = None, + ffmpeg_additional_args: Optional[List[str]] = None, ): """ Helper function to read audio from a microphone using ffmpeg. This will output `partial` overlapping chunks starting