From ee227252f25a8750c27386d171ed6193aba71edf Mon Sep 17 00:00:00 2001 From: jatinkrmalik Date: Sat, 12 Apr 2025 00:53:48 -0500 Subject: [PATCH 1/2] Refactor project name from 'Ubuntu Voice Typing' to 'Vocalinux'\n\nThis commit updates all references to the project name across the codebase, documentation, and metadata. The changes include:\n- Updating module docstrings, comments, and logging messages.\n- Renaming files and directories where necessary.\n- Updating references in README, INSTALL, and LICENSE files.\n- Adjusting paths and identifiers in the code to reflect the new name.\n\nThis refactor ensures consistency and prepares the project for its new branding as 'Vocalinux'.\n\nPlease review the changes carefully to ensure no functionality is affected. --- LICENSE | 4 +- README.md | 32 +++++++------- activate-ubuntu-voice-typing.sh | 6 +-- docs/INSTALL.md | 18 ++++---- docs/USER_GUIDE.md | 14 +++--- install.sh | 44 +++++++++---------- setup.py | 8 ++-- src/main.py | 6 +-- src/speech_recognition/command_processor.py | 2 +- src/speech_recognition/recognition_manager.py | 4 +- src/text_injection/text_injector.py | 2 +- src/ui/audio_feedback.py | 2 +- src/ui/config_manager.py | 4 +- src/ui/keyboard_shortcuts.py | 2 +- src/ui/tray_indicator.py | 14 +++--- tests/run_basic_tests.py | 4 +- tests/test_basic.py | 2 +- ubuntu-voice-typing.desktop | 8 ++-- 18 files changed, 88 insertions(+), 88 deletions(-) diff --git a/LICENSE b/LICENSE index 41d20f5..15f0fde 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ - GNU GENERAL PUBLIC LICENSE +GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2025 Ubuntu Voice Typing Team + Copyright (C) 2025 Vocalinux Team Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/README.md b/README.md index 9ea6c98..c234b57 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Ubuntu Voice Typing +# Vocalinux -A seamless voice dictation system for Ubuntu, comparable to the built-in solutions on macOS and Windows. +A seamless voice dictation system for Linux, comparable to the built-in solutions on macOS and Windows. ## Overview -Ubuntu Voice Typing provides a user-friendly speech-to-text solution for Linux users with: +Vocalinux provides a user-friendly speech-to-text solution for Linux users with: - Activation via customizable keyboard shortcuts (default: Alt+Shift+V) - Real-time transcription with minimal latency @@ -24,7 +24,7 @@ This project leverages existing open-source technologies: ## Project Structure ``` -ubuntu-voice-typing/ +vocalinux/ ├── docs/ # Documentation │ ├── INSTALL.md # Installation guide │ └── USER_GUIDE.md # User guide with command reference @@ -55,7 +55,7 @@ ubuntu-voice-typing/ ├── LICENSE # GPLv3 license ├── README.md # This file ├── setup.py # Python package configuration -└── ubuntu-voice-typing.desktop # Desktop entry file +└── vocalinux.desktop # Desktop entry file ``` ## Installation @@ -70,8 +70,8 @@ ubuntu-voice-typing/ ```bash # Clone the repository -git clone https://github.com/ubuntu-voice-typing/ubuntu-voice-typing.git -cd ubuntu-voice-typing +git clone https://github.com/jatinkrmalik/vocalinux.git +cd vocalinux # Run the installer script ./install.sh @@ -89,20 +89,20 @@ For detailed installation instructions, see [docs/INSTALL.md](docs/INSTALL.md). ### Starting the Application -After installation, you can start Ubuntu Voice Typing in several ways: +After installation, you can start Vocalinux in several ways: ```bash # From the terminal -ubuntu-voice-typing +vocalinux # With debugging enabled -ubuntu-voice-typing --debug +vocalinux --debug # With a specific speech recognition engine -ubuntu-voice-typing --engine whisper +vocalinux --engine whisper # With a specific model size -ubuntu-voice-typing --model medium +vocalinux --model medium ``` ### Using Voice Dictation @@ -115,7 +115,7 @@ ubuntu-voice-typing --model medium ### Using Voice Commands -Ubuntu Voice Typing supports various voice commands for text formatting: +Vocalinux supports various voice commands for text formatting: | Command | Action | |---------|--------| @@ -130,7 +130,7 @@ For a complete list of commands, see [docs/USER_GUIDE.md](docs/USER_GUIDE.md). ## Configuration -Configuration is stored in `~/.config/ubuntu-voice-typing/config.json` and includes: +Configuration is stored in `~/.config/vocalinux/config.json` and includes: ```json { @@ -172,8 +172,8 @@ Both MP3 and WAV formats are supported, with MP3 being the primary format. ```bash # Clone the repository -git clone https://github.com/ubuntu-voice-typing/ubuntu-voice-typing.git -cd ubuntu-voice-typing +git clone https://github.com/jatinkrmalik/vocalinux.git +cd vocalinux # Install development dependencies pip install -e ".[dev]" diff --git a/activate-ubuntu-voice-typing.sh b/activate-ubuntu-voice-typing.sh index 1189a47..23b86b9 100755 --- a/activate-ubuntu-voice-typing.sh +++ b/activate-ubuntu-voice-typing.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This script activates the Ubuntu Voice Typing virtual environment +# This script activates the Vocalinux virtual environment source "$(dirname "$(realpath "$0")")/venv/bin/activate" -echo "Ubuntu Voice Typing virtual environment activated." -echo "To start the application, run: ubuntu-voice-typing" +echo "Vocalinux virtual environment activated." +echo "To start the application, run: vocalinux" diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 84a7141..1b58ee5 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -1,6 +1,6 @@ # Installation Guide -This guide provides instructions for installing and setting up Ubuntu Voice Typing. +This guide provides instructions for installing and setting up Vocalinux. ## Requirements @@ -25,8 +25,8 @@ sudo apt install ydotool python3-pip python3-gi gir1.2-appindicator3-0.1 ### 2. Clone the Repository ```bash -git clone https://github.com/ubuntu-voice-typing/ubuntu-voice-typing.git -cd ubuntu-voice-typing +git clone https://github.com/jatinkrmalik/vocalinux.git +cd vocalinux ``` ### 3. Install Python Dependencies @@ -46,16 +46,16 @@ pip3 install --user ".[dev]" ```bash # Basic usage -ubuntu-voice-typing +vocalinux # With debug logging -ubuntu-voice-typing --debug +vocalinux --debug # With Whisper instead of VOSK -ubuntu-voice-typing --engine whisper +vocalinux --engine whisper # Force Wayland mode -ubuntu-voice-typing --wayland +vocalinux --wayland ``` ## Advanced Installation @@ -65,9 +65,9 @@ ubuntu-voice-typing --wayland By default, a small model will be downloaded and used. You can use larger models for improved accuracy: ```bash -ubuntu-voice-typing --model medium +vocalinux --model medium # or -ubuntu-voice-typing --model large +vocalinux --model large ``` Note that larger models require more RAM and may have longer initialization times, but provide better recognition accuracy. diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md index 46667e7..89666ba 100644 --- a/docs/USER_GUIDE.md +++ b/docs/USER_GUIDE.md @@ -1,16 +1,16 @@ # User Guide -This guide explains how to use Ubuntu Voice Typing effectively. +This guide explains how to use Vocalinux effectively. ## Getting Started -After installing Ubuntu Voice Typing (see the [Installation Guide](INSTALL.md)), you can start the application from the terminal or add it to your startup applications. +After installing Vocalinux (see the [Installation Guide](INSTALL.md)), you can start the application from the terminal or add it to your startup applications. ## Basic Usage ### Starting and Stopping Voice Typing -1. **Launch the application**: Run `ubuntu-voice-typing` in a terminal or launch it from your application menu +1. **Launch the application**: Run `vocalinux` in a terminal or launch it from your application menu 2. **Find the tray icon**: Look for the microphone icon in your system tray 3. **Start voice typing**: Click the tray icon and select "Start Voice Typing" from the menu 4. **Speak clearly**: As you speak, your words will be transcribed into the currently focused application @@ -24,7 +24,7 @@ After installing Ubuntu Voice Typing (see the [Installation Guide](INSTALL.md)), ## Voice Commands -Ubuntu Voice Typing supports several commands that you can speak to control formatting: +Vocalinux supports several commands that you can speak to control formatting: | Command | Action | |---------|--------| @@ -46,13 +46,13 @@ Ubuntu Voice Typing supports several commands that you can speak to control form 3. **Moderate pace**: Don't speak too quickly or too slowly 4. **Quiet environment**: Minimize background noise when possible 5. **Learn commands**: Familiarize yourself with voice commands for punctuation and formatting -6. **Use larger models**: For better accuracy, use `ubuntu-voice-typing --model medium` or `--model large` +6. **Use larger models**: For better accuracy, use `vocalinux --model medium` or `--model large` ## Customization ### Keyboard Shortcuts -Ubuntu Voice Typing supports global keyboard shortcuts for starting and stopping voice typing: +Vocalinux supports global keyboard shortcuts for starting and stopping voice typing: 1. Open the application settings from the tray icon menu 2. Go to the "Shortcuts" tab @@ -72,7 +72,7 @@ You can change the speech recognition model for better accuracy or faster perfor If you encounter issues, check the [Installation Guide](INSTALL.md) troubleshooting section or run the application with debug logging: ```bash -ubuntu-voice-typing --debug +vocalinux --debug ``` Check the logs for error messages and possible solutions. \ No newline at end of file diff --git a/install.sh b/install.sh index 0fe233d..0517b4d 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Ubuntu Voice Typing Installer -# This script installs the Ubuntu Voice Typing application and its dependencies +# Vocalinux Installer +# This script installs the Vocalinux application and its dependencies set -e # Exit on error @@ -42,7 +42,7 @@ while [[ $# -gt 0 ]]; do shift ;; --help) - echo "Ubuntu Voice Typing Installer" + echo "Vocalinux Installer" echo "Usage: $0 [options]" echo "Options:" echo " --dev Install in development mode with all dev dependencies" @@ -65,7 +65,7 @@ if [[ "$DEV_MODE" == "yes" ]]; then RUN_TESTS="yes" fi -print_info "Ubuntu Voice Typing Installer" +print_info "Vocalinux Installer" print_info "==============================" echo "" [[ "$USE_VENV" == "yes" ]] && print_info "Using virtual environment mode" @@ -118,9 +118,9 @@ fi # Create directories print_info "Creating application directories..." -mkdir -p ~/.local/share/ubuntu-voice-typing/icons -mkdir -p ~/.local/share/ubuntu-voice-typing/models -mkdir -p ~/.config/ubuntu-voice-typing +mkdir -p ~/.local/share/vocalinux/icons +mkdir -p ~/.local/share/vocalinux/models +mkdir -p ~/.config/vocalinux # Set up virtual environment if requested VENV_DIR="venv" @@ -137,15 +137,15 @@ if [[ "$USE_VENV" == "yes" ]]; then print_info "Virtual environment activated." # Create activation script for users - cat > activate-ubuntu-voice-typing.sh << EOF + cat > activate-vocalinux.sh << EOF #!/bin/bash -# This script activates the Ubuntu Voice Typing virtual environment +# This script activates the Vocalinux virtual environment source "\$(dirname "\$(realpath "\$0")")/$VENV_DIR/bin/activate" -echo "Ubuntu Voice Typing virtual environment activated." -echo "To start the application, run: ubuntu-voice-typing" +echo "Vocalinux virtual environment activated." +echo "To start the application, run: vocalinux" EOF - chmod +x activate-ubuntu-voice-typing.sh - print_info "Created activation script: activate-ubuntu-voice-typing.sh" + chmod +x activate-vocalinux.sh + print_info "Created activation script: activate-vocalinux.sh" fi # Modify setup.py to exclude PyGObject when installing in a venv @@ -160,7 +160,7 @@ fi # Install Python package if [[ "$DEV_MODE" == "yes" ]]; then - print_info "Installing Ubuntu Voice Typing in development mode..." + print_info "Installing Vocalinux in development mode..." if [[ "$USE_VENV" == "yes" ]]; then pip install -e . pip install pytest pytest-mock pytest-cov pynput @@ -169,7 +169,7 @@ if [[ "$DEV_MODE" == "yes" ]]; then pip3 install --user pytest pytest-mock pytest-cov pynput fi else - print_info "Installing Ubuntu Voice Typing Python package..." + print_info "Installing Vocalinux Python package..." if [[ "$USE_VENV" == "yes" ]]; then pip install . else @@ -207,12 +207,12 @@ fi # Install desktop entry print_info "Installing desktop entry..." mkdir -p ~/.local/share/applications -cp ubuntu-voice-typing.desktop ~/.local/share/applications/ +cp vocalinux.desktop ~/.local/share/applications/ # If using virtual environment, modify the desktop entry to use the venv if [[ "$USE_VENV" == "yes" ]]; then - VENV_SCRIPT_PATH="$(realpath $VENV_DIR/bin/ubuntu-voice-typing)" - sed -i "s|^Exec=ubuntu-voice-typing|Exec=$VENV_SCRIPT_PATH|" ~/.local/share/applications/ubuntu-voice-typing.desktop + VENV_SCRIPT_PATH="$(realpath $VENV_DIR/bin/vocalinux)" + sed -i "s|^Exec=vocalinux|Exec=$VENV_SCRIPT_PATH|" ~/.local/share/applications/vocalinux.desktop print_info "Updated desktop entry to use virtual environment" fi @@ -235,11 +235,11 @@ print_success "Installation complete!" if [[ "$USE_VENV" == "yes" ]]; then print_info "To activate the virtual environment in the future, run:" - print_info " source activate-ubuntu-voice-typing.sh" - print_info "You can then launch Ubuntu Voice Typing by running 'ubuntu-voice-typing'" + print_info " source activate-vocalinux.sh" + print_info "You can then launch Vocalinux by running 'vocalinux'" else - print_info "You can now launch Ubuntu Voice Typing from your application menu" - print_info "or by running 'ubuntu-voice-typing' in a terminal." + print_info "You can now launch Vocalinux from your application menu" + print_info "or by running 'vocalinux' in a terminal." fi echo diff --git a/setup.py b/setup.py index 773d269..669efe3 100644 --- a/setup.py +++ b/setup.py @@ -2,10 +2,10 @@ from setuptools import setup, find_packages setup( - name="ubuntu-voice-typing", + name="vocalinux", version="0.1.0", - description="A seamless voice dictation system for Ubuntu", - author="Ubuntu Voice Typing Team", + description="A seamless voice dictation system for Linux", + author="Vocalinux Team", author_email="project@example.com", packages=find_packages(where="src"), package_dir={"": "src"}, @@ -27,7 +27,7 @@ setup( }, entry_points={ "console_scripts": [ - "ubuntu-voice-typing=main:main", + "vocalinux=main:main", ], }, classifiers=[ diff --git a/src/main.py b/src/main.py index 44c037e..d80e034 100644 --- a/src/main.py +++ b/src/main.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Main entry point for Ubuntu Voice Typing application. +Main entry point for Vocalinux application. """ import argparse @@ -25,7 +25,7 @@ logger = logging.getLogger(__name__) def parse_arguments(): """Parse command line arguments.""" - parser = argparse.ArgumentParser(description="Ubuntu Voice Typing") + parser = argparse.ArgumentParser(description="Vocalinux") parser.add_argument( "--debug", action="store_true", help="Enable debug logging" ) @@ -54,7 +54,7 @@ def main(): logger.debug("Debug logging enabled") # Initialize main components - logger.info("Initializing Ubuntu Voice Typing...") + logger.info("Initializing Vocalinux...") # Initialize speech recognition engine speech_engine = recognition_manager.SpeechRecognitionManager( diff --git a/src/speech_recognition/command_processor.py b/src/speech_recognition/command_processor.py index da446e9..fb0b178 100644 --- a/src/speech_recognition/command_processor.py +++ b/src/speech_recognition/command_processor.py @@ -1,5 +1,5 @@ """ -Command processor for Ubuntu Voice Typing. +Command processor for Vocalinux. This module processes text commands from speech recognition, such as "new line", "period", etc. diff --git a/src/speech_recognition/recognition_manager.py b/src/speech_recognition/recognition_manager.py index e8e5677..dc34798 100644 --- a/src/speech_recognition/recognition_manager.py +++ b/src/speech_recognition/recognition_manager.py @@ -1,5 +1,5 @@ """ -Speech recognition manager module for Ubuntu Voice Typing. +Speech recognition manager module for Vocalinux. This module provides a unified interface to different speech recognition engines, currently supporting VOSK and Whisper. @@ -40,7 +40,7 @@ except ImportError: logger = logging.getLogger(__name__) # Define constants -MODELS_DIR = os.path.expanduser("~/.local/share/ubuntu-voice-typing/models") +MODELS_DIR = os.path.expanduser("~/.local/share/vocalinux/models") class RecognitionState(Enum): diff --git a/src/text_injection/text_injector.py b/src/text_injection/text_injector.py index 4c5e5c9..642c47e 100644 --- a/src/text_injection/text_injector.py +++ b/src/text_injection/text_injector.py @@ -1,5 +1,5 @@ """ -Text injection module for Ubuntu Voice Typing. +Text injection module for Vocalinux. This module is responsible for injecting recognized text into the active application, supporting both X11 and Wayland environments. diff --git a/src/ui/audio_feedback.py b/src/ui/audio_feedback.py index 7c40618..74c15fa 100644 --- a/src/ui/audio_feedback.py +++ b/src/ui/audio_feedback.py @@ -1,5 +1,5 @@ """ -Audio feedback module for Ubuntu Voice Typing. +Audio feedback module for Vocalinux. This module provides audio feedback for various recognition states. """ diff --git a/src/ui/config_manager.py b/src/ui/config_manager.py index e721c3c..bc33ecc 100644 --- a/src/ui/config_manager.py +++ b/src/ui/config_manager.py @@ -1,5 +1,5 @@ """ -Configuration manager for Ubuntu Voice Typing. +Configuration manager for Vocalinux. This module handles loading, saving, and accessing user preferences. """ @@ -13,7 +13,7 @@ from typing import Any, Dict, Optional logger = logging.getLogger(__name__) # Define constants -CONFIG_DIR = os.path.expanduser("~/.config/ubuntu-voice-typing") +CONFIG_DIR = os.path.expanduser("~/.config/vocalinux") CONFIG_FILE = os.path.join(CONFIG_DIR, "config.json") # Default configuration diff --git a/src/ui/keyboard_shortcuts.py b/src/ui/keyboard_shortcuts.py index 26977b1..c39f53d 100644 --- a/src/ui/keyboard_shortcuts.py +++ b/src/ui/keyboard_shortcuts.py @@ -1,5 +1,5 @@ """ -Keyboard shortcut manager for Ubuntu Voice Typing. +Keyboard shortcut manager for Vocalinux. This module provides global keyboard shortcut functionality to start/stop speech recognition with a keystroke. diff --git a/src/ui/tray_indicator.py b/src/ui/tray_indicator.py index 79d2180..602c184 100644 --- a/src/ui/tray_indicator.py +++ b/src/ui/tray_indicator.py @@ -1,5 +1,5 @@ """ -System tray indicator module for Ubuntu Voice Typing. +System tray indicator module for Vocalinux. This module provides a system tray indicator for controlling the speech recognition process and displaying its status. @@ -26,8 +26,8 @@ from ui.keyboard_shortcuts import KeyboardShortcutManager logger = logging.getLogger(__name__) # Define constants -APP_ID = "ubuntu-voice-typing" -ICON_DIR = os.path.expanduser("~/.local/share/ubuntu-voice-typing/icons") +APP_ID = "vocalinux" +ICON_DIR = os.path.expanduser("~/.local/share/vocalinux/icons") DEFAULT_ICON = "microphone-off" ACTIVE_ICON = "microphone" PROCESSING_ICON = "microphone-process" @@ -35,7 +35,7 @@ PROCESSING_ICON = "microphone-process" class TrayIndicator: """ - System tray indicator for Ubuntu Voice Typing. + System tray indicator for Vocalinux. This class provides a system tray icon with a menu for controlling the speech recognition process. @@ -210,11 +210,11 @@ class TrayIndicator: logger.debug("About clicked") about_dialog = Gtk.AboutDialog() - about_dialog.set_program_name("Ubuntu Voice Typing") + about_dialog.set_program_name("Vocalinux") about_dialog.set_version("0.1.0") - about_dialog.set_copyright("© 2025 Ubuntu Voice Typing Team") + about_dialog.set_copyright("© 2025 Vocalinux Team") about_dialog.set_comments("A seamless voice dictation system for Ubuntu") - about_dialog.set_website("https://github.com/ubuntu-voice-typing") + about_dialog.set_website("https://github.com/vocalinux") about_dialog.set_website_label("GitHub Repository") about_dialog.set_license_type(Gtk.License.GPL_3_0) diff --git a/tests/run_basic_tests.py b/tests/run_basic_tests.py index ba0b93b..d6f215f 100755 --- a/tests/run_basic_tests.py +++ b/tests/run_basic_tests.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Basic test script for Ubuntu Voice Typing. +Basic test script for Vocalinux. This script performs basic tests of individual components without requiring complex dependencies like GTK or VOSK. @@ -13,7 +13,7 @@ import tempfile import json from unittest.mock import MagicMock, patch -print("Starting basic tests for Ubuntu Voice Typing") +print("Starting basic tests for Vocalinux") # Add project root to Python path project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) diff --git a/tests/test_basic.py b/tests/test_basic.py index 57e1ef2..b7b7b04 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -1,5 +1,5 @@ """ -Basic tests for the Ubuntu Voice Typing application. +Basic tests for the Vocalinux application. """ import unittest diff --git a/ubuntu-voice-typing.desktop b/ubuntu-voice-typing.desktop index 4e6cd60..a480306 100644 --- a/ubuntu-voice-typing.desktop +++ b/ubuntu-voice-typing.desktop @@ -1,11 +1,11 @@ [Desktop Entry] Version=1.0 Type=Application -Name=Ubuntu Voice Typing -Comment=Voice dictation system for Ubuntu +Name=Vocalinux +Comment=Voice dictation system for Linux GenericName=Voice Typing -Exec=ubuntu-voice-typing -Icon=/usr/share/icons/hicolor/scalable/apps/ubuntu-voice-typing.svg +Exec=vocalinux +Icon=/usr/share/icons/hicolor/scalable/apps/vocalinux.svg Terminal=false Categories=Utility;Accessibility; Keywords=voice;typing;dictation;speech;recognition; From 0151cc663305f461cf23e919408de61f102a547a Mon Sep 17 00:00:00 2001 From: jatinkrmalik Date: Sat, 12 Apr 2025 00:59:48 -0500 Subject: [PATCH 2/2] More updates --- activate-ubuntu-voice-typing.sh => activate-vocalinux.sh | 0 setup.py | 3 +++ 2 files changed, 3 insertions(+) rename activate-ubuntu-voice-typing.sh => activate-vocalinux.sh (100%) diff --git a/activate-ubuntu-voice-typing.sh b/activate-vocalinux.sh similarity index 100% rename from activate-ubuntu-voice-typing.sh rename to activate-vocalinux.sh diff --git a/setup.py b/setup.py index 669efe3..b10c5c9 100644 --- a/setup.py +++ b/setup.py @@ -15,6 +15,9 @@ setup( "python-xlib", # For keyboard shortcut handling in X11 "pynput", # For keyboard/mouse events "PyGObject", # For GTK UI + "requests", # For downloading models + "tqdm", # For progress bars during downloads + "numpy" # For numerical operations ], extras_require={ "whisper": ["whisper", "torch"], # Optional Whisper AI support