Dostosowanie
This commit is contained in:
BIN
vosk_INSTRUKCJA.png
Normal file
BIN
vosk_INSTRUKCJA.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
10
voskpl.py
Normal file → Executable file
10
voskpl.py
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/home/pali112/venv/bin/python3
|
||||
|
||||
from vosk import Model, KaldiRecognizer
|
||||
import sounddevice as sd
|
||||
import json
|
||||
@@ -6,9 +8,11 @@ import pyautogui
|
||||
import sys
|
||||
import tkinter as tk
|
||||
from threading import Thread
|
||||
from pathlib import Path
|
||||
|
||||
SCRIPT_DIR = Path(__file__).parent
|
||||
# Ścieżka do modelu
|
||||
model_path = "./vosk-model-small-pl-0.22"
|
||||
model_path = str(SCRIPT_DIR / "./vosk-model-small-pl-0.22")
|
||||
model = Model(model_path)
|
||||
recognizer = KaldiRecognizer(model, 16000)
|
||||
|
||||
@@ -116,3 +120,7 @@ def create_gui():
|
||||
# Uruchomienie GUI
|
||||
if __name__ == "__main__":
|
||||
create_gui()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user