Spaces:
Sleeping
Sleeping
undo modification
Browse files
app.py
CHANGED
|
@@ -635,10 +635,10 @@ def generate_tensor(audio_path: str):
|
|
| 635 |
# ---------- 1) arg‑max & CTC collapse → string ----------
|
| 636 |
ids = logits[b, h].argmax(dim=-1).cpu().tolist()
|
| 637 |
|
| 638 |
-
text = processor._decode(
|
| 639 |
-
|
| 640 |
-
)
|
| 641 |
-
|
| 642 |
|
| 643 |
# ---------- 2) split the string into symbols ----------
|
| 644 |
symbols = token_re.findall(text) # e.g. ['-1', '1', '-1', '-1', …]
|
|
|
|
| 635 |
# ---------- 1) arg‑max & CTC collapse → string ----------
|
| 636 |
ids = logits[b, h].argmax(dim=-1).cpu().tolist()
|
| 637 |
|
| 638 |
+
#text = processor._decode(
|
| 639 |
+
# ids,
|
| 640 |
+
#)
|
| 641 |
+
text = tokenizer_ipa._decode(token_ids = ids)
|
| 642 |
|
| 643 |
# ---------- 2) split the string into symbols ----------
|
| 644 |
symbols = token_re.findall(text) # e.g. ['-1', '1', '-1', '-1', …]
|