{"id":25392251,"url":"https://github.com/jeanjerome/echoinstone","last_synced_at":"2025-04-10T00:53:37.193Z","repository":{"id":277689169,"uuid":"932112339","full_name":"jeanjerome/EchoInStone","owner":"jeanjerome","description":"EchoInStone is an audio processing tool that transcribes, diarizes, and aligns speaker segments from audio files, prioritizing accuracy and reliability.","archived":false,"fork":false,"pushed_at":"2025-03-20T07:03:53.000Z","size":1023,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T00:53:30.292Z","etag":null,"topics":["alignment","diarization","localhost","pyannote","python","transcribe","whisper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeanjerome.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-02-13T11:40:12.000Z","updated_at":"2025-03-24T20:11:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"d8993aa7-13d5-40fc-bdbf-98bcf1f1f713","html_url":"https://github.com/jeanjerome/EchoInStone","commit_stats":null,"previous_names":["jeanjerome/echoinstone"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanjerome%2FEchoInStone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanjerome%2FEchoInStone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanjerome%2FEchoInStone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeanjerome%2FEchoInStone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeanjerome","download_url":"https://codeload.github.com/jeanjerome/EchoInStone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137995,"owners_count":21053775,"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":["alignment","diarization","localhost","pyannote","python","transcribe","whisper"],"created_at":"2025-02-15T16:27:52.078Z","updated_at":"2025-04-10T00:53:37.184Z","avatar_url":"https://github.com/jeanjerome.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EchoInStone\n\n**EchoInStone** is a comprehensive audio processing tool designed to transcribe, diarize, and align speaker segments from audio files with a focus on achieving the most accurate and faithful transcription possible. It supports various audio sources, including YouTube videos and podcasts, and provides a flexible pipeline for processing audio data, prioritizing precision and reliability over speed.\n\n## Features\n\n- **Transcription**: Convert audio files into text using state-of-the-art automatic speech recognition (ASR) model, `Whisper Large v3 Turbo`.\n- **Diarization**: Identify and separate different speakers in an audio file with the cutting-edge model, `Pyannote Speaker Diarization 3.1`.\n- **Alignment**: Align transcribed text with the corresponding audio segments using a customized algorithm tailored to be highly efficient and faithful to the outputs of Whisper and Pyannote, `SpeakerAlignement`.\n- **Flexible and Extensible Pipeline**: Easily integrate new models or processing steps into an orchestrated pipeline, `AudioProcessingOrchestrator`.\n\n\u003e Note: The current version of EchoInStone is a preliminary release. Future updates will include more flexible configuration options and enhanced functionality.\n\n## Installation\n\n### Prerequisites\n\n- Python 3.11 or higher\n- Poetry (dependency management tool)\n\n### Steps\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/jeanjerome/EchoInStone.git\n   cd EchoInStone\n   ```\n\n2. **Install dependencies using Poetry**:\n   ```bash\n   poetry install\n   ```\n\n3. **Configure logging** (optional):\n   - The logging configuration is set up to output logs to both the console and a file (`app.log`). You can modify the logging settings in `logging_config.py`.\n\n4. **Configure Hugging Face Token**:\n\n  - Add your Hugging Face token to this file. You can obtain a token by following these steps:\n     1. Go to [Hugging Face Settings](https://huggingface.co/settings/tokens).\n     2. Click on \"New token\".\n     3. Copy the generated token and paste it into the `EchoInStone/config.py` file as shown below:\n\n```python\n# EchoInStone/config.py\n\n# Hugging Face authentication token\nHUGGING_FACE_TOKEN = \"your_token_here\"\n```\n\n## Usage\n\n### Basic Example\n\nTo transcribe and diarize a YouTube video, you can run the following command:\n\n```bash\npoetry run python main.py \u003caudio_input_url\u003e\n```\n\n- `\u003caudio_input_url\u003e`: The URL of the audio input (YouTube, podcast, or direct audio file).\n\n### Command-Line Arguments\n\n- **`--output_dir`**: Directory to save the output files. Default is `\"results\"`.\n  ```bash\n  poetry run python main.py \u003caudio_input_url\u003e --output_dir \u003coutput_directory\u003e\n  ```\n\n- **`--transcription_output`**: Filename for the transcription output. Default is `\"speaker_transcriptions.json\"`.\n  ```bash\n  poetry run python main.py \u003caudio_input_url\u003e --transcription_output \u003coutput_filename\u003e\n  ```\n\n### Examples\n\n- **Transcribe and diarize a YouTube video**:\n  ```bash\n  poetry run python main.py \"https://www.youtube.com/watch?v=plZRCMx_Jd8\"\n  ```\n\n- **Transcribe and diarize a podcast**:\n  ```bash\n  poetry run python main.py \"https://radiofrance-podcast.net/podcast09/rss_13957.xml\"\n  ```\n\n- **Transcribe and diarize a direct MP3 file**:\n  ```bash\n  poetry run python main.py \"https://media.radiofrance-podcast.net/podcast09/25425-13.02.2025-ITEMA_24028677-2025C53905E0006-NET_MFC_D378B90D-D570-44E9-AB5A-F0CC63B05A14-21.mp3\"\n  ```\n\n## Testing\n\nTo run the tests, use the following command:\n```bash\npoetry run pytest\n```\n\nThis command will execute all the tests, including BDD tests, to ensure the functionality of the application.\n\n## Configuration\n\n### Logging\n\nLogging is configured to output messages to both the console and a file (`app.log`). You can adjust the logging level and format in the `logging_config.py` file.\n\n### Models\n\n- **Transcription Model**: The default transcription model is `openai/whisper-large-v3-turbo`. You can change this by modifying the `model_name` parameter in the `WhisperAudioTranscriber` initialization.\n- **Diarization Model**: The default diarization model is `pyannote/speaker-diarization-3.1`. You can change this by modifying the model loading code in the `PyannoteDiarizer` class.\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Make your changes and commit them (`git commit -am 'Add new feature'`).\n4. Push to the branch (`git push origin feature-branch`).\n5. Create a new Pull Request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Thanks to the open-source community for the various libraries and models used in this project.\n- Special thanks to the contributors and maintainers of the models and tools that make this project possible.\n\n## Contact\n\nFor any questions or suggestions, please open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeanjerome%2Fechoinstone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeanjerome%2Fechoinstone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeanjerome%2Fechoinstone/lists"}