Link to the repository containing the original scripts used for the backend: https://github.com/carmen-chau/StreetWhisperCode
backend
: A folder that contains all files related to the backend of the application such as scripts that does translation, transcription, etc. streetwhisperapp.py
: Script for the command line interface of the application.requirements.txt
: All the dependencies that needs to be installed to run the app.STREET Lab Whisper App currently supports the following commands if you are interacting with streetwhisperapp.py directly:
Command |
What it does |
---|---|
python streetwhisperapp.py |
To start running the tool |
python streetwhisperapp.py -howtouse |
Explains how to use the tool |
python streetwhisperapp.py -credits |
Displays the credits |
python streetwhisperapp.py --help |
Shows all the available options the tool has |
This app currently runs on ~Python 3.9 (or more specifically Python 3.9.7). Please be sure to have Python 3.9 installed on your device. You can install Python 3.9 from here: https://www.python.org/downloads/. Make sure to install the 64 bit version of Python 3.9 if you are using Windows.
speaker-diarization-3.1
on Hugging Face, which can be found here: https://huggingface.co/pyannote/speaker-diarization-3.1 and then head to your Hugging Face account's settings, then to the Access Tokens section, and then create a New Token (the type can be either Read or Write but we recommend you setting the type to Read). You will need to enter this token the first time you run the app.cd
is a command used that will allow you to move between directories. We will use the command cd
to eventually end up in the street-whisper-app folder. To do this locate where the street-whisper-app folder is on your computer.
street-whisper-app
folder is located in your GitHub folder, which is in your documents folder on your computer, this would be the order of commands you will enter (Note: you enter after writing every command): cd documents -> cd GitHub -> cd street-whisper-app
.street-whisper-app
folder, if this is your first time running the app we want to create a virtual environment, which is an isolated place on your computer with all the dependencies we need to run the app.
python3.9 -m venv myvenv
and for Windows: py -3.9 -m venv myvenv
): python3.9 -m venv <virtual-environment-name>
(for MacOS) or py -3.9 -m venv <virtual-environment-name>
(for Windows).source <virtual-environment-name>/bin/activate
(for MacOS) or .\<virtual-environment-name>\Scripts\Activate.ps1
(for Windows). For example, to activate your venv if it is called "myvenv" you would enter source myvenv/bin/activate
(if on MacOS) or .\myvenv\Scripts\Activate.ps1
(if on Windows) in your terminal.source <virtual-environment-name>/bin/activate
(if you are using MacOS) or .\<virtual-environment-name>\Scripts\Activate.ps1
(if you are using Windows) to activate the virtual environment.Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
to set your execution policy and try activating the virtual environment. pip install -r requirements.txt
and then to install Whisper in the virtual environment, run the following: pip install -q git+https://github.com/openai/whisper.git
ffmpeg.exe
file located in the folder you downloaded into your virtual environment's Scripts folder (ex: If your virtual environment is called venvname
then you would move ffmpeg.exe
into myvenv\Scripts
)python streetwhisperapp.py
to start the app.Note: The app can run offline after a valid access token has been entered.