-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support wav format, support audio no interrupt mode
- Loading branch information
Ran Duan
committed
Nov 9, 2021
1 parent
87e2858
commit 9fcf17b
Showing
4 changed files
with
38 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
build/ | ||
dist/ | ||
__pycache__/ | ||
*.spec | ||
*.spec | ||
voice_bank/zqq/* | ||
tempCodeRUnnerFile.py | ||
reaper_file/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
|
||
|
||
在voice_bank中建立文件夹,里面放MP3文件。 | ||
在voice_bank中建立文件夹,里面放MP3或wav文件。 | ||
|
||
若文件夹以yue开头,则对任意按键,会随机播放文件夹里的音频。 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import os | ||
import pygame | ||
|
||
print(os.listdir("voice_bank\yue_315-2")) | ||
NUM_MIXER_CHANNEL = 10 | ||
|
||
mixer = pygame.mixer | ||
mixer.init() | ||
mixer.set_num_channels(NUM_MIXER_CHANNEL) | ||
mixer.Channel(0).play(mixer.Sound("voice_bank\\zqq\\a.mp3")) | ||
# import time | ||
# time.sleep(5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters