Package Exports
- @koi-rtc/speech-sdk
- @koi-rtc/speech-sdk/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@koi-rtc/speech-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Speech SDK
一个统一的语音服务 SDK,支持多个云服务商的 ASR 和 TTS 服务。
特性
- 支持多个服务提供商(Microsoft、Google、阿里云、腾讯云)
- 支持语音转文字(ASR)和文字转语音(TTS)
- 支持实时语音识别
- 内置缓存机制(支持内存和 Redis)
- 统一的 API 接口
安装
要安装 Speech SDK,请使用以下命令:
npm install speech-sdk使用示例
以下是如何使用 Speech SDK 的示例代码:
const SpeechSDK = require('speech-sdk');
// 初始化 SDK
const sdk = new SpeechSDK();
// 使用 ASR 服务
sdk.asr.startRecognition()
.then(result => {
console.log('识别结果:', result);
})
.catch(error => {
console.error('识别错误:', error);
});贡献
欢迎提交问题和贡献代码!请查看 贡献指南 以获取更多信息。
许可证
此项目采用 MIT 许可证,详细信息请查看 LICENSE 文件。