[bash] update
This commit is contained in:
1 parent
09a0865c5c
commit
423269f538
4 files changed
+58
-22
No files matched your search
@@ -0,0 +1,13 @@
|
||||
from takway.audio_utils import AudioPlayer
|
||||
|
||||
# RATE = 22050
|
||||
RATE = 16000
|
||||
# device_idx = 3 # 声卡编号,根据实际情况修改
|
||||
device_idx = None # 使用默认声卡
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
audio_player = AudioPlayer(RATE=RATE, output_device_index=device_idx)
|
||||
# frames = audio_player.load_audio_file("my_recording.wav") # wav或pcm格式音频都支持
|
||||
frames = audio_player.load_audio_file("output.wav") # wav或pcm格式音频都支持
|
||||
audio_player.play(frames)
|
||||
Reference in new issue
Block a user