forked from device-automation-bus/dab-compliance-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
voice_audio.py
18 lines (17 loc) · 2.53 KB
/
voice_audio.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import dab.applications
import dab.system
import dab.voice
from util.enforcement_manager import EnforcementManager
# Voice action steps
SEND_VOICE_AUDIO_TEST_CASES = [
("voice/list",'{}', dab.voice.list, 200, "Voice List"),
("voice/send-audio",f'{{"fileLocation": "https://storage.googleapis.com/ytlr-cert.appspot.com/voice/ladygaga.wav", "voiceSystem": "{EnforcementManager().get_voice_assistant()}"}}', dab.voice.send_audio, "Are you on search page with Lady Gaga?", "Voice launch Lady gaga"),
("voice/send-audio",f'{{"fileLocation": "https://storage.googleapis.com/ytlr-cert.appspot.com/voice/pressenter.wav", "voiceSystem": "{EnforcementManager().get_voice_assistant()}"}}', dab.voice.send_audio, "Is video playing?", "Voice play video"),
("voice/send-audio",f'{{"fileLocation": "https://storage.googleapis.com/ytlr-cert.appspot.com/voice/playvideo.wav", "voiceSystem": "{EnforcementManager().get_voice_assistant()}"}}', dab.voice.send_audio, "If video was not playing, is it playing now?", "Voice resume video"),
("voice/send-audio",f'{{"fileLocation": "https://storage.googleapis.com/ytlr-cert.appspot.com/voice/setvolume0.wav", "voiceSystem": "{EnforcementManager().get_voice_assistant()}"}}', dab.voice.send_audio, "Did volume of the video changed?", "voice mute"),
("voice/send-audio",f'{{"fileLocation": "https://storage.googleapis.com/ytlr-cert.appspot.com/voice/setvolume5.wav", "voiceSystem": "{EnforcementManager().get_voice_assistant()}"}}', dab.voice.send_audio, "Did volume of the video changed?", "voice volume up"),
("voice/send-audio",f'{{"fileLocation": "https://storage.googleapis.com/ytlr-cert.appspot.com/voice/pausevideo.wav", "voiceSystem": "{EnforcementManager().get_voice_assistant()}"}}', dab.voice.send_audio, "Did video paused?", "voice pause"),
("voice/send-audio",f'{{"fileLocation": "https://storage.googleapis.com/ytlr-cert.appspot.com/voice/fastforwardvideo.wav", "voiceSystem": "{EnforcementManager().get_voice_assistant()}"}}', dab.voice.send_audio, "Did video playback fast forward?", "voice fastforward"),
("voice/send-audio",f'{{"fileLocation": "https://storage.googleapis.com/ytlr-cert.appspot.com/voice/rewindvideo.wav", "voiceSystem": "{EnforcementManager().get_voice_assistant()}"}}', dab.voice.send_audio, "Did video playback rewind?", "voice rewind"),
("voice/send-audio",f'{{"fileLocation": "https://storage.googleapis.com/ytlr-cert.appspot.com/voice/exittomainmenu.wav", "voiceSystem": "{EnforcementManager().get_voice_assistant()}"}}', dab.voice.send_audio, "Are you on main menu?", "voice exit"),
]