Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import allin1
|
|
| 4 |
import time
|
| 5 |
import json
|
| 6 |
import torch
|
|
|
|
| 7 |
|
| 8 |
from pathlib import Path
|
| 9 |
|
|
@@ -131,7 +132,7 @@ def add_voice_label(json_file, audio_path):
|
|
| 131 |
vad_iterator = VADIterator(model)
|
| 132 |
|
| 133 |
# Read input audio file
|
| 134 |
-
wav =
|
| 135 |
|
| 136 |
# Access the segments
|
| 137 |
segments = data['segments']
|
|
|
|
| 4 |
import time
|
| 5 |
import json
|
| 6 |
import torch
|
| 7 |
+
import librosa
|
| 8 |
|
| 9 |
from pathlib import Path
|
| 10 |
|
|
|
|
| 132 |
vad_iterator = VADIterator(model)
|
| 133 |
|
| 134 |
# Read input audio file
|
| 135 |
+
wav, _ = librosa.load(audio_path, sr=SAMPLING_RATE, mono=True)
|
| 136 |
|
| 137 |
# Access the segments
|
| 138 |
segments = data['segments']
|