Skip to content

Commit 5b16116

Browse files
authored
Merge pull request Show-Me-the-Code#203 from houshengandt/master
添加了第25题百度语音解法
2 parents ff4970b + 35edb97 commit 5b16116

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

houshengandt/readme.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#My Repository
2+
##My-Solutions-For-Show-Me-the-Code
3+
https://github.com/houshengandt/My-Solutions-For-Show-Me-The-Code
4+
##关于第0025题百度语音解法
5+
https://github.com/houshengandt/My-Solutions-For-Show-Me-The-Code/blob/master/0025/help.md
6+
7+
###使用方法
8+
`python3 0025.py`
9+
10+
在 输出 正在录音...... 时喊出你想打开的网站,录音时间有5秒,之后会上传。
11+
目前支持“百度”“微博”“谷歌”,可以在代码中的dict website 里添加你想要的网站,但注意识别不是百分百准确,每个人口音也有差异,根据识别结果来调整value值。
12+
13+
######题目
14+
[Python 练习册,每天一个小程序](https://github.com/Yixiaohan/show-me-the-code)
15+
>第 0025 题: 使用Python实现:对着电脑吼一声,自动打开浏览器中的默认网站。
16+
>
17+
>例如,对着笔记本电脑吼一声“百度”,浏览器自动打开百度首页。
18+
>
19+
> 关键字:Speech to Text
20+
21+
22+
23+
PyAudio是唯一一个用到的外部库,用来录制音频文件,官方的[录音实例](http://people.csail.mit.edu/hubert/pyaudio/#record-example)可以直接拿来使用。
24+
25+
使用 百度语音识别 REST API:
26+
* [官方文档](http://yuyin.baidu.com/docs/asr/56)
27+
* [access_token的获取](http://developer.baidu.com/wiki/index.php?title=docs/oauth/client)
28+
* 注意,“百度”会被识别为“baidu,”,即使返回“百渡”也不回“百度”,遇到相同问题的不要太纠结。

0 commit comments

Comments
 (0)