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
|
from vosk import Model, KaldiRecognizer
|
||||||
import sounddevice as sd
|
import sounddevice as sd
|
||||||
import json
|
import json
|
||||||
@@ -6,9 +8,11 @@ import pyautogui
|
|||||||
import sys
|
import sys
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SCRIPT_DIR = Path(__file__).parent
|
||||||
# Ścieżka do modelu
|
# Ś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)
|
model = Model(model_path)
|
||||||
recognizer = KaldiRecognizer(model, 16000)
|
recognizer = KaldiRecognizer(model, 16000)
|
||||||
|
|
||||||
@@ -116,3 +120,7 @@ def create_gui():
|
|||||||
# Uruchomienie GUI
|
# Uruchomienie GUI
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
create_gui()
|
create_gui()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user