{"id":17660915,"url":"https://github.com/soulteary/go-baidu-speech","last_synced_at":"2025-05-07T17:07:05.102Z","repository":{"id":219399177,"uuid":"748949620","full_name":"soulteary/go-baidu-speech","owner":"soulteary","description":"API Service of Baidu ASR/TTS.","archived":false,"fork":false,"pushed_at":"2024-01-31T09:51:21.000Z","size":398,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T17:06:49.426Z","etag":null,"topics":["baidu","baidu-api","baidu-speech"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soulteary.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}},"created_at":"2024-01-27T05:58:54.000Z","updated_at":"2024-02-07T13:45:01.000Z","dependencies_parsed_at":"2024-01-31T10:26:54.634Z","dependency_job_id":null,"html_url":"https://github.com/soulteary/go-baidu-speech","commit_stats":null,"previous_names":["soulteary/go-baidu-speech"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fgo-baidu-speech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fgo-baidu-speech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fgo-baidu-speech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fgo-baidu-speech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soulteary","download_url":"https://codeload.github.com/soulteary/go-baidu-speech/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922343,"owners_count":21825636,"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":["baidu","baidu-api","baidu-speech"],"created_at":"2024-10-23T17:09:43.282Z","updated_at":"2025-05-07T17:07:05.062Z","avatar_url":"https://github.com/soulteary.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Baidu Speech\n\nAPI Service of Baidu **ASR** and **TTS**, support Docker.\n\n![](.github/preview.jpg)\n\n## TTS\n\n![](.github/screenshots/tts.jpg)\n\n```bash\ncurl -X POST -d \"text=阳光彩虹小白马\" http://localhost:8080/tts\n```\n\nYou will get a plain text return containing the file name: `1706342489.wav`. You can download the file using the full address: `http://localhost:8080/1706342489.wav`. Or access `http://localhost:8080/` get all files.\n\nPython example:\n\n```python\nimport requests\nheaders = {\n    'Content-Type': 'application/x-www-form-urlencoded',\n}\ndata = 'text=阳光彩虹小白马'.encode()\nresponse = requests.post('http://127.0.0.1:8080/tts', headers=headers, data=data)\nprint(response.text)\n```\n\n## ASR\n\n```bash\ncurl -X POST -F \"file=@/Users/soulteary/Downloads/1706341924.wav\" http://localhost:8080/asr\n阳光彩虹小白马\n```\n\nPython example:\n\n```python\nimport requests\nfiles = {\n    'file': open('1706341924.wav', 'rb'),\n}\nresponse = requests.post('http://127.0.0.1:8080/asr', files=files)\nprint(response.text)\n```\n\n## Docker\n\nbuild it:\n\n```bash\ndocker build -t soulteary/go-baidu-speech . -f docker/Dockerfile\n```\n\nplay:\n\n```bash\ndocker compose up -d\n```\n\n## Credit\n\n- pkg: https://github.com/shanghuiyang/oauth / https://github.com/shanghuiyang/speech\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulteary%2Fgo-baidu-speech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoulteary%2Fgo-baidu-speech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulteary%2Fgo-baidu-speech/lists"}