{"id":19725419,"url":"https://github.com/easychen/xf-tts-sdk","last_synced_at":"2025-10-19T12:23:25.508Z","repository":{"id":145559658,"uuid":"212327085","full_name":"easychen/xf-tts-sdk","owner":"easychen","description":"php \u0026 node sdk for xunfei tts websocket api","archived":false,"fork":false,"pushed_at":"2019-10-12T01:56:47.000Z","size":44,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T20:11:15.067Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/easychen.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":"2019-10-02T11:49:34.000Z","updated_at":"2023-05-15T13:52:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7ab783c-3328-4d96-a451-b0f247dcde46","html_url":"https://github.com/easychen/xf-tts-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fxf-tts-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fxf-tts-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fxf-tts-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fxf-tts-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easychen","download_url":"https://codeload.github.com/easychen/xf-tts-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599732,"owners_count":21615574,"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":[],"created_at":"2024-11-11T23:29:48.218Z","updated_at":"2025-10-19T12:23:25.451Z","avatar_url":"https://github.com/easychen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 讯飞 TTS 流式接口非官方 SDK 和 Demo\n\n## 说明\n\n讯飞的新TTS接口采用了 websocket 协议。新协议其实比较简单，就是添加了一个鉴权算法来生成 ws 的连接URL。另外约定了发送数据的JSON格式。\n\n官方文档地址：https://www.xfyun.cn/doc/tts/online_tts/API.html\n\n这里分别给出 PHP 和 Node 下计算连接用URL的函数和发送消息的包装函数。以及相应的Demo。\n\n\n## PHP 版\n\n见 php/demo.php\n\n- get_xf_wss_info \n- text2sendjson\n\n注意：\n- 需要安装 swoole 扩展 4.4+\n- 需要 `composer install` 后在运行 `php demo.php`\n\n\n## Nodejs 版\n\n见 node/demo.js \n\n- btoa\n- get_wss_info\n- text2json\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasychen%2Fxf-tts-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasychen%2Fxf-tts-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasychen%2Fxf-tts-sdk/lists"}