Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse files- wvmos/wv_mos.py +6 -5
wvmos/wv_mos.py
CHANGED
|
@@ -109,11 +109,12 @@ class Wav2Vec2MOS(nn.Module):
|
|
| 109 |
# 1. Load Audio (Original 16k)
|
| 110 |
signal = librosa.load(path, sr=16_000)[0]
|
| 111 |
|
| 112 |
-
# 2. Sliding Window (
|
| 113 |
-
#
|
| 114 |
-
#
|
| 115 |
-
|
| 116 |
-
|
|
|
|
| 117 |
|
| 118 |
# Prepare windows
|
| 119 |
chunks = []
|
|
|
|
| 109 |
# 1. Load Audio (Original 16k)
|
| 110 |
signal = librosa.load(path, sr=16_000)[0]
|
| 111 |
|
| 112 |
+
# 2. Sliding Window (5-minute window, 2.5-minute overlap)
|
| 113 |
+
# 600s (10-min) caused runtime failures/OOM on Hugging Face.
|
| 114 |
+
# 300s (5-min) was verified to have 0.09 deviation (within 0.1 tolerance)
|
| 115 |
+
# and is much safer for memory.
|
| 116 |
+
window_size = 16000 * 300 # 5 minutes
|
| 117 |
+
stride = 16000 * 150 # 2.5 minutes
|
| 118 |
|
| 119 |
# Prepare windows
|
| 120 |
chunks = []
|