-
Step 1. Clone the repo
git clone https://github.com/lvyv/spokenEnglish.git && cd spokenEnglish
-
Step 2. Install requirements
Install portaudio and ffmpeg for audio
# for mac brew install portaudio brew install ffmpeg# for ubuntu sudo apt update sudo apt install portaudio19-dev sudo apt install ffmpegNote:
-
ffmpeg>=4.4is needed to work withtorchaudio>=2.1.0 -
Mac users may need to add ffmpeg library path to
DYLD_LIBRARY_PATHfor torchaudio to work:export DYLD_LIBRARY_PATH=/opt/homebrew/lib:$DYLD_LIBRARY_PATH
Then install all python requirements
pip install -r requirements.txt
If you need a faster local speech to text, install whisperX
pip install git+https://github.com/m-bain/whisperx.git
-
-
Step 3. Setup
.env:cp ..env .env
Update API keys and configs following the instructions in the
.envfile.Note that some features require a working login system. You can get your own OAuth2 login for free with Firebase if needed. To enable, set
USE_AUTHtotrueand fill in theFIREBASE_CONFIG_PATHfield. Also fill in Firebase configs inclient/next-web/.env. -
Step 4. Run backend server in Pycharm IDE:
-
Step 5. Run frontend client:
-
web client:
Create an
.envfile underclient/next-web/cp client/next-web/..env client/next-web/.env
Adjust
.envaccording to the instruction inclient/next-web/README.md.Start the frontend server:
cd client/next-web npm install npm run dev
-
-
Step 6
- Use the following SQL statement to create a scenes table.
CREATE TABLE scenes ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, image VARCHAR(255) NOT NULL, category VARCHAR(255) NOT NULL ); -
Step 7
- Run
text/text.py
- Run
-
Step 8
- Download the checkpoint from here and extract it to the
checkpointsfolder.
- Download the checkpoint from here and extract it to the
-
Step 9 PostgreSQL extension installation
- Download the Vector from here
- Compiling on Windows requires you to download Visual Studio first
- Select C++ during installation
- After the installation is complete, open cmd in Administrator Mode and execute the following commands in turn to complete the installation.
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" cd C:\Users\xxx\Downloads\vector-0.7.3 set "PGROOT=C:\Program Files\PostgreSQL\16" nmake /F Makefile.win nmake /F Makefile.win install
- Finally, in the database connection tool, select the specific database instance and run the following command to expand the vector type.
CREATE EXTENSION vector;After running these commands, a local development server will start, and your default web browser will open a new tab/window pointing to this server (usually http://localhost:3000).