A minimalistic automatic speech recognition streamlit based webapp powered by wav2vec2-base-960h Facebook model provided by HuggingFace transformers and the NL API provided by expert.ai This is an extension of the work done by therealexpertai.
- Simply run the command pip install -r requirements.txt to install the necessary dependencies.
- Get your API usage Credentials for NL API from expert.ai. You can register here for free tier access.
- Enter your credentials in the
creds.py
file. You can also save them as your system environment variables as per your convenience. - Simply run the command:
streamlit run app.py
- Navigate to http://localhost:8501 in your web-browser. This will launch the web app :
- By default, streamlit allows us to upload files of max. 200MB. If you want to have more size for uploading audio files, execute the command :
streamlit run app.py --server.maxUploadSize=1028
- Ensure you have Docker Installed and Setup in your OS (Windows/Mac/Linux). For detailed Instructions, please refer this.
- Navigate to the folder where you have cloned this repository ( where the Dockerfile is present ).
- Build the Docker Image (don't forget the dot!! ๐ ):
docker build -f Dockerfile -t app:latest .
- Run the docker:
docker run -p 8501:8501 app:latest
This will launch the dockerized app. Navigate to http://localhost:8501/ in your browser to have a look at your application. You can check the status of your all available running dockers by:
docker ps
- Navigate to the Heroku Platform and login using your E-mail. In case you don't have an account, you can sign-up using your E-mail.
- After account creation and successful login, click on Create New App. The platform shall now ask you to choose a suitable name for the webapp and the corresponding region (Europe/United States)
- Add a payment method and click on Create App. (Heroku's free tier plan for webapps deployment has ended. For more details, you can refer this.)
- Open a new tab and login into your Github Account and create a git repository comprising of this entire directory's files and sub-directories.
- Switch back to the heroku app configuration and under the Deploy menu, select Github under the Deployment Method category.
- You need to successfully authenticate and authorize access to your Github account by Heroku. After successful authorization, search for your git repository name and select Connect.
- Go to Manual Deploys section and select the suitable branch name from the git repository which you wish to deploy.
- Click Deploy Branch. This will launch the webapp deployment and you can view the build logs. This may take several minutes and upon completion, you should see a message stating:
Launching...
Released v1
https://<heroku app name>.herokuapp.com/ deployed to Heroku
- You can now navigate to the URL https://.herokuapp.com/ in order to view your deployed webapp. For any troubleshooting, you can refer their documentation.