Spaces:
Configuration error
Configuration error
Upload ml/cli.py with huggingface_hub
Browse files
ml/cli.py
CHANGED
|
@@ -121,8 +121,10 @@ def cmd_selfcheck(args):
|
|
| 121 |
from ml.model import pron_eval
|
| 122 |
print("[1/3] Checking DSP signal conditioning & VAD...")
|
| 123 |
test_wave = np.random.randn(16000).astype(np.float32) * 0.1
|
| 124 |
-
cond = pron_eval.
|
| 125 |
assert len(cond) == 16000, "Length mismatch in conditioning"
|
|
|
|
|
|
|
| 126 |
|
| 127 |
print("[2/3] Checking dynamic programming alignment & explicit rabbit->wabbit rhotacism...")
|
| 128 |
align = pron_eval.align_words("the red rabbit", "the wed wabbit")
|
|
|
|
| 121 |
from ml.model import pron_eval
|
| 122 |
print("[1/3] Checking DSP signal conditioning & VAD...")
|
| 123 |
test_wave = np.random.randn(16000).astype(np.float32) * 0.1
|
| 124 |
+
cond = pron_eval._filter_dc_rumble(test_wave, 16000)
|
| 125 |
assert len(cond) == 16000, "Length mismatch in conditioning"
|
| 126 |
+
norm = pron_eval.normalize_for_neural_inference(cond)
|
| 127 |
+
assert np.max(np.abs(norm)) <= 0.90, "Normalization out of bounds"
|
| 128 |
|
| 129 |
print("[2/3] Checking dynamic programming alignment & explicit rabbit->wabbit rhotacism...")
|
| 130 |
align = pron_eval.align_words("the red rabbit", "the wed wabbit")
|