Re-export gigaam-v3-rnnt (loom-exporter e6d4e09)
Browse files
README.md
CHANGED
|
@@ -42,10 +42,14 @@ import loom
|
|
| 42 |
|
| 43 |
model = loom.Model.from_pretrained("loom-ai-org/gigaam-v3-rnnt-loom")
|
| 44 |
|
| 45 |
-
# Audio is a mono float list at 16 kHz.
|
| 46 |
-
#
|
|
|
|
| 47 |
result = model.speech2text.infer(audio, timestamps=True)
|
| 48 |
print(result.text)
|
|
|
|
|
|
|
|
|
|
| 49 |
for segment in result.segments:
|
| 50 |
print(segment.start, segment.end, segment.text)
|
| 51 |
```
|
|
|
|
| 42 |
|
| 43 |
model = loom.Model.from_pretrained("loom-ai-org/gigaam-v3-rnnt-loom")
|
| 44 |
|
| 45 |
+
# Audio is a mono float list at 16 kHz. This model decodes in the one language it was trained for and
|
| 46 |
+
# takes no `language=` argument -- passing one warns and is ignored, because nothing in its decode
|
| 47 |
+
# could act on it.
|
| 48 |
result = model.speech2text.infer(audio, timestamps=True)
|
| 49 |
print(result.text)
|
| 50 |
+
|
| 51 |
+
# It emits no timestamp tokens, so `segments` is one span covering the whole clip and
|
| 52 |
+
# `result.timestamped` is False. Check that before treating a start/end as a boundary the model chose.
|
| 53 |
for segment in result.segments:
|
| 54 |
print(segment.start, segment.end, segment.text)
|
| 55 |
```
|