mirror of
https://github.com/alphacep/vosk-api.git
synced 2026-01-09 07:32:34 +08:00
12 lines
189 B
Python
Executable File
12 lines
189 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import json
|
|
|
|
from vosk import Model, KaldiRecognizer
|
|
|
|
model = Model(lang="en-us")
|
|
rec = KaldiRecognizer(model, 8000)
|
|
|
|
res = json.loads(rec.FinalResult())
|
|
print(res)
|