{"id":32301563,"url":"https://github.com/tempo-riz/deepgram_speech_to_text","last_synced_at":"2026-02-24T14:37:06.353Z","repository":{"id":227727016,"uuid":"772212225","full_name":"tempo-riz/deepgram_speech_to_text","owner":"tempo-riz","description":"A Deepgram client for Dart and Flutter, supporting all Speech-to-Text and Text-to-Speech features on every platform.","archived":false,"fork":false,"pushed_at":"2025-09-12T08:39:28.000Z","size":3211,"stargazers_count":18,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-23T05:46:50.770Z","etag":null,"topics":["dart","deepgram-api","flutter","open-source","sdk","speech-to-text","text-to-speech"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/deepgram_speech_to_text","language":"Dart","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/tempo-riz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["tempo-riz"],"patreon":null,"open_collective":null,"ko_fi":"temporiz","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2024-03-14T18:44:00.000Z","updated_at":"2025-09-12T08:39:31.000Z","dependencies_parsed_at":"2024-05-22T14:38:39.670Z","dependency_job_id":"a86a83aa-aa11-495c-97ac-cc6d03e4464f","html_url":"https://github.com/tempo-riz/deepgram_speech_to_text","commit_stats":null,"previous_names":["tempo-riz/deepgram_speech_to_text"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tempo-riz/deepgram_speech_to_text","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempo-riz%2Fdeepgram_speech_to_text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempo-riz%2Fdeepgram_speech_to_text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempo-riz%2Fdeepgram_speech_to_text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempo-riz%2Fdeepgram_speech_to_text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tempo-riz","download_url":"https://codeload.github.com/tempo-riz/deepgram_speech_to_text/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempo-riz%2Fdeepgram_speech_to_text/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29785672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"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":["dart","deepgram-api","flutter","open-source","sdk","speech-to-text","text-to-speech"],"created_at":"2025-10-23T05:42:28.825Z","updated_at":"2026-02-24T14:37:06.348Z","avatar_url":"https://github.com/tempo-riz.png","language":"Dart","funding_links":["https://github.com/sponsors/tempo-riz","https://ko-fi.com/temporiz","https://ko-fi.com/M4M71BK1YJ"],"categories":[],"sub_categories":[],"readme":"\u003c!-- \n\nThis README describes the package. If you publish this package to pub.dev,\nthis README's contents appear on the landing page for your package.\n\nFor information about how to write a good package README, see the guide for\n[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). \n\nFor general information about developing packages, see the Dart guide for\n[creating packages](https://dart.dev/guides/libraries/create-library-packages)\nand the Flutter guide for\n[developing packages and plugins](https://flutter.dev/developing-packages). \n\ncommands :\n\ndart doc\ndart format .\nflutter pub publish --dry-run\n--\u003e\n\n# Deepgram Dart\n\n![Pub Version](https://img.shields.io/pub/v/deepgram_speech_to_text)\n![Pub Likes](https://img.shields.io/pub/likes/deepgram_speech_to_text)\n![Pub Monthly Downloads](https://img.shields.io/pub/dm/deepgram_speech_to_text)\n\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/M4M71BK1YJ)\n\nA Deepgram client for Dart and Flutter, supporting all Speech-to-Text and Text-to-Speech features on every platform.\n\n\n\nFeel free to create issues, contribute to this project or to ask for new features on [GitHub](https://github.com/tempo-riz/deepgram_speech_to_text) !\n\n## Features\n\n| **Speech-to-Text**           | **Status** | **Methods**                              |\n|------------------------------|------------|------------------------------------------|\n| From File                    | ✅         | `listen.file()`, `listen.path()`         |\n| From URL                     | ✅         | `listen.url()`                           |\n| From Byte                    | ✅         | `listen.bytes()`                         |\n| From Audio Stream            | ✅         | `listen.live()`, `listen.liveListener()` |\n\n\n| **Text-to-Speech**           | **Status** | **Methods**                              |\n|------------------------------|------------|------------------------------------------|\n| From Text                    | ✅         | `speak.text()`                           |\n| From Text Stream             | ✅         | `speak.live()`, `speak.liveSpeaker()`    |\n\n\n| **Agent Interaction**        | **Status** | **Methods**                              |\n|------------------------------|------------|------------------------------------------|\n| Agent Interaction            | 🚧         | `agent.live()`                           |\n\n_PRs are welcome for all work-in-progress 🚧 features_\n\n\n## Getting started\n\nAll you need is a Deepgram API key. You can get a free one by signing up on [Deepgram](https://www.deepgram.com/)\n\n## Usage\n\nFirst create the client with your api key.\n```dart\nDeepgram deepgram = Deepgram('your_api_key');\n```\n\n## Pre-recorded\nThen you can call the methods you need under the propper listen or speak subclass:\n\n```dart\n// Speech to text\nDeepgramListenResult res = await deepgram.listen.file(File('audio.wav'), queryParams: {\n  'model': 'nova-2-general',\n  'detect_language': true,\n  'filler_words': false,\n  'punctuate': true,\n  // options here : https://developers.deepgram.com/reference/listen-file\n});\n\n// Text to speech\nDeepgramSpeakResult res = await deepgram.speak.text('Hello world', queryParams: {\n  'model': 'aura-asteria-en'\n  // options here : https://developers.deepgram.com/reference/text-to-speech-api\n});\n```\n\n## Streaming\n### Speech to text\nlet's say from a microphone :\n```dart\n//  https://pub.dev/packages/record (other packages would work too)\nStream\u003cList\u003cint\u003e\u003e micStream = await AudioRecorder().startStream(RecordConfig(\n      encoder: AudioEncoder.pcm16bits,\n      sampleRate: 16000,\n      numChannels: 1,\n));\n\nfinal sttStreamParams = {\n  'detect_language': false, // not supported by streaming API\n  'language': 'en',\n  // must specify encoding and sample_rate according to the audio stream\n  'encoding': 'linear16',\n  'sample_rate': 16000,\n};\n```\n\nthen you got 2 options depending if you want to have more control over the stream or not :\n```dart\n// 1. you want the stream to manage itself automatically\nStream\u003cDeepgramListenResult\u003e stream = deepgram.listen.live(micStream, queryParams: sttStreamParams);\n\n// 2. you want to manage the stream manually\nDeepgramLiveListener listener = deepgram.liveListener(micStream, queryParams: sttStreamParams);\nlistener.stream.listen((res) {\n    print(res.transcript);\n});\n// connect to the servers and start sending data\nlistener.start();\n\n// you can pause and resume the transcription (stop sending audio data to the server)\nlistener.pause(); \n// ...\nlistener.resume();\n\n// then close the stream when you're done, you can call start() again if you want to restart a transcription \nlistener.close(); \n```\n\n### Text to speech\n```dart\nfinal ttsStreamParams = {\n  'model': 'aura-asteria-en',\n  'encoding': \"linear16\",\n  'sample_rate': 16000,\n// options here: https://developers.deepgram.com/reference/text-to-speech-api\n};\n```\n\nthen again you got 2 options:\n```dart\nfinal textStream = ...\n// 1. you want the stream to manage itself automatically\nStream\u003cDeepgramSpeakResult\u003e stream = deepgram.speak.live(textStream, queryParams: ttsStreamParams);\n\n// 2. you want to manage the stream manually\nDeepgramLiveSpeaker speaker = deepgram.liveListener(textStream, queryParams: ttsStreamParams);\nspeaker.stream.listen((res) {\n    print(res);\n    // if you want to use the audio, simplest way is to use Deepgram.toWav(res.data) !\n});\n\n// start sending data to the servers\nspeaker.start();\n\n// https://developers.deepgram.com/docs/tts-ws-flush \nspeaker.flush();\n\n//https://developers.deepgram.com/docs/tts-ws-clear\nspeaker.clear();\n\n// then close the stream when you're done, you can call start() again if you want to restart a transcription \nspeaker.close(); \n```\n\n\nFor more detailed usage check the `/example` tab\n\n- Flutter demo [here](https://github.com/tempo-riz/deepgram_speech_to_text/tree/main/example/flutter_demo)\n\n- Dart demo [here](https://github.com/tempo-riz/deepgram_speech_to_text/tree/main/example/dart_demo)\n\nTested on Android and iOS, but should work on other platforms too.\n\n## Debugging common errors\n- make sure your API key is valid and has enough credits\n\n```dart\ndeepgram.isApiKeyValid()\n```\n\n\n- \"Websocket was not promoted ...\" : you are probably using wrong parameters, for example trying to use a whisper model with live streaming (not supported by deepgram)\n- empty transcript/only metadata : if streaming check that you specified encoding and sample_rate properly and that it matches the audio stream\n- double check the parameters you are using, some are not supported for streaming or for some models\n\n\n## Additional information\n\nI created this package for my own needs since there are no dart sdk for deepgram. Happy to share !\n\nDon't hesitate to ask for new features or to contribute on [GitHub](https://github.com/tempo-riz/deepgram_speech_to_text) !\n\n## Support\n\nIf you'd like to support this project, consider contributing [here](https://github.com/sponsors/tempo-riz). Thank you! :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftempo-riz%2Fdeepgram_speech_to_text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftempo-riz%2Fdeepgram_speech_to_text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftempo-riz%2Fdeepgram_speech_to_text/lists"}