Skip to content

algosup/2022-Project-Artificial-Intelligence-Group-D

Repository files navigation

Predict English/French from sound using AI

Train the AI

You'll find the notebook used to create the model under /notebook.ipynb.

Open the notebook using Google Colab or Kaggle then run all blocks and download the model.tflite.

Note:

The model is a Binary classification;

It means in our case, 0 == English, 1 == French

Predict Language using a Directory of wav files

  1. Clone the project on your machine.
  2. Create a directory in the project.

Note:

The default directory name is wav, create a directory with this name if you don't want to change the code below

###########################
# !EDIT HERE! #
###########################
DIRECTORY_PATH = join(root_directory, "wav") # CHANGE THIS VARIABLE TO YOUR DIRECTORY WAV FILES

  1. Put your wav files in the directory.

Note:

Non-wav files will not be taken in consideration by the code.

  1. Install the requirements.txt

Note:

You might have tensorflow installed, the requirements.txt will not automaticly install tensorflow

  1. Run the predict.py with python3.

Note:

You should have something similar:

output-predict.py

Predict Language using a Raspberry Pi

  • Install Debian x64 Lite using Raspberry Pi Imager on a Raspberry Pi, then follow this guide.
  • Install all required dependencies for python3 on the Raspberry Pi.
  • Using ssh, upload in the same directory: formaterio.py, model.tflite (or your model), main.py
  • Run using python3 main.py

Note: (you must have a microphone plugged on your Raspberry Pi)

Documents

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published