This block uses Microsoft Azure’s Speech Service to read out text in a student’s program in a specific gender and language.
A character saying hello
//playSpeech Example var bg = createSprite(200, 200); bg.setAnimation("background_landscape07_1"); var bird = createSprite(250, 100); bird.scale = 0.25; bird.setAnimation("birdside_07_1"); var daniela = createSprite(150, 300); daniela.setAnimation("green_shirt_wave2_1"); daniela.scale = 0.6; drawSprites(); playSpeech("Hello! I'm Daniela! Check out this cool bird!", "female", "English");
playSpeech(text, gender, language);
Name | Type | Required? | Description |
---|---|---|---|
text | String | Text to read out loud | |
gender | String | Gender of the voice that reads the text out loud | |
language | String | The language that the text is read in. You can use a dropdown menu to select from available languages. If no language is given, it will default to English. |
No return value. Reads the text only.
Found a bug in the documentation? Let us know at documentation@code.org