Update usage.py
Browse files
usage.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
from transformers import pipeline
|
| 2 |
pipe = pipeline("automatic-speech-recognition", model="stt-thai",return_timestamps=True)
|
| 3 |
-
result=pipe("thai.wav"
|
| 4 |
print (result)
|
| 5 |
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
pipe = pipeline("automatic-speech-recognition", model="stt-thai",return_timestamps=True)
|
| 3 |
+
result=pipe("thai.wav", generate_kwargs={"task": "transcribe","language":"th"})["text"]
|
| 4 |
print (result)
|
| 5 |
|