Skip to content

PaulMarisOUMary/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

https://github.com/algosup/2022-Project-Artificial-Intelligence-Group-D/blob/d61e7a4d57c084972b0b6d6a27f6bedb2728d08b/predict.py#L67-L70

  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

Releases

No releases published

Languages

  • Jupyter Notebook 97.3%
  • Python 2.7%