This guide provides step-by-step instructions to set up your project environment, including the installation of FFmpeg and PortAudio across macOS, Linux, and Windows, as well as setting up a Python virtual environment using Pipenv, pip, or conda.
-
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Install FFmpeg and PortAudio:
brew install ffmpeg portaudio
For Debian-based distributions (e.g., Ubuntu):
- Update the package list
sudo apt update
- Install FFmpeg and PortAudio:
sudo apt install ffmpeg portaudio19-dev
- Visit the official FFmpeg download page: FFmpeg Downloads
- Navigate to the Windows builds section and download the latest static build.
- Extract the downloaded ZIP file to a folder (e.g.,
C:\ffmpeg). - Add the
bindirectory to your system's PATH:- Search for "Environment Variables" in the Start menu.
- Click on "Edit the system environment variables."
- In the System Properties window, click on "Environment Variables."
- Under "System variables," select the "Path" variable and click "Edit."
- Click "New" and add the path to the
bindirectory (e.g.,C:\ffmpeg\bin). - Click "OK" to apply the changes.
- Download the PortAudio binaries from the official website: PortAudio Downloads
- Follow the installation instructions provided on the website.
- Install Pipenv (if not already installed):
pip install pipenv
- Install Dependencies with Pipenv:
pipenv install
- Activate the Virtual Environment:
pipenv shell
python -m venv venv
macOS/Linux:
source venv/bin/activate
Windows:
venv\Scripts\activate
pip install -r requirements.txt
conda create --name myenv python=3.11
conda activate myenv
pip install -r requirements.txt
python brain_of_the_doctor.py
python voice_of_the_patient.py
python voice_of_the_doctor.py
python gradio_app.py