How to use the tts.tts.say function in TTS

To help you get started, we’ve selected a few TTS examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github r3n33 / CozmoLetsRobot / hardware / cozmo.py View on Github external
elif command.isdigit():
            coz.play_anim(name=default_anims_for_keys[int(command)]).wait_for_completed()
    
        #things to say with TTS disabled
        elif command == 'sayhi':
            tts.say( "hi! I'm cozmo!" )
        elif command == 'saywatch':
            tts.say( "watch this" )
        elif command == 'saylove':
            tts.say( "i love you" )
        elif command == 'saybye':
            tts.say( "bye" )
        elif command == 'sayhappy':
            tts.say( "I'm happy" )
        elif command == 'saysad':
            tts.say( "I'm sad" )
        elif command == 'sayhowru':
            tts.say( "how are you?" )
        
        #cube controls
        elif command == "lightcubes":
            print( "lighting cubes" )
            light_cubes( coz )
        elif command == "dimcubes":
            print( "dimming cubes" )
            dim_cubes( coz )

        #sing song example
        elif command == "singsong":
            print( "singing song" )
            sing_song( coz )
github r3n33 / CozmoLetsRobot / hardware / cozmo.py View on Github external
print( "cozmo light was ", is_headlight_on )
            is_headlight_on = not is_headlight_on
            coz.set_head_light(enable=is_headlight_on)
            time.sleep(0.35)

        #animations from example
        elif command.isdigit():
            coz.play_anim(name=default_anims_for_keys[int(command)]).wait_for_completed()
    
        #things to say with TTS disabled
        elif command == 'sayhi':
            tts.say( "hi! I'm cozmo!" )
        elif command == 'saywatch':
            tts.say( "watch this" )
        elif command == 'saylove':
            tts.say( "i love you" )
        elif command == 'saybye':
            tts.say( "bye" )
        elif command == 'sayhappy':
            tts.say( "I'm happy" )
        elif command == 'saysad':
            tts.say( "I'm sad" )
        elif command == 'sayhowru':
            tts.say( "how are you?" )
        
        #cube controls
        elif command == "lightcubes":
            print( "lighting cubes" )
            light_cubes( coz )
        elif command == "dimcubes":
            print( "dimming cubes" )
            dim_cubes( coz )
github r3n33 / CozmoLetsRobot / hardware / cozmo.py View on Github external
#animations from example
        elif command.isdigit():
            coz.play_anim(name=default_anims_for_keys[int(command)]).wait_for_completed()
    
        #things to say with TTS disabled
        elif command == 'sayhi':
            tts.say( "hi! I'm cozmo!" )
        elif command == 'saywatch':
            tts.say( "watch this" )
        elif command == 'saylove':
            tts.say( "i love you" )
        elif command == 'saybye':
            tts.say( "bye" )
        elif command == 'sayhappy':
            tts.say( "I'm happy" )
        elif command == 'saysad':
            tts.say( "I'm sad" )
        elif command == 'sayhowru':
            tts.say( "how are you?" )
        
        #cube controls
        elif command == "lightcubes":
            print( "lighting cubes" )
            light_cubes( coz )
        elif command == "dimcubes":
            print( "dimming cubes" )
            dim_cubes( coz )

        #sing song example
        elif command == "singsong":
            print( "singing song" )
github letsRobot / letsrobot / hardware / motor_hat.py View on Github external
def reportBatteryStatus_task():
    if chargeValue < 30:
        tts.say("battery low, %d percent" % int(chargeValue))
github letsRobot / letsrobot / networking.py View on Github external
def internetStatus_task():
    global bootMessage
    global lastInternetStatus
    internetStatus = isInternetConnected()
    if internetStatus != lastInternetStatus:
        if internetStatus:
            tts.say(bootMessage)
            log.info("internet connected")
        else:
            log.info("missing internet connection")
            tts.say("missing internet connection")
    lastInternetStatus = internetStatus