Our Audio Transcription Service allows you to either record your own audio or upload an existing audio file. We will then provide you with an English transcription and sentiment polarity analysis of the content.
- Ensure you have Python 3.9 or higher installed on your system.
- Make sure you have Docker installed and running on your computer.
- Our project includes a feature to record audio from the front-end. For this, ensure your computer has a microphone and that it is accessible via your browser.
-
Clone the repository:
git clone https://github.com/software-students-fall2023/4-containerized-app-exercise-m5-competition
-
Navigate to the project root directory:
cd 4-containerized-app-exercise-m5-competition
-
Start the
Docker
application. -
Use
docker-compose
to build the images:docker-compose build
-
Start the application using
docker-compose
:docker-compose up
-
Verify that the project is up and running by checking for the following messages in your terminal:
my_web_app | * Running on all addresses (0.0.0.0) my_web_app | * Running on http://127.0.0.1:5000
my_ml_client | * Running on all addresses (0.0.0.0) my_ml_client | * Running on http://127.0.0.1:5000
-
Access the application in your browser at:
http://localhost:6001
After starting the application and navigating to the home page, you have the option to either register for an account or use the app as a guest. You can upload an existing audio file or record a new one using the app's record button. Once the audio is processed, you'll be able to view the transcript and sentiment analysis.
If you choose to register and log in, you gain additional features like viewing your transcription history and listening to the original audio.
- Please avoid uploading excessively large files or recording very long audio, as this could lead to slow processing times. The system's timeout is set to 60 seconds.
- Currently, the supported audio file formats are
.wav
and.webm
.
To stop the application and remove the containers, execute the following command in your terminal:
docker-compose down
Our project uses pylint
for linting, black
for formatting, pytest
(for the machine-learning-client) and pytest-flask
(for the web-app), with test coverage reported by coverage
. To run these tests locally, follow these steps:
- Ensure you have Python 3.9 or higher installed on your system.
- The application also depends on ffmpeg. While it is already included in the Dockerfile, and thus not required for Docker-based runs, you will need to install it locally for local testing. To do so, follow the installation instructions on the
ffmpeg
website and ensure thatffmpeg
is added to your system'sPATH
environment variable.
git clone https://github.com/software-students-fall2023/4-containerized-app-exercise-m5-competition
cd 4-containerized-app-exercise-m5-competition
If pipenv
is not installed on your machine, install it using:
pip install pipenv
Install all the necessary dependencies by executing:
pipenv install
Activate the virtual environment using:
pipenv shell
Navigate to either the web-app
or machine-learning-client
subdirectory depending on which component you want to test.
For the web-app:
cd web-app
For the machine-learning-client:
cd machine-learning-client
Run pytest
and view the coverage report:
pipenv run coverage run -m pytest
pipenv run coverage report
To view a detailed HTML report showing lines covered and missed:
pipenv run coverage html
-
Machine-Learning-Client Coverage:
Name Stmts Miss Cover ------------------------------------------ app.py 54 8 85% ml_client.py 18 0 100% tests\__init__.py 0 0 100% tests\test_ml_app.py 50 0 100% ------------------------------------------ TOTAL 122 8 93%
-
Web-App Coverage:
Name Stmts Miss Cover ------------------------------------------- app.py 85 10 88% tests\__init__.py 0 0 100% tests\test_web_app.py 86 0 100% ------------------------------------------- TOTAL 171 10 94%
Thanks for trying out our application. If you have any questions or feedback, feel free to reach out to us via GitHub Discussions for our repository. We appreciate your interest and support!