1. recognize speech in [LANGUAGE] for [TIMER] secs

Cognitive Services - 图1

Recognizes speech in the specified language for 2, 5 or 10 seconds

How to use

When you run the block, the computer will record a voice and upload it to the Microsoft servers, and then the servers recognize the speech and return the speech recognition results to mblock. To use this block, please sign in to your mblock account first.
List of supported languages:
Cognitive Services - 图2

Example

After pressing the space key, say “Hello”. Your speech is recognized and the panda says “Hello” on the stage.
Cognitive Services - 图3


2. speech recognition result

Cognitive Services - 图4

Reports the speech recognition result

How to use

It is a reporter type block. A reporter block can be used in any script that requires data but cannot be used independently.
Select the checkbox next to the block to display the recognized speech.
Cognitive Services - 图5
Cognitive Services - 图6


3. recognize printed [LANGUAGE] text after [TIMER] secs

Cognitive Services - 图7

Recognizes a printed text in the specified language after 2, 5, or 10 seconds

How to use

Choose the language and time from the drop-down menus. After the specified time, the camera takes a photo and uploads it to the Microsoft servers, and the servers will recognize the photo and return the text recognition result to mblock. To use this block, sign in to mBlock 5 first. A camera is required.
Note: This block is only used to recognize printed texts, like text on books.
Cognitive Services - 图8

Example

After you press the space key, the printed text in English is recognized in two seconds, and then the panda will say the text recognition result.
Cognitive Services - 图9


4. recognize handwritten English text after [TIMER] secs

Cognitive Services - 图10

Recognizes handwritten English text after 2, 5, or 10 seconds

How to use

Choose the time from the drop-down menu. After a specified time, the camera takes a photo and upload it to the Microsoft servers, the servers will recognize the photo and return the text recognition result to mblock. To use this block, please sign in to your mblock account first, and a camera is required.
Cognitive Services - 图11

Example

After you press the space key, the handwritten English text is recognized and the panda will say the text recognition result.
Cognitive Services - 图12


5. text recognition result

Cognitive Services - 图13

Reports the text recognition result

How to use

It is a reporter type block. A reporter block can be used in any script that requires data but cannot be used independently.
Select the checkbox next to the block to display the text recognition result.
Cognitive Services - 图14
Cognitive Services - 图15


6. recognize[TYPE] in image after [TIMER] secs

Cognitive Services - 图16

After the specified time, recognizes the image and returns the image category, the image description, and the brand, celebrity, or landmark in the image

How to use

This block is used to recognize an image and return the image category, the image description, or the brand, celebrity, or landmark in the image.
To use this block, sign in to mBlock 5 first. A camera is required.
Cognitive Services - 图17
You can use the (image recognition) recognition result block to display the recognition result. Note that the same recognition type should be chosen in the two blocks.

Example

After you press the space key, the image is recognized after three seconds and the panda will describe the image.
Program:
Cognitive Services - 图18
Recognition result:
Cognitive Services - 图19


7. [TYPE] recognition result

Cognitive Services - 图20

Reports the recognized image category, image description, or brand, celebrity, or landmark in the image

How to use

It is a reporter type block. A reporter block can be used in any script that requires data but cannot be used independently.
Select the checkbox next to the block to display the specified recognition result.
Cognitive Services - 图21
Cognitive Services - 图22


8. recognize people’s age after [TIMER] secs

Cognitive Services - 图23

Recognizes people’s age after the specified time

How to use

Choose the time from the drop-down menu. After the specified time, the camera takes a photo and uploads it to the Microsoft servers, and the servers will recognize the photo and return the age recognition result to mblock. To use this block, sign in to mBlock 5 first. A camera is required.
Cognitive Services - 图24

Example

After you press the space key, the block starts recognizing people’s age after one second, and then the panda will say the age recognition result.
Cognitive Services - 图25


9. age recognition result

Cognitive Services - 图26

Reports the age recognition result

How to use

It is a reporter type block. A reporter block can be used in any script that requires data but cannot be used independently.
Select the checkbox next to the block to display the age recognition result.
Cognitive Services - 图27
Cognitive Services - 图28


10. recognize emotion after [TIMER] secs

Cognitive Services - 图29

Recognizes emotion after the specified time

How to use

The block is used to detect the happiness, neutral, surprise, sadness, anger, contempt, disgust, and fear emotion and return the emotion value.
Choose the time from the drop-down menu. After the specified time, the camera takes a photo and uploads it to the Microsoft servers, and the servers will recognize the photo and return the age recognition result to mblock. To use this block, sign in to mblock 5 first. A camera is required.
Cognitive Services - 图30

Example

When you click the green flag, the block starts recognizing emotion after three seconds, and then the panda will say the happiness value.
Cognitive Services - 图31


11. emotion[TYPE]intensity

Cognitive Services - 图32

Reports the emotion value (0-100)

How to use

It is a reporter type block. A reporter block can be used in any script that requires data but cannot be used independently.
Select the checkbox next to the block to display the emotion recognition result.
Cognitive Services - 图33
Choose the emotion type from the drop-down menu:
Cognitive Services - 图34


12. emotion is [TYPE] ?

Cognitive Services - 图35

Detects if you are in the specified emotion

Example

When you click the green flag, the block starts recognizing emotion after three seconds. If the detected emotion is happiness, the panda will say “So happy!”
Cognitive Services - 图36


13. recognize gender after [TIMER] secs

Cognitive Services - 图37

Detects gender (male or female) after the specified time

How to use

Choose the time from the drop-down menu. After the specified time, the camera takes a photo and uploads it to the Microsoft servers, the servers will recognize the photo and return the gender recognition result to mblock. To use this block, sign in to mblock 5 first. A camera is required.
Cognitive Services - 图38

Example

When you click the green flag, the block starts detecting gender after three seconds, and then the panda will say the gender recognition result.
Cognitive Services - 图39


14. gender recognition result

Cognitive Services - 图40

Reports the gender recognition result

How to use

It is a reporter type block. A reporter block can be used in any script that requires data but cannot be used independently.
Select the checkbox next to the block to display the gender recognition result.
Cognitive Services - 图41
Cognitive Services - 图42


15. recognize glasses type after [TIMER] secs

Cognitive Services - 图43

Detects the glasses type after the specified time

How to use

The block is used to detect the glasses type, including sunglasses, reading glasses, swimming goggles or no glasses.
Choose the time from the drop-down menu. After the specified time, the camera takes a photo and uploads it to the Microsoft servers, the servers will recognize the photo and return the glasses type recognition result to mblock. To use this block, sign in to mblock 5 first. A camera is required.
Cognitive Services - 图44

Example

When you click the green flag, the block starts detecting the glasses type after three seconds. If the recognition result is sunglasses, the panda will say “Cool!”.
Cognitive Services - 图45


16. wearing [TYPE] ?

Cognitive Services - 图46

Detects if you are wearing sunglasses, reading glasses, swimming goggles or no glasses

How to use

It is a boolean type block. It reports Ture if you are wearing the specified glasses, otherwise it reports False. A Boolean block must be put into the hexagonal slot of another block, and therefore cannot be used independently.
Choose the glasses type from the drop-down menu:
Cognitive Services - 图47


17. recognize smile score after [TIMER] secs

Cognitive Services - 图48

Detects smile score (0-100) after the specified time

How to use

Choose the time from the drop-down menu. After the specified time, the camera takes a photo and uploads it to the Microsoft servers, the servers will recognize the photo and return the smile score recognition result to mblock. To use this block, sign in to mblock 5 first. A camera is required.
Cognitive Services - 图49

Example

When you click the green flag, the block starts detecting the smile score after one second, and then the panda will say the smile recognition result.
Cognitive Services - 图50


18. smile recognition result

Cognitive Services - 图51

Reports the smile recognition result

How to use

It is a reporter type block. A reporter block can be used in any script that requires data but cannot be used independently.
Select the checkbox next to the block to display the smile recognition result.
Cognitive Services - 图52
Cognitive Services - 图53


19. recognize head gesture after [TIMER] secs

Cognitive Services - 图54

Detects the head gesture after the specified time

How to use

The block is used to detect the head pitch, yaw, or roll angle.
Cognitive Services - 图55
Value Range
Pitch: –90 to +90 degrees
Yaw: –180 to +180 degrees
Row: –90 to +90 degrees

Example

When you press the space key, the block starts detecting the head gesture after three seconds, and then the panda will say the pitch angle.
Cognitive Services - 图56


20. head [TYPE] angle (°)

Cognitive Services - 图57

Reports the head pitch, yaw or roll angle

How to use

It is a reporter type block. A reporter block can be used in any script that requires data but cannot be used independently.
Select the checkbox next to the block to display the specified angle.
Cognitive Services - 图58
Choose the angle type from the drop-down menu:
Cognitive Services - 图59