{"id":22962328,"url":"https://github.com/zonble/flutter_dialog","last_synced_at":"2025-10-16T07:57:07.014Z","repository":{"id":247620685,"uuid":"815233755","full_name":"zonble/flutter_dialog","owner":"zonble","description":"Use Flutter to build a dialog engine","archived":false,"fork":false,"pushed_at":"2025-07-22T06:08:37.000Z","size":18203,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-22T08:37:49.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zonble.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-06-14T16:38:45.000Z","updated_at":"2025-07-22T06:05:31.000Z","dependencies_parsed_at":"2025-05-30T21:16:02.927Z","dependency_job_id":"ae896668-c421-45a5-a070-da3a63ae088d","html_url":"https://github.com/zonble/flutter_dialog","commit_stats":null,"previous_names":["zonble/flutter_dialog"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zonble/flutter_dialog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_dialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_dialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_dialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_dialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zonble","download_url":"https://codeload.github.com/zonble/flutter_dialog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_dialog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267451489,"owners_count":24089312,"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-07-28T02:00:09.689Z","response_time":68,"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":[],"created_at":"2024-12-14T19:16:33.668Z","updated_at":"2025-10-16T07:57:06.913Z","avatar_url":"https://github.com/zonble.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_dialog\n\n2024 and onwards © Weizhong Yang a.k.a zonble\n\n`flutter_dialog` is a Flutter package designed to simplify the integration of a\nvoice assistant into your Flutter app. It provides interfaces for ASR (Automatic\nSpeech Recognition), NLU (Natural Language Understanding), NLG (Natural Language\nGeneration), and TTS (Text-to-Speech) engines, along with a default\nimplementation for voice interaction.\n\nBy default:\n\n- The ASR engine utilizes the `speech_to_text` package.\n- he TTS engine employs the `flutter_tts` package.\n- The NLU and NLG engines leverage Google’s Gemini API.\n\nYou can easily customize your dialog flow and substitute the default engines\nwith your own implementations.\n\nSince the package is built on various implementations of the engines, what\nplatform that the engine support is depending on the implementation. For\nexample, the default ASR engine uses the `speech_to_text` package, which only\nsupports iOS, Android and Web platforms. If you want to support other platforms,\nyou need to implement your own ASR engine.\n\n## Usage\n\nThe following example demonstrates how to create a dialog engine with a minimal\nconfiguration:\n\n```dart\n// Create a DialogEngine instance with the default engines\nfinal _dialogEngine = DialogEngine(\n    asrEngine: PlatformAsrEngine(),\n    ttsEngine: PlatformTtsEngine(),\n    nluEngine: GeminiNluEngine(apiKey: geminiApiKey),\n    nlgEngine: GeminiNlgEngine(apiKey: geminiApiKey),\n);\n\n// Set the language for the engines\nawait _dialogEngine.ttsEngine.setLanguage('en-US');\nawait _dialogEngine.asrEngine.setLanguage('en-US');\nawait _dialogEngine.nlgEngine.setLanguage('en-US');\n\n// Listen to the dialog engine state\n_dialogEngine.stateStream.listen((state) {\n    print(state);\n});\n\n// Register the dialog flows\n_dialogEngine.registerFlows([\n    GreetingVuiFlow(useNlgPrompt: true),\n]);\n\n// Initialize the dialog engine\nawait _dialogEngine.init();\n\n// Start the dialog engine to listen to user input\nawait _dialogEngine.start();\n```\n\nThe dialog engine is composed by four engines: ASR, NLU, NLG, and TTS, and run\nthe VUI flows among these engines. ASR engine converts users' speech to text,\nthen it pass the converted text to NLU engine to understand the user's intent.\nAfter that, a VUI flow handles a known intent and decides how to respond to the\nusers, it may use NLG engine to generate text and then use NLG engine to play\nprompts.\n\nAll of these components are customizable. So, when creating a dialog engine, you\nshould specify the engines you want to use. For example, you can also use a\ndifferent ASR engine which implementing the `AsrEngine` interface.\n\nThen, register desired VUI flows to the engine, so, when the engine detect an\nintent that your VUI flows can handle, it will call the VUI flow to handle the\nintent. You can easily create a VUI flow using the package.\n\nFinally, you can start the dialog engine to listen to user input.\n\n## License\n\nThe package is released under the MIT license. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonble%2Fflutter_dialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzonble%2Fflutter_dialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonble%2Fflutter_dialog/lists"}