# How to Make a Meow Translator

Imagine what it would be like for your cat to be able to communicate with humans through technology. With the continuous development of artificial intelligence technology, this dream has become a reality.
We are pleased to introduce our latest innovation, the Cat Cat Translator. This device deciphers your cat's meows and translates them into various languages displayed on the CyberPi, making communication between you and your cat easier than ever.
This #How to use mBlock's newly launched Machine Learning 2.0 feature, paired with CyberPi, teaches you how to make a Meow translator that will change the way you interact with your pet.
The role of machine learning 2.0 features in making Meow Translator
1. Data collection and analysis:
• Audio data processing: By collecting a large number of sound samples from cats, machine learning algorithms can analyze and process this audio data to extract sound features and patterns.
• Behavioral data correlation: Machine learning can correlate and analyze a cat's voice with its behavioral data, helping to identify correspondences between specific sounds and behaviors.
2. Pattern Recognition and Classification:
• Sound Pattern Recognition: machine learning algorithms are able to recognize different types of cat sounds, such as purring, meowing, hissing, etc., and categorize them.
• Emotion analysis: by analyzing features such as frequency, pitch, and duration of sounds, machine learning can determine the emotional state of cats when they make these sounds, such as happiness, hunger, anxiety, etc.
3. Human-computer interaction and user experience:
• Enhanced Understanding: With the Cat Translator, pet owners can better understand their cat's needs and emotional state, enhancing communication and emotional connection with their pets.
• Improved care: machine learning can help owners more accurately identify their cat's health and needs, leading to better care and quality of life.
It's important to note that our understanding of the correlation between cat sounds and their meanings is largely based on research conducted by Špinka et al. (2019) [1]. Their study, published in Animals, provides valuable insights into feline vocalizations and their potential interpretations. For a deeper dive into this research, you can read the full essay here.
[1] Automatic Classification of Cat Vocalizations Emitted in Different Contexts. M. Špinka, P. Lhotský, M. Pleva, P. Jirků, P. Hanuš, L. Ošťádalová, J. Čermáková, P. Pudil (2019). Animals, 9(8), 543.
How to Translate Cat Language by Programming
Step 1:Preparation
Substep 1.1: Material Required
• One CyberPi
• Type C cable*1
• A computer with internet access
Use the data cable to connect the CyberPi to your computer.

Substep 1.2: Open mBlock
• Visit the mBlock website: https://mblock.cc/
• Click【Code with Block】to open the editor
Step 2:Machine learning
Substep 2.1: Add Extension

• Click on【extension】in 【Sprites】
• Download and add Machine Learning 2.0
• Create/Manage model in 【Machine learning】
Substep 2.2: Training model

• Create a new 【Audio project】 project
• And then the first thing we need to do is add an audio sample of the background noise

• Click 【Mic】 to expand the background noise recording interface
• Press 【Record 20 seconds】 to start recording background noise
• After 20 seconds, click 【Extract samples】 to finish and use the background noise
The purpose of sampling background noise is to minimize the errors and effects of background noise when the machine is discriminating between sounds.
Once the background noise sampling is complete, we are going to sample the cat's voice. Here we sample the kitten in the three moods of tired, hungry, and annoyed

• First, click on 【Class 1】 and then name it
• Then click 【Record 2 seconds】 to start recording
• Click 【Extract samples】 to take samples
Note: Steps 2 and 3 need to be repeated a minimum of 4 times, taking at least 8 audio samples

• After all the recordings are finished, click 【Train model】 to start training the model
• After training, use the model
Step 3:Built-in program

• Start building the program block in 【Sprites】

• Start by creating a hat block
• Then drag in the trained recognition block
• Repeat execution: send an upload pattern message with the recognition results
Once the build is complete, we'll be able to send the recognized cat language like CyberPi, and then we'll start building CyberPi's program block

• Select 【Devices】 to start programming
• Add 【Upload Mode Broadcast】
• Select 【Upload】
• Creating hat blocks for program building

• After creating the hat block, set the font size to big first
• Then set the decision condition: upload mode information = corresponding idea
• Finally, the incoming message is translated into human language and displayed on the CyberPi's screen
After this step, click 【Upload Code】, wait for the upload to be successful, and you'll have a cat translator!

Download
Click on the image below to download the full program

