Initial commit of files

This commit is contained in:
2021-01-22 10:16:17 -05:00
parent 92cd842b54
commit 9e201bd1b8
18 changed files with 162 additions and 0 deletions

22
classes/utils/audio.py Normal file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 8 10:26:56 2021
@author: neal
"""
import os
from sys import platform as _platform
sound_args = ""
def play_sound(file):
if _platform == "win32" or _platform == "win64" or _platform == "cygwin":
cmd = "wmplayer " + '"' + file + '"'
else:
cmd = "aplay -N " + sound_args + " " + file + " &"
# print(cmd)
os.system(cmd)
#play_sound("../misc/boat-horn.wav")