We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f048e9c commit 4a0ec72Copy full SHA for 4a0ec72
README.md
@@ -13,8 +13,8 @@ pip install voicetools
13
```python
14
from voicetools import BaiduVoice
15
# api key 及 secret key 请在百度语音官方网站注册获取
16
-token = BaiduVoice.get_baidu_token('YOUR_VOICE_API_KEY', 'YOUR_VOICE_SECRET')
17
-bv = BaiduVoice(token)
+token = BaiduVoice.get_baidu_token('YOUR_VOICE_API_KEY', 'YOUR_VOICE_SECRET') # 该方法返回百度 API 返回的完整 json
+bv = BaiduVoice(token['access_token']) # 在上述方法获取的 json 中得到 access_token
18
# 语音识别
19
results = bv.asr('path/to/your/audio/file') # 返回识别结果列表,可选参数见百度语音文档
20
# 语音合成
0 commit comments