Navigation

    CreatiCode Scratch

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Say Sentences with an AI Speaker (Premium Only)

    2D Blocks
    1
    1
    60
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • info-creaticode
      CreatiCode last edited by info-creaticode

       

      Prerequisite

      • CreatiCode Playground

       

      Introduction

      You can easily make the computer say a word or sentence using the “say” block in the AI category. You can also store that speech as a sound clip in the “Sounds” tab, so that you can replay it later.

      420131ee-a7cb-46bb-b4cc-a6b23b7f55d8-image.png

       
      Let’s go through each input for this block below.

       
       

      Sentence

      Most of the time, you should put a complete sentence into each “say” block instead of individual words. It will give the AI a better way to decide how to say these words. In addition, there is a short waiting time for each “say” block.

      For example, this is what you get when you use 2 blocks to say “Good” and “morning”:

      Your browser does not support the audio element.

       
      On the other hand, this is what you get when you use one block for both words:

      Your browser does not support the audio element.

       
       

      Speaker Language

      You can pick which language the AI speaker uses. The most common languages are listed at the top of the list:

      Note that the same language may appear multiple times with different dialects. For example, the sentence “Good afternoon” sounds differently between English speakers from the USA vs the UK:

      Your browser does not support the audio element.

      vs

      Your browser does not support the audio element.

      Most of the time, the language selected should match the sentence in the first input box. However, sometimes you may want the same AI speaker to talk in 2 languages, then you should make sure the same language is used. For example, these 2 blocks are using a Chinese AI speaker to say both Chinese and English:

      Your browser does not support the audio element.

       
       

      Speaker Type

      Within the same language, you can pick what type of AI speaker to use:

      f31fe66b-5cb4-44e1-b909-c2148da675f1-image.png

       
      Note that not all speaker types are available for all languages. If the speaker type is not available for the language you have selected, then you will get a warning message in the console panel at the bottom of the code editor.

       
       

      Talking Speed

      You can control how fast the speaker talks. A value of 100 means the normal speed. The larger the value, the faster the speed. For example, a value of 200 would double the talking speed, and a value of 50 would be half of the speed.

       

      Your browser does not support the audio element.

      Your browser does not support the audio element.

      Your browser does not support the audio element.

       
       

      Pitch

      The pitch controls how high or low the AI speaker sounds. Usually, you want to keep it at 100, which is the normal pitch.

       
       

      Volume

      The volume controls how loud the AI speaker talks. For example, if you want the AI speaker to raise her voice in a sentence, then you can use a value larger than 100.

       
       

      Sound Clip Name

      The last input allows you to specify a sound clip name. If it is not blank, then the sound from the AI speaker will not only be played out, but also be stored as a sound clip under the “Sounds” tab.

      This can be very useful if your program makes the AI speaker repeatedly say some sentences: you can play the pre-generated sound clips, which will be much faster compared to generating the AI speech in real-time each time.

       
       

      Demo

      In this demo, we make the AI speaker say “How are you?” and store the sound in a clip named “greetings”. After that, we can use the “start sound” block to play the same sentence.

      store.gif

      1 Reply Last reply Reply Quote 0
      • First post
        Last post