Rebuilt around GTK 4, libadwaita, and GStreamer with a modular, lower-overhead runtime.
diff --git a/io.github.crhy.voice2textai.yml b/io.github.crhy.voice2textai.yml
index 888e226..56ba3b8 100644
--- a/io.github.crhy.voice2textai.yml
+++ b/io.github.crhy.voice2textai.yml
@@ -1,6 +1,6 @@
id: io.github.crhy.voice2textai
runtime: org.gnome.Platform
-runtime-version: '50'
+runtime-version: '48'
sdk: org.gnome.Sdk
command: voice2text-ai
diff --git a/legacy/voice_app_tk_legacy.py b/legacy/voice_app_tk_legacy.py
deleted file mode 100644
index f37b9c0..0000000
--- a/legacy/voice_app_tk_legacy.py
+++ /dev/null
@@ -1,972 +0,0 @@
-#!/usr/bin/env python3
-"""
-Voice 2 Text GUI Application
-
-A standalone GUI app for voice recognition that integrates with AI.
-Features a simple interface with start/stop buttons and automatic clipboard copying.
-"""
-
-import os
-import sys
-import contextlib
-import math
-
-# Linux-only audio environment tweaks. Do not force ALSA on Windows/macOS.
-if sys.platform.startswith('linux'):
- os.environ.setdefault('JACK_NO_START_SERVER', '1')
- os.environ.setdefault('SDL_AUDIODRIVER', 'alsa')
- os.environ.setdefault('ALSA_NO_JACK', '1')
-
-import tkinter as tk
-from tkinter import ttk, scrolledtext, messagebox
-import tkinter.font as tkfont
-import pyperclip
-import threading
-import time
-import json
-import pyaudio
-import numpy as np
-import tempfile
-import subprocess
-import shutil
-from faster_whisper import WhisperModel
-from scipy.signal import resample_poly
-import requests
-import pygame
-import asyncio
-import edge_tts
-from PIL import Image, ImageTk
-import datetime
-import queue
-from tqdm import tqdm
-
-class GuiTqdm(tqdm):
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
- self.app = getattr(GuiTqdm, 'app', None)
-
- def update(self, n=1):
- super().update(n)
- if self.app and self.total and self.total > 0:
- progress = min(100, self.n / self.total * 100)
- self.app.queue.put(('progress', progress))
-
-
-class VoiceApp:
- def __init__(self, root):
- self.root = root
- self._main_thread_id = threading.get_ident()
- self.root.title("Voice 2 Text")
- self.root.geometry("900x800")
- self.root.configure(bg='black')
- self.root.resizable(True, True)
-
- # Queue for thread-safe GUI updates. Create it before any worker thread.
- self.queue = queue.Queue()
- self.shutdown_event = threading.Event()
- self.model_lock = threading.Lock()
- self.audio_lock = threading.Lock()
- self.audio_queue = queue.Queue(maxsize=256)
- self.model = None
- self.sample_rate = 16000
-
- # Create canvas with gradient background
- self.canvas = tk.Canvas(self.root, width=900, height=800, highlightthickness=0)
- self.canvas.pack(fill='both', expand=True)
- self.canvas.bind('