Exemple #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
Exemple #2
0
def close_media():
    """try to clean up before closing the client"""
    sound_stop()
    pygame.quit()
    tts.close()
Exemple #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)
Exemple #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
Exemple #5
0
def close_media():
    """try to clean up before closing the client"""
    sound_stop()
    pygame.quit()
    tts.close()
Exemple #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)