Skip to content

Commit

Permalink
按下大写锁定键的瞬间就开始录音, 录制五段0.064秒的小片段, 总共录制了约0.32, 如果0.32秒之后还没有松开大写锁定键, 那就建…
Browse files Browse the repository at this point in the history
…立网络语音识别api连接。这样就不用等按下大写锁定键0.3秒之后再说话,而是按下大写锁定键就可以开始说话,超过0.3秒钟就使用 API 进行识别。
  • Loading branch information
HaujetZhao committed Sep 10, 2020
1 parent 7ae5d03 commit fffcd79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions QuickCut/QuickCut.py
Original file line number Diff line number Diff line change
Expand Up @@ -6202,9 +6202,10 @@ def recoding(self, p, recognizer):

# 这边开始上传识别
def recognizing(self, p, recognizer):
time.sleep(0.32)
if not self.runRecognition:
return # 如果这个时候大写锁定键松开了 那就返回
for i in range(5):
time.sleep(0.06)
if not self.runRecognition:
return # 如果这个时候大写锁定键松开了 那就返回
try:
self.outputBox.print(self.tr('\n{}:在听了,说完了请松开 CapsLock 键...').format(self.count))
# 接下来设置一下托盘栏的听写图标
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding=utf-8
# python setup.py sdist build
# python setup.py sdist –formats = gztar,zip
# twine upload "dist/Quick-Cut-1.6.9.post2.tar.gz"
# twine upload "dist/Quick-Cut-1.6.10.tar.gz"
# 这是用于上传 pypi 前打包用的


Expand All @@ -15,7 +15,7 @@

setup(
name='Quick-Cut',
version='1.6.9.post2',
version='1.6.10',
description=(
'一款轻量、强大、好用的视频处理软件。'
),
Expand Down

0 comments on commit fffcd79

Please sign in to comment.