Wednesday, February 23, 2011

Turtle Art text to speech

Turtle Art can do text to speech using the Python code block. Enter the following code in Pippy. Load the code by clicking on the python block. Clicking Start will say whatever is plugged into the right of the Python block. The + operator can process strings and numbers.




The following variant from Walter avoids whole numbers (integers) being spoken with a decimal place


As at Turtle Blocks V106, this Python code is included in the inbuilt examples as speak.py

Labels: , , , ,

3 Comments:

Blogger Walter Bender said...

One suggested tweak:

# Turtle Art numbers are passed as float, but they may be integer values
if type(x) == float:
if int(x) == x:
x = int(x)

Wednesday, February 23, 2011 11:58:00 PM  
Blogger Anna Schafer said...

Still it works for me. In general, I think the response during the session was positive.speech recognition program

Monday, March 14, 2016 5:04:00 PM  
Blogger Anna Schafer said...

As at Turtle Blocks V106, this Python code is included in the inbuilt speech recognition software

Thursday, March 17, 2016 7:45:00 PM  

Post a Comment

<< Home