Update audio_processing/T2A.py
Browse files- audio_processing/T2A.py +1 -1
audio_processing/T2A.py
CHANGED
@@ -13,7 +13,7 @@ class T2A:
|
|
13 |
self.output_model = pipe_tts(input_text)
|
14 |
|
15 |
def __get_duration(self, raw: bytes):
|
16 |
-
chunk =
|
17 |
audio, sample_rate = librosa.load(chunk, sr=SAMPLING_RATE)
|
18 |
duration = librosa.get_duration(y=audio, sr=sample_rate)
|
19 |
return duration
|
|
|
13 |
self.output_model = pipe_tts(input_text)
|
14 |
|
15 |
def __get_duration(self, raw: bytes):
|
16 |
+
chunk = BytesIO(raw)
|
17 |
audio, sample_rate = librosa.load(chunk, sr=SAMPLING_RATE)
|
18 |
duration = librosa.get_duration(y=audio, sr=sample_rate)
|
19 |
return duration
|