Skip to content

Commit c02315b

Browse files
committed
Modify audio playing command in play_audio()
for Darwin
1 parent db4e3f5 commit c02315b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

precise/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ def play_audio(filename: str):
7474
import platform
7575
from subprocess import Popen
7676

77-
player = 'play' if platform.system() == 'Darwin' else 'aplay'
78-
Popen([player, '-q', filename])
77+
if platform.system() == 'Darwin':
78+
Popen(['afplay', filename])
79+
else:
80+
Popen(['aplay', '-q', filename])
7981

8082

8183
def activate_notify():

0 commit comments

Comments
 (0)