Dostosowanie
This commit is contained in:
1 parent
7102273d9d
commit
d056fd0fb5
3 files changed
+9
-1
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -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