AidLearning-FrameWork icon indicating copy to clipboard operation
AidLearning-FrameWork copied to clipboard

how to play sound in adilearning by command in terminal window?

Open leechaowen opened this issue 2 years ago • 2 comments

how to play sound in adilearning by command ? i had installed the packages termux-api in python to call the termux.Media.play function , no help. and try to install mpv, no helpful too. but , it could helpful in termux . run command to play sound in termux by mpv or termux-api,it's helpful.

my phone is Readmi K40, android 11.

pip install termux-api apt-get install mpv

leechaowen avatar Sep 07 '21 06:09 leechaowen

you can using python code like this: import android droid=android.Android() droid.mediaPlay('/sdcard/Download/1.mp3', 'beep', True) (make sure the file 1.mp3 is in the sdcard... ^_^)

aidlearning avatar Sep 26 '21 09:09 aidlearning

using android module,Functions like mediaPlay, mediaPlayPause, mediaPlayClose, mediaPlaySeek,mediaPlayStart and mediaPlaySetLooping are used to control the media player.

aidlearning avatar Sep 26 '21 09:09 aidlearning