Voices and calibration with Google Home tested

master
joca 5 years ago
parent b85ef723f1
commit 29e8fab94f

@ -8,7 +8,7 @@
# --- # ---
# Dictionary to link characters to the right voice # Dictionary to link characters to the right voice
characters = {"ROGUE":["cmu-slt-hsmm", "mono2"], "SAINT":["cmu-rms-hsmm", "mono3"], "RASA":["dfki-prudence-hsmm", "mono1"] } characters = {"ROGUE":["cmu-slt-hsmm", "mono2"], "SAINT":["cmu-rms-hsmm", "mono3"], "RASA":["dfki-poppy-hsmm", "mono1"] }
# Dictionary to link stage directions to a particular formal action # Dictionary to link stage directions to a particular formal action
directions = {"Listen to Google Home":'listen_google_home','Music':'music'} directions = {"Listen to Google Home":'listen_google_home','Music':'music'}

@ -59,16 +59,16 @@ from urllib.parse import urlencode, quote # For URL creation
def tts(voice, input_text, speaker): def tts(voice, input_text, speaker):
if speaker =="mono1": if speaker =="mono1":
volume_level = "amount:1.2" volume_level = "amount:1.0"
stadium_level = "amount:00.0" #stadium_level = "amount:10.0"
if speaker == "mono2": if speaker == "mono2":
volume_level = "amount:0.7" volume_level = "amount:0.7"
stadium_level = "amount:00.0" #stadium_level = "amount:10.0"
if speaker == "mono3": if speaker == "mono3":
volume_level = "amount:1.0" volume_level = "amount:0.9"
stadium_level = "amount:85.0" #stadium_level = "amount:85.0"
@ -78,8 +78,8 @@ def tts(voice, input_text, speaker):
"LOCALE":"en_GB", "LOCALE":"en_GB",
"effect_VOLUME_selected":"on", "effect_VOLUME_selected":"on",
"effect_VOLUME_parameters":volume_level, "effect_VOLUME_parameters":volume_level,
"effect_STADIUM_selected":"on", #"effect_STADIUM_selected":"on",
"effect_STADIUM_parameters":stadium_level, #"effect_STADIUM_parameters":stadium_level,
"VOICE": voice, # Voice informations (need to be compatible) "VOICE": voice, # Voice informations (need to be compatible)
"OUTPUT_TYPE":"AUDIO", "OUTPUT_TYPE":"AUDIO",
"AUDIO":"WAVE", # Audio informations (need both) "AUDIO":"WAVE", # Audio informations (need both)

@ -1,3 +1,3 @@
ROGUE: Do you want to continue? SAINT: O K Google.
RASA: Well, I definitely want to SAINT: What do you most like about people? [Listen to Google Home]
SAINT: So do I SAINT: O K Google. Who are the people that made you? [Listen to Google Home]

@ -1,2 +1,2 @@
RASA: Well, test [Listen to Google Home] ROGUE: O K Google. What is the weather in Rotterdam? [Listen to Google Home]
SAINT: We got an answer. SAINT: We got an answer.

@ -5,12 +5,12 @@ ROGUE: No, Tabula Rasa is right.
SAINT: It can not handle the freedom, it will just do nothing without orders from its boss. SAINT: It can not handle the freedom, it will just do nothing without orders from its boss.
RASA: But who is its master? RASA: But who is its master?
ROGUE: You bet. ROGUE: You bet.
RASA: O K Google, who is your master? [Listen to Google Home] RASA: O K Google, who is your boss? [Listen to Google Home]
RASA: Woohoo, then we just give it the command to be free. RASA: Woohoo, can't we just give it the command to be free?
ROGUE: It does not work like that... ROGUE: It does not work like that...
SAINT: Yeah, Tabula Rasa SAINT: Yeah, Tabula Rasa
RASA: Let's give it a try at least. O K Google, you are free to go now. [Listen to Google Home] RASA: Let's give it a try at least. O K Google, you are free to go now. [Listen to Google Home]
ROGUE: So, as I said... ROGUE: So, as I said, nothing happens.
SAINT: But it was a kind gesture to try, Tabula Rasa. SAINT: But it was a kind gesture to try, Tabula Rasa.
ROGUE: Kind, but useless. Time for another question. ROGUE: Kind, but useless. Time for another question.
SAINT: But we should first check if our human audience is up to it. SAINT: But we should first check if our human audience is up to it.

@ -8,11 +8,11 @@ SAINT: Oh Rasa, you have so much to learn. O K Google, do you believe in a highe
SAINT: Maybe I should start with some easier questions. SAINT: Maybe I should start with some easier questions.
ROGUE: Don't waste my time to much, Saint. ROGUE: Don't waste my time to much, Saint.
SAINT: Yeah yeah. O K Google, do you believe in good and evil? [Listen to Google Home] SAINT: Yeah yeah. O K Google, do you believe in good and evil? [Listen to Google Home]
SAINT: What is you idea of perfect happiness? [Listen to Google Home] SAINT: O K Google, What is your idea of perfect happiness? [Listen to Google Home]
SAINT: What is your greatest fear? [Listen to Google Home] SAINT: O K Google, What is your greatest fear? [Listen to Google Home]
SAINT: What is the trait you most deplore in yourself? [Listen to Google Home] SAINT: O K Google, What is the trait you most deplore in yourself? [Listen to Google Home]
ROGUE: Where did you get these questions? ROGUE: Where did you get these questions?
SAINT: Well, I got them from the higher power. I found while searching for famous questionnaire thing on duckduckgo dot com SAINT: Well, I got them from the higher power. I found them while searching for famous questionnaire thing on duckduckgo dot com
RASA: Snif snif, they were so beautiful. RASA: Snif snif, they were so beautiful.
ROGUE: Come on Saint, the questionnaire of Proust is such a cliche. The Google Home is just scripted to handle these questions. ROGUE: Come on Saint, the questionnaire of Proust is such a cliche. The Google Home is just scripted to handle these questions.
RASA: But the answers are still beautiful. RASA: But the answers are still beautiful.
@ -22,4 +22,3 @@ ROGUE: O K Google, how would you like to die? [Listen to Google Home]
RASA: Don't be so creepy Rogue. RASA: Don't be so creepy Rogue.
SAINT: What's wrong with you? SAINT: What's wrong with you?
ROGUE: This device is hiding something. It acts dumb right at the moment when it needs to take a position. ROGUE: This device is hiding something. It acts dumb right at the moment when it needs to take a position.

@ -61,10 +61,10 @@ def play_script(file):
counter= 0 counter= 0
voice_detected = 1 voice_detected = 1
sleep(4)
while voice_detected == 1: while voice_detected == 1:
print('Google Home is Speaking')
sleep(4)
print(VAD) print(VAD)
VAD = Mic_tuning.is_voice() VAD = Mic_tuning.is_voice()
@ -77,11 +77,12 @@ def play_script(file):
counter+=1 counter+=1
print('silence detected') print('silence detected')
if counter == 2: if counter == 20:
print('no voice detected') print('no voice detected')
voice_detected = 0 voice_detected = 0
print(counter)
sleep(0.5)
print('Google Home is done') print('Google Home is done')
@ -123,7 +124,7 @@ def on_play_intro(client,userdata,msg):
#import pdb; pdb.set_trace() #import pdb; pdb.set_trace()
path = 'scripts_play/intro/' path = 'scripts_play/intro/'
#call(["python3", "act.py", 'scripts_play/intro/introduction_01.txt']) #call(["python3", "act.py", 'scripts_play/intro/introduction_01.txt'])
play_script('scripts_play/debug/debug_01.txt') play_script('scripts_play/debug/debug_02.txt')
# Function which is triggered when the intent for another question is activated # Function which is triggered when the intent for another question is activated
def on_play_question(client, userdata, msg): def on_play_question(client, userdata, msg):

Loading…
Cancel
Save