update resmaple_file docstring

This commit is contained in:
makaveli10
2023-09-22 12:51:21 +05:30
parent d430795d35
commit 2f2233a9af
+7 -6
View File
@@ -19,12 +19,13 @@ def resample(file: str, sr: int = 16000):
# https://github.com/openai/whisper/blob/7858aa9c08d98f75575035ecd6481f462d66ca27/whisper/audio.py#L22 # https://github.com/openai/whisper/blob/7858aa9c08d98f75575035ecd6481f462d66ca27/whisper/audio.py#L22
Open an audio file and read as mono waveform, resampling as necessary, Open an audio file and read as mono waveform, resampling as necessary,
save the resampled audio save the resampled audio
Parameters
---------- Args:
file: str file (str): The audio file to open
The audio file to open sr (int): The sample rate to resample the audio if necessary
sr: int
The sample rate to resample the audio if necessary Returns:
resampled_file (str): The resampled audio file
""" """
try: try:
# This launches a subprocess to decode audio while down-mixing and resampling as necessary. # This launches a subprocess to decode audio while down-mixing and resampling as necessary.