How I made an App that Translates Cat Sounds to Human Language

The Million Zimbabwean Dollar Idea

Ege Kuzubasioglu
4 min readFeb 15, 2022

It all started when that “Entrepreneur” dude sent me a message on Linkedin.

“You just program it bro, I give you 20% share if you make me an app that drives my car..”

Before I declined the generous offer from this hypothetical person, I vowed to myself that one day, I’d create an app that sounds hilarious on paper, without incorporating blockchain technology or NFTs because, frankly, I still don’t grasp what they are.*

Fast forward to January, my girlfriend asked me:

“Wouldn’t be cool if you make me an app for Valentine’s Day?”

That sounded like an amazing idea for two reasons: first, I wouldn’t have to brainstorm a gift, and second, I could finally create that app.

Gilbert The Cat

Meet Gilbert, our cat. He’s perfectly fine, except for one thing — he meows incessantly. I mean, it’s excessive to the point where I dug up my old Machine Learning notes just to create an app that helps me understand what on earth he’s trying to say. An app designed to translate his meows into English.

The Super Complex Machine Learning Stuff

I believe that to translate a cat’s sound, you need to distinguish if it’s actually a cat’s sound in the first place. Makes sense, doesn’t it? To achieve this, I initially considered designing a sophisticated deep learning algorithm capable of recognizing various sounds. However, I opted for a simpler route and utilized Huawei Technologies’ ML Kit Sound Detector instead. This tool can detect up to 12 different sounds, including cat sounds.

Alright, we’ve managed to distinguish between a meow and a fart sound — progress! Now, I needed a collection of cat sound examples that represent specific cat behaviors. To achieve this, I followed the work of Yagya Raj Pandeya and Joonwhoan Lee on Domestic Cat Sound Classification Using Transfer Learning. Fortunately, cats steer clear of political discussions. When they vocalize, it’s usually about particular situations or behaviors:

  • Hunger
  • Eagerness to play/hunt/go out
  • Annoyance/danger
  • Sleepiness
  • Contentment/happiness
  • Amorous feelings
  • Anger

Having categorized these behaviors, it’s time to gather some examples. Luckily, many people record their cats while they meow. The downside? My YouTube history is now filled with searches like:

“Horny cat sounds- 1 Hour HIGH QUALITY”

For those wondering, this is what a horny cat sound graph looks like

Once I gathered all the raw example data in MP3 format, it was time to compare these sounds to those made by Gilbert. It’s important to note that this app is tailored specifically for Gilbert, so all the data used pertains to one-year-old male cats. I’m not entirely sure what you’ll do with this information, but there it is. Now, I needed to compare the sound recorded from the app with the example data and determine which Cat Sound class it belongs to.

We now possess the raw audio recordings from Gilbert along with our pre-trained examples, marking the moment to compare the audio spectrums. This comparison will determine which of the seven behaviors Gilbert’s sounds align with. To accomplish this, I utilized an Analyzer that is derived from Google’s Audio Analyzer.

Once I identified the type of meow, I displayed a random quote from the behavior list. For instance, if the behavior is “Hungry” and it’s before 12 pm, the app might generate a quote like “I’m hungry, give me my breakfast!”

--

--

Ege Kuzubasioglu
Ege Kuzubasioglu

Written by Ege Kuzubasioglu

whimsical world of software engineering

No responses yet

Write a response