{"id":18419919,"url":"https://github.com/volltin/xiaodou-bot","last_synced_at":"2025-10-31T03:30:34.047Z","repository":{"id":195472475,"uuid":"692945109","full_name":"volltin/xiaodou-bot","owner":"volltin","description":"A simple voice-to-voice chatbot.","archived":false,"fork":false,"pushed_at":"2023-09-18T05:44:56.000Z","size":6190,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-24T17:45:37.498Z","etag":null,"topics":["azure-speech-service","chatbot","chatgpt","openai","speech-to-text","text-to-speech"],"latest_commit_sha":null,"homepage":"","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/volltin.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}},"created_at":"2023-09-18T02:55:29.000Z","updated_at":"2023-09-26T08:27:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"4a894131-21e4-4340-8b5f-1751167067b9","html_url":"https://github.com/volltin/xiaodou-bot","commit_stats":null,"previous_names":["volltin/xiaodou-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volltin%2Fxiaodou-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volltin%2Fxiaodou-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volltin%2Fxiaodou-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volltin%2Fxiaodou-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/volltin","download_url":"https://codeload.github.com/volltin/xiaodou-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239097800,"owners_count":19581112,"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":["azure-speech-service","chatbot","chatgpt","openai","speech-to-text","text-to-speech"],"created_at":"2024-11-06T04:19:00.636Z","updated_at":"2025-10-31T03:30:27.208Z","avatar_url":"https://github.com/volltin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xiaodou: Voice-to-Voice Chatbot\n\nXiaodou is a simple voice-to-voice chatbot designed for seamless interaction with users.\n\n## Installation\n\nInstall the required packages using one of the following methods:\n\n- With `pip`:\n\n  ```bash\n  pip install -r requirements.txt\n  ```\n\n- With `poetry` (recommended):\n\n  ```bash\n  poetry install --without dev\n  ```\n\n## Configuration\n\n### Audio Devices\n\nTo use a specific audio device, specify the input and output device names in `xiaodou/main.py`:\n\n```python\n# Input and output device names, if None, use default device\nINPUT_DEVICE_NAME = None # Azure format\nOUTPUT_DEVICE_NAME = None # pygame format\n```\n\nThere are some scripts in `scripts/` to list the available audio devices for Azure SDK and pygame:\n\nExample 1: on macOS, list the available audio devices:\n\n```bash\ncd scripts/macos_list_audio_devices\nmake run\n```\n\nExample 2: list the available audio devices using pygame:\n\n```bash\ncd scripts/pygame_list_audio_devices\nmake run\n```\n\n### API Keys\n\nSet the following environment variables in a `.env` file, refer to `.env.example` for an example:\n\n```bash\nOPENAI_API_TYPE=\"azure\"\nOPENAI_API_BASE=\"https://example.openai.azure.com/\"\nOPENAI_API_KEY=\"...\"\nOPENAI_API_VERSION=\"2023-03-15-preview\"\nAZURE_OPENAI_DEPLOYMENT_NAME=\"gpt-4\"\nSPEECH_API_KEY=\"...\"\nSPEECH_SERVICE_REGION=\"...\"\n```\n\n### Keyword Model\n\nThe chatbot is activated upon hearing the keyword \"小豆\". The example keyword model is located in `xiaodou/models/`. For additional information, refer to [xiaodou/models/README.md](xiaodou/models/README.md).\n## Usage\n\nStart the chatbot with the following command:\n\n```bash\npython xiaodou/main.py\n```\n\nOnce activated, you can begin conversing with the chatbot. The interaction flow is as follows:\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Bot\n    User-\u003e\u003eBot: Say the keyword\n    Bot-\u003e\u003eUser: Play notification sound\n    User-\u003e\u003eBot: Voice input (e.g. \"Can you tell me a joke\")\n    Bot-\u003e\u003eBot: Stop recording after user pause\n    Bot-\u003e\u003eUser: Play another notification sound\n    Bot-\u003e\u003eBot: Recognize voice with Azure Speech Service\n    Bot-\u003e\u003eBot: Send prompt to OpenAI API\n    Bot-\u003e\u003eBot: Receive response\n    Bot-\u003e\u003eBot: Synthesize response using Azure Speech Service\n    Bot-\u003e\u003eUser: Play synthesized voice (e.g. \"Sure, here's a joke, ...\")\n    User-\u003e\u003eBot: Repeat (starts with keyword)\n\n```\n\n## Development\n\nTo contribute to the development of Xiaodou, follow these steps:\n\n1. Install pre-commit hooks and development dependencies:\n\n   ```bash\n   poetry install\n   pre-commit install\n   ```\n\n## License\n\nFor more information on the license, please refer to the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolltin%2Fxiaodou-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolltin%2Fxiaodou-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolltin%2Fxiaodou-bot/lists"}