mirror of
https://github.com/alphacep/vosk-api.git
synced 2026-01-24 00:33:42 +08:00
12 lines
194 B
Python
Executable File
12 lines
194 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
from vosk import Model, KaldiRecognizer
|
|
import sys
|
|
import json
|
|
|
|
model = Model("model-en")
|
|
rec = KaldiRecognizer(model, 8000)
|
|
|
|
res = json.loads(rec.FinalResult())
|
|
print (res)
|