Skip to content

Commit 4a0ec72

Browse files
authored
Update readme, fix a description error.
1 parent f048e9c commit 4a0ec72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pip install voicetools
1313
```python
1414
from voicetools import BaiduVoice
1515
# api key 及 secret key 请在百度语音官方网站注册获取
16-
token = BaiduVoice.get_baidu_token('YOUR_VOICE_API_KEY', 'YOUR_VOICE_SECRET')
17-
bv = BaiduVoice(token)
16+
token = BaiduVoice.get_baidu_token('YOUR_VOICE_API_KEY', 'YOUR_VOICE_SECRET') # 该方法返回百度 API 返回的完整 json
17+
bv = BaiduVoice(token['access_token']) # 在上述方法获取的 json 中得到 access_token
1818
# 语音识别
1919
results = bv.asr('path/to/your/audio/file') # 返回识别结果列表,可选参数见百度语音文档
2020
# 语音合成

0 commit comments

Comments
 (0)