Esempio n. 1
0
def play_sequence(names):
    """play a sequence of sounds or texts, each one interruptible"""
    sound_stop()
    for name in names:
        voice.important([name]) # each element is interruptible
Esempio n. 2
0
def close_media():
    """try to clean up before closing the client"""
    sound_stop()
    pygame.quit()
    tts.close()
Esempio n. 3
0
def modify_volume(incr):
    """increase or decrease the main volume, and say it"""
    set_volume(min(1, max(0, get_volume() + .1 * incr)))
    sound_stop()
    voice.item(nb2msg(round(get_volume() * 100)) + mp.PERCENT_VOLUME)
Esempio n. 4
0
def play_sequence(names):
    """play a sequence of sounds or texts, each one interruptible"""
    sound_stop()
    for name in names:
        voice.important([name]) # each element is interruptible
Esempio n. 5
0
def close_media():
    """try to clean up before closing the client"""
    sound_stop()
    pygame.quit()
    tts.close()
Esempio n. 6
0
def modify_volume(incr):
    """increase or decrease the main volume, and say it"""
    set_volume(min(1, max(0, get_volume() + .1 * incr)))
    sound_stop()
    voice.item(nb2msg(round(get_volume() * 100)) + mp.PERCENT_VOLUME)