Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# edit token
elif c == ord('t'):
token = misc.edit_popup(stdscr, ' Token ', '')
lex_set_token (token)
# edit XS
elif c == ord('e'):
ipas = lex_entry['ipa']
xs = ipa2xsampa (lex_token, ipas, stress_to_vowels=False)
xs = misc.edit_popup(stdscr, ' X-SAMPA ', xs)
try:
ipas = xsampa2ipa (lex_token, xs)
lex_entry['ipa'] = ipas
except:
pass
#
# fini
#
curses.nocbreak(); stdscr.keypad(0); curses.echo()
def do_edit_prompt():
global stdcr, prompt
prompt = misc.edit_popup(stdscr, ' Prompt ', prompt)
do_process_input()
def do_change_module():
global stdcr, match_module
match_module = misc.edit_popup(stdscr, ' Module ', match_module)
def do_change_module():
global stdcr, match_module
match_module = misc.edit_popup(stdscr, ' Module ', match_module)
def do_edit_prompt():
global stdcr, prompt
prompt = misc.edit_popup(stdscr, ' Prompt ', prompt)
do_process_input()
tts.engine ='mary'
tts.voice ='upmc-pierre-hsmm'
say_ipa('fr', 'mary', 'upmc-pierre-hsmm', ipas)
# speak en mary hsmm
elif c == ord('u'):
ipas = lex_entry['ipa']
say_ipa('en-US', 'mary', 'cmu-rms-hsmm', ipas)
# edit token
elif c == ord('t'):
token = misc.edit_popup(stdscr, ' Token ', '')
lex_set_token (token)
# edit XS
elif c == ord('e'):
ipas = lex_entry['ipa']
xs = ipa2xsampa (lex_token, ipas, stress_to_vowels=False)
xs = misc.edit_popup(stdscr, ' X-SAMPA ', xs)
try:
ipas = xsampa2ipa (lex_token, xs)
lex_entry['ipa'] = ipas