Merge pull request #2 from jatinkrmalik/refactor_again

Refactor project name from 'Ubuntu Voice Typing' to 'Vocalinux'
This commit is contained in:
Jatin K Malik
2025-04-12 01:11:45 -05:00
committed by GitHub
19 changed files with 93 additions and 90 deletions
+2 -2
View File
@@ -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.
+16 -16
View File
@@ -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]"
-5
View File
@@ -1,5 +0,0 @@
#!/bin/bash
# This script activates the Ubuntu Voice Typing 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"
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
# This script activates the Vocalinux virtual environment
source "$(dirname "$(realpath "$0")")/venv/bin/activate"
echo "Vocalinux virtual environment activated."
echo "To start the application, run: vocalinux"
+9 -9
View File
@@ -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.
+7 -7
View File
@@ -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.
+22 -22
View File
@@ -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
+7 -4
View File
@@ -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"},
@@ -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
@@ -27,7 +30,7 @@ setup(
},
entry_points={
"console_scripts": [
"ubuntu-voice-typing=main:main",
"vocalinux=main:main",
],
},
classifiers=[
+3 -3
View File
@@ -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(
+1 -1
View File
@@ -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.
@@ -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):
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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.
"""
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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.
+7 -7
View File
@@ -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)
+2 -2
View File
@@ -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__), '..'))
+1 -1
View File
@@ -1,5 +1,5 @@
"""
Basic tests for the Ubuntu Voice Typing application.
Basic tests for the Vocalinux application.
"""
import unittest
+4 -4
View File
@@ -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;