{"id":26415596,"url":"https://github.com/lcamillo/anki-tts","last_synced_at":"2025-08-14T08:13:51.539Z","repository":{"id":282939802,"uuid":"950162933","full_name":"lcamillo/anki-tts","owner":"lcamillo","description":"A free, open-source app for Anki text-to-speech in MacOS.","archived":false,"fork":false,"pushed_at":"2025-05-04T06:36:35.000Z","size":73,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T07:27:49.737Z","etag":null,"topics":["anki","macos","text-to-speech"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lcamillo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-17T18:18:24.000Z","updated_at":"2025-05-04T06:36:38.000Z","dependencies_parsed_at":"2025-03-17T19:35:49.410Z","dependency_job_id":"ceec9ed1-04ed-4c6c-9f49-ccbcae68159d","html_url":"https://github.com/lcamillo/anki-tts","commit_stats":null,"previous_names":["lcamillo/anki-tts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lcamillo/anki-tts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcamillo%2Fanki-tts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcamillo%2Fanki-tts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcamillo%2Fanki-tts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcamillo%2Fanki-tts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lcamillo","download_url":"https://codeload.github.com/lcamillo/anki-tts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcamillo%2Fanki-tts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270385467,"owners_count":24574556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anki","macos","text-to-speech"],"created_at":"2025-03-18T00:53:47.754Z","updated_at":"2025-08-14T08:13:51.518Z","avatar_url":"https://github.com/lcamillo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anki TTS\n\nA macOS menu bar application providing Text-to-Speech capabilities for Anki flashcards.\n\n## Features\n\n- 🎧 **Automatic TTS:** Reads Anki card content aloud during reviews.\n- ⚙️ **Menu Bar App:** Runs discreetly in the menu bar, not as a window.\n- ⏩ **Speed Control:** Adjust speech rate from 1.0x to 1.8x (0.1 increments, default 1.3x).\n- 🔒 **Single-Instance:** Prevents multiple app instances to avoid overlapping voices.\n- 🐍 **Python Backend:** Core TTS functionality handled by a Python script.\n\n## Requirements\n\n- macOS 13.0 or later\n- Python 3.8+\n- Conda environment 'anki-tts'\n- Anki with AnkiConnect plugin installed\n\n## Installation\n\n1. **Clone the Repository:**\n   ```bash\n   git clone https://github.com/yourusername/anki-tts.git\n   cd anki-tts\n   ```\n\n2. **Setup Conda Environment:**\n   ```bash\n   conda create -n anki-tts python=3.9\n   conda activate anki-tts\n   pip install pyttsx3 requests\n   ```\n\n3. **Build the Swift App:**\n   ```bash\n   cd swift_app\n   swift build -c release\n   ```\n\n## Usage\n\n1. **Start Anki:** Ensure Anki is running and the AnkiConnect plugin is installed and enabled.\n2. **Run the App:**\n   ```bash\n   # From the swift_app directory with Conda environment activated:\n   conda activate anki-tts\n   cd swift_app\n   swift run\n   ```\n   \n   Alternatively, you can run the built release version:\n   ```bash\n   # From the project root with Conda environment activated:\n   conda activate anki-tts\n   swift_app/.build/release/AnkiTTSApp\n   ```\n3. **Control via Menu Bar:**\n   * The Anki TTS icon should appear in your macOS menu bar.\n   * Click the icon to access the dropdown menu.\n   * Adjust **Speech Speed** (1.0x to 1.8x).\n   * Click **Quit** to exit the application.\n4. **Use Anki Normally:**\n   * The app will automatically read the front of each card as you review.\n   * Speed settings take effect immediately for new cards.\n\n## Project Structure\n\n```\n.\n├── swift_app/              # Swift menu bar application (Frontend)\n│   ├── Sources/AnkiTTSApp/ # Swift source files (main.swift)\n│   ├── Resources/          # Resources (contains anki_tts.py)\n│   └── Package.swift       # Swift package manifest\n└── README.md               # This file\n```\n\n## Troubleshooting\n\n1. **App doesn't start / No menu bar icon / \"Could not find anki_tts.py\":**\n   * Verify `anki_tts.py` exists in `swift_app/Resources/`.\n   * Try cleaning the build directory (`rm -rf swift_app/.build`) and rebuilding.\n   * Ensure Anki is running with AnkiConnect.\n   * Verify Python dependencies are installed.\n\n2. **No TTS sound / Text not being spoken:**\n   * Check system volume and ensure audio output is working.\n   * Examine terminal output for TTS-specific errors.\n\n3. **Hearing multiple voices simultaneously:**\n   * The app has a single-instance check, but if it crashed previously:\n     * Kill any lingering Python processes: `pkill -f \"python -u.*anki_tts\\\\.py\"`\n     * Make sure only one instance of the app is running\n     * Remove any temporary speed files: `rm -f /tmp/anki_tts_speed_control.txt`\n\n4. **Speed control not working:**\n   * The app uses a file-based speed control system\n   * Check if temporary directory is writable\n   * Try manually setting the speed file: `echo \"1.5\" \u003e /tmp/anki_tts_speed_control.txt`\n\n## Technical Details\n\nThe app uses a file-based system to communicate speed settings between the Swift UI and Python TTS engine. Speed changes are written to a temporary file that is continuously monitored by the Python script, allowing real-time adjustments without restarting the TTS engine.\n\n## Contributing\n\nFeel free to open issues or submit pull requests for any improvements. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcamillo%2Fanki-tts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flcamillo%2Fanki-tts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcamillo%2Fanki-tts/lists"}