Found better way to play sound
This commit is contained in:
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user