{"id":28956030,"url":"https://github.com/link-/jarvis","last_synced_at":"2025-06-23T20:32:28.630Z","repository":{"id":295710355,"uuid":"990026486","full_name":"Link-/Jarvis","owner":"Link-","description":"Continuous audio transcription script that records audio from your device's microphone and transcribes it to text in real-time using OpenAI's Whisper model.","archived":false,"fork":false,"pushed_at":"2025-05-25T10:55:48.000Z","size":12,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T23:52:08.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Link-.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-05-25T10:55:05.000Z","updated_at":"2025-06-06T23:19:10.000Z","dependencies_parsed_at":"2025-05-27T01:41:22.647Z","dependency_job_id":"97fec77b-6868-45a3-a98a-da51a4ad09b2","html_url":"https://github.com/Link-/Jarvis","commit_stats":null,"previous_names":["link-/jarvis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Link-/Jarvis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Link-%2FJarvis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Link-%2FJarvis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Link-%2FJarvis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Link-%2FJarvis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Link-","download_url":"https://codeload.github.com/Link-/Jarvis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Link-%2FJarvis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261552325,"owners_count":23176137,"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","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":[],"created_at":"2025-06-23T20:30:36.414Z","updated_at":"2025-06-23T20:32:28.620Z","avatar_url":"https://github.com/Link-.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jarvis Audio Transcription\n\nA continuous audio transcription script that records audio from your device's microphone and transcribes it to text in real-time using OpenAI's Whisper model.\n\n## Features\n\n- **Continuous Recording**: Records audio from your device's microphone in chunks\n- **Real-time Transcription**: Transcribes speech to text using OpenAI's Whisper model\n- **Memory-efficient**: Processes audio in chunks with minimal memory overhead\n- **Silence Detection**: Skips processing silent audio segments\n- **Configurable**: Multiple command-line options for customization\n- **Debug Mode**: Detailed logging for troubleshooting\n\n## How It Works\n\n1. Audio is continuously recorded in small chunks\n2. Each chunk is analyzed for speech content\n3. Speech segments are processed through the Whisper model\n4. Transcribed text is printed to the console with timestamps\n\n### Sequence Diagram\n\nThe following diagram illustrates the multi-threaded architecture and data flow of the transcription process:\n\n```mermaid\nsequenceDiagram\n    participant Main\n    participant RecordingThread\n    participant AudioQueue\n    participant TranscriptionThread\n    participant WhisperModel\n    participant Console\n\n    Note over Main: Initialize ContinuousTranscriber\n    Main-\u003e\u003eMain: Load Whisper Model\n    Main-\u003e\u003eRecordingThread: Start recording thread\n    Main-\u003e\u003eTranscriptionThread: Start transcription thread\n    \n    loop Recording Loop\n        RecordingThread-\u003e\u003eRecordingThread: Record audio chunk (5s)\n        RecordingThread-\u003e\u003eRecordingThread: Save overlap buffer (0.5s)\n        RecordingThread-\u003e\u003eRecordingThread: Calculate RMS for silence detection\n        alt RMS \u003e silence_threshold (Speech detected)\n            RecordingThread--\u003e\u003eAudioQueue: Push audio chunk + previous overlap\n        else RMS \u003c= silence_threshold\n            RecordingThread-\u003e\u003eRecordingThread: Skip silent audio (no processing)\n        end\n    end\n    \n    loop Transcription Loop\n        AudioQueue--\u003e\u003eTranscriptionThread: Pop audio chunk when available\n        TranscriptionThread-\u003e\u003eWhisperModel: Send audio for transcription\n        WhisperModel--\u003e\u003eTranscriptionThread: Return transcribed text\n        alt Transcription not empty\n            TranscriptionThread-\u003e\u003eConsole: Output text with timestamp\n        end\n    end\n    \n    Note over Main: On Ctrl+C\n    Main-\u003e\u003eRecordingThread: Stop recording\n    Main-\u003e\u003eTranscriptionThread: Stop transcription\n    Main-\u003e\u003eMain: Terminate PyAudio\n```\n\n## Requirements\n\n- Python 3.7+\n- PortAudio (for audio recording)\n- FFmpeg (required by Whisper)\n\n## Quick Start\n\n### 1. Setup the Environment\n\n```bash\n# Clone the repository (if not already done)\n# git clone \u003crepository-url\u003e\n# cd \u003crepository-directory\u003e\n\n# Setup development environment (creates venv, installs dependencies)\nmake setup\n```\n\n### 2. List Available Audio Devices\n\n```bash\nmake list-devices\n```\n\n### 3. Run the Transcription\n\n```bash\n# Run with default settings\nmake run\n\n# Run with debug logging enabled\nmake run-debug\n```\n\n## Command-Line Options\n\nThe script supports various command-line arguments for customization:\n\n```txt\n--chunk-duration SEC    Duration of each audio chunk in seconds (default: 5)\n--sample-rate RATE      Audio sample rate in Hz (default: 16000)\n--channels N            Number of audio channels (default: 1)\n--overlap-duration SEC  Overlap between chunks in seconds (default: 0.5)\n--silence-threshold TH  RMS threshold for silence detection (default: 0.01)\n--device-index N        Specific audio device index (default: system default)\n--model SIZE            Whisper model size (default: base)\n                        Options: tiny, turbo, base, small, medium, large\n--list-devices          List available audio input devices and exit\n--debug                 Enable debug mode for verbose logging\n```\n\nExample:\n\n```bash\n# Using a specific device and the small model\nvenv/bin/python record.py --device-index 2 --model small\n\n# With custom audio settings\nvenv/bin/python record.py --chunk-duration 3 --sample-rate 44100 --overlap-duration 0.2\n```\n\n## Troubleshooting\n\nIf you encounter issues:\n\n1. Use `--list-devices` to ensure the correct audio source is selected\n2. Enable debug mode with `--debug` for detailed logging\n3. Try different `--silence-threshold` values if speech is not being detected\n4. Check that system dependencies (PortAudio, FFmpeg) are properly installed\n5. Try a smaller model like \"tiny\" if transcription is slow\n\n## License\n\n[Specify your license here]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flink-%2Fjarvis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flink-%2Fjarvis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flink-%2Fjarvis/lists"}