Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.
/ VoiceOver Public archive

๐ŸŽ™๏ธ๐ŸŽค VoiceOver is a web application that allows you to transcribe English audio and listen to it in another voice.

Notifications You must be signed in to change notification settings

m-cheicki/VoiceOver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

70 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Voice Over

Start in local

  1. Create virtual environment
python -m venv venv
  1. Activate virtual environment
.\venv\Script\activate
  1. Install pip requirements
pip install --no-deps -r requirements.txt
  1. Start the application
python run.py

Configure nginx web server

  1. Update linux package manager:
sudo apt update
sudo apt upgrade
  1. Install nginx
sudo apt install nginx
  1. Check if nginx service has started
service nginx status

if the service has the following status [ + ] then the service has started, otherwise launch the following command:

sudo service nginx start

If we visit the IP of the server or locallost:80 we should see the page of nginx

  1. Configure nginx to work with flask

We need first to stop the nginx service

sudo service nginx stop

We create a new configuration file inside /etc/nginx/site-enabled/

sudo nano /etc/nginx/site-enabled/CONFIGURATION_NAME

CONFIGURATION_NAME could be "flask" for example

Add the following codes:

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    location / {
        proxy_pass http://localhost:8000;
        include /etc/nginx/proxy_params;
        proxy_redirect off;
    }
}

Then we can remove the default nginx configuration with the following command:

sudo rm /etc/nginx/site-enabled/default

Restart the nginx service

sudo service nginx restart

Configure a supervisor

The supervisor will start the gunicorn command and handle errors

Install supervisor

sudo apt install supervisor

Create new configuration at /etc/supervisor/conf.d

sudo nano /etc/supervisor/conf.d/CONFIGURATION_NAME.conf

Again here the CONFIGURATION_NAME could be anything

Add the following codes:

[program:flaskblog]
directory=PATH_TO_PROJECT_FOLDER
command=PATH_TO_PROJECT_FOLDER/venv/bin/gunicorn -w <NUMBER_OF_WORKER> run:app
user=USER_NAME
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stderr_logfile=/var/log/PROJECT_NAME/PROJECT_NAME.err.log
stdout_logfile=/var/log/PROJECT_NAME/PROJECT_NAME.out.log

PATH_TO_PROJECT_FOLDER : refers to the absolute path of the project folder

NUMBER_OF_WORKER : number of worker for gunicorn. It's equal to (2 * number of processor) + 1

To get the number of processors we can run the following command

nproc --all

USER_NAME : username

PROJECT_NAME : the project name (any name)

Create stderr_logfile and stdout_logfile

sudo touch /var/log/PROJECT_NAME/PROJECT_NAME.err.log
sudo touch /var/log/PROJECT_NAME/PROJECT_NAME.out.log

Then we can start the service for supervisor

sudo service supervisor start

About

๐ŸŽ™๏ธ๐ŸŽค VoiceOver is a web application that allows you to transcribe English audio and listen to it in another voice.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published