摘要:安装依赖包:pip install baidu-aip wav文件转换成文字Demo: 注意:1、存储的wav文件采样率为16000 2、wav文件为单声道,否则会影响语音识别的准确性 1 #!/usr/bin/python 2 # -*- coding: UTF-8 -*- 3 from aip
阅读全文
摘要:函数的定义和调用 1 def fun(x): 2 if x > 0: 3 print "x>0" 4 else: 5 print "x<=0" 6 7 a = 3.5 8 b = -1 9 fun(a) 10 fun(b) 函数的定义和调用 1 def fun(x): 2 if x > 0: 3 p
阅读全文
摘要:判断语句 循环语句 while 1 count = 0 2 while(count < 9): 3 print "The count is:", count 4 count = count + 1 5 print "Good bye!" while else 1 count = 0 2 while
阅读全文
摘要:安装 还是windows系统,安装2.7。地址:https://www.python.org/downloads/release/python-2712/ 注意放到环境变量里 运行 python file.py sublime text 可以直接运行:ctrl +b helloworld print
阅读全文