|
|
@ -60,26 +60,4 @@ class VoiceController: |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
pass |
|
|
|
# from PyQt5.QtWidgets import QApplication, QPushButton |
|
|
|
# |
|
|
|
# app = QApplication([]) |
|
|
|
# |
|
|
|
# # 点击按钮开始录音 |
|
|
|
# voice_controller = VoiceController() |
|
|
|
# |
|
|
|
# |
|
|
|
# def btn_clicked(): |
|
|
|
# if voice_controller.is_recording: |
|
|
|
# voice_controller.stop_record() |
|
|
|
# text = voice_controller.transcribe_audio() |
|
|
|
# print(text) |
|
|
|
# else: |
|
|
|
# voice_controller.start_record_thread() |
|
|
|
# |
|
|
|
# |
|
|
|
# btn = QPushButton('开始录音') |
|
|
|
# btn.clicked.connect(btn_clicked) |
|
|
|
# btn.show() |
|
|
|
# |
|
|
|
# app.exec_() |
|
|
|
pass |