Found better way to play sound

This commit is contained in:
2021-06-18 10:09:26 -04:00
parent 270143e048
commit 38dd1d576d
2 changed files with 4 additions and 10 deletions

View File

@ -8,14 +8,8 @@ Created on Fri Jan 8 10:26:56 2021
from os import system
from sys import platform
sound_args = ""
import simpleaudio as sa
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)
system(cmd)
wave_obj = sa.WaveObject.from_wave_file(file)
play_obj = wave_obj.play()

View File

@ -8,7 +8,7 @@ sudo apt-get -y --ignore-missing install gpsd gpsd-clients gpsbabel libgps-dev p
# Python addons
sudo -H pip3 install --upgrade pip
sudo -H pip3 install configparser pyside2
sudo -H pip3 install --upgrade pyserial numpy plotly scapy scipy gps gpxpy maidenhead pyyaml virtualenv virtualenvwrapper
sudo -H pip3 install --upgrade pyserial numpy plotly scapy==2.4.4 scipy gps gpxpy maidenhead pyyaml virtualenv virtualenvwrapper simpleaudio
# cleanup
sudo apt-get autoremove