{"id":29175833,"url":"https://github.com/deepgram/deepgram-eos-heuristics","last_synced_at":"2026-02-02T20:40:44.293Z","repository":{"id":266759252,"uuid":"867782709","full_name":"deepgram/deepgram-eos-heuristics","owner":"deepgram","description":"Reference implementations for robust end-of-speech detection using Deepgram's real-time API and custom local heuristics","archived":false,"fork":false,"pushed_at":"2025-05-30T20:32:01.000Z","size":20,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-18T21:30:06.095Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/deepgram.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":"2024-10-04T17:56:34.000Z","updated_at":"2025-03-09T20:30:39.000Z","dependencies_parsed_at":"2024-12-06T01:20:34.355Z","dependency_job_id":"fb10c5b9-4e69-4fd1-ab7b-6c4ba348957a","html_url":"https://github.com/deepgram/deepgram-eos-heuristics","commit_stats":null,"previous_names":["jabari-dg/deepgram-eos-heuristics","deepgram/deepgram-eos-heuristics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deepgram/deepgram-eos-heuristics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fdeepgram-eos-heuristics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fdeepgram-eos-heuristics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fdeepgram-eos-heuristics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fdeepgram-eos-heuristics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepgram","download_url":"https://codeload.github.com/deepgram/deepgram-eos-heuristics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fdeepgram-eos-heuristics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29019460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T18:51:31.335Z","status":"ssl_error","status_checked_at":"2026-02-02T18:49:20.777Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-07-01T16:11:46.986Z","updated_at":"2026-02-02T20:40:44.262Z","avatar_url":"https://github.com/deepgram.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deepgram Speech Segmentation Heuristics\n\nThis repository contains reference implementations for robust end-of-speech detection using a combination of Deepgram's real-time transcription API features and custom heuristics. The goal is to demonstrate how low-latency, real-time solutions can be created using the Deepgram API, open-source Voice Activity Detection (VAD), and tailored heuristics.\n\n## Overview\n\nThe project showcases how to combine various Deepgram API features with local processing to achieve accurate and low-latency utterance segmentation. It utilizes:\n\n- Deepgram API features:\n  - Endpointing\n  - Utterance End\n  - Word-level timestamps\n- Local Voice Activity Detection (VAD) using [`silero-vad`](https://github.com/snakers4/silero-vad)\n- Custom heuristics for speech detection and endpointing\n\nThe system is designed to be modular, allowing for easy addition and modification of different event handlers and heuristics.\n\n## Project Structure\n\nThe repository is organized as follows:\n```\nproject_root/\n│\n├── base_heuristic.py\n├── vad.py\n├── examples\n│ └── vad_implementation\n│  ├── heuristic.py\n│  ├── terminal_renderer.py\n│  ├── main.py\n│  └── README.md\n├── requirements.txt\n└── README.md\n```\n\n- `base_heuristic.py`: Contains the base `Heuristic` class for implementing custom logic.\n- `vad.py`: Implements Voice Activity Detection using silero-vad.\n- `examples/`: Contains different implementation examples.\n  - `vad_implementation/`: An example implementation using VAD and custom heuristics.\n\n## Getting Started\n\nTo use any of the reference implementations:\n\n1. Navigate to the specific example folder (e.g., `examples/vad_implementation/`).\n2. Follow the README instructions in that folder for setup and execution.\n\nEach example folder contains its own `requirements.txt` file and specific instructions for running the implementation.\n\n## Examples\n\n### VAD Implementation\n\nThe VAD implementation demonstrates how to combine Deepgram's real-time transcription with local Voice Activity Detection for advanced end-of-speech detection. It showcases the use of `silero-vad` alongside Deepgram's API features.\n\nFor more details, see the README in the `examples/vad_implementation/` folder.\n\n## Future Examples\n\nWhile the current VAD implementation represents our recommended approach for robust, low-latency speech detection, we plan to add the following examples:\n\n- A web app implementation demonstrating the VAD approach with a simple web frontend\n- Examples showing heuristic approaches to end-of-speech detection without using a local VAD, relying solely on analysis of transcript results\n\nIt's important to note that for the most reliable and low-latency performance, we recommend using a local VAD (such as `silero-VAD`) as close as possible to where audio enters the application. This forms the cornerstone of a robust heuristic approach. Other examples are provided to demonstrate alternative methods and use cases, but may not achieve the same level of performance as the local VAD-based approach.\n\n## Dependencies\n\nThe main dependencies for this project are:\n\n- [Deepgram Python SDK](https://github.com/deepgram/deepgram-python): For interfacing with the Deepgram API\n- [silero-vad](https://github.com/snakers4/silero-vad): For local Voice Activity Detection\n\nSpecific dependencies for each implementation are listed in the respective `requirements.txt` files.\n\n## Note\n\nThis is a reference implementation intended for demonstration purposes. It showcases how to leverage Deepgram's API features alongside custom processing for advanced speech endpointing scenarios.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgram%2Fdeepgram-eos-heuristics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepgram%2Fdeepgram-eos-heuristics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgram%2Fdeepgram-eos-heuristics/lists"}