Update handler.py
Browse files- handler.py +1 -0
handler.py
CHANGED
|
@@ -26,6 +26,7 @@ class EndpointHandler():
|
|
| 26 |
# Concatenate all audio segments
|
| 27 |
full_audio = torch.cat([torch.tensor(a) for a in audio_segments])
|
| 28 |
|
|
|
|
| 29 |
audio_length_seconds = len(full_audio) / sample_rate
|
| 30 |
|
| 31 |
# Write full audio to a binary buffer
|
|
|
|
| 26 |
# Concatenate all audio segments
|
| 27 |
full_audio = torch.cat([torch.tensor(a) for a in audio_segments])
|
| 28 |
|
| 29 |
+
sample_rate = 24000
|
| 30 |
audio_length_seconds = len(full_audio) / sample_rate
|
| 31 |
|
| 32 |
# Write full audio to a binary buffer
|