This is the Backend for MedVoice project. This includes the ML pipeline for Whisper-Diarization, Llama and Picovoice models.
To build the project locally, follow the steps below:
-
Make sure you have Poetry installed on your system. If not, you can install it by following the instructions here.
-
Clone the repository to your local machine:
git clone https://github.com/MedVoice-RMIT-CapStone-2024/replicate-whisper.git
-
Create and activate a Python virtual environment:
python -m venv venv source venv/bin/activate
-
Install the project dependencies using
Poetry
:poetry install
- Or with
Pip
pip install -r requirements.txt
-
Run the project locally:
poe run
-
[Optional] More ultility options:
- From
poetry.lock
torequirements.txt
poe export
- From
requirements.txt
topoetry.lock
poe import
- To remove all the files from
audios/
:poe flush
To use the Replicate API, you need to obtain an API key. Follow the steps below to get your API key:
-
Visit the Replicate website at https://www.replicate.ai and sign in to your account.
-
Navigate to your account settings and locate the API key section.
-
Generate a new API key and copy it to your clipboard.
-
In your project, create a file named
.env
in the root directory. -
Add the following line to the
.env
file, replacing<YOUR_API_KEY>
with your actual API key:REPLICATE_API_KEY=<YOUR_API_KEY>
or your can run this command in your terminal:
export REPLICATE_API_KEY=<YOUR_API_KEY>
When interacting with Google Cloud Client libraries, the library can auto-detect the credentials to use. Make sure to follow these additional steps:
1. Set up Application Default Credentials (ADC) as described in the Google Cloud documentation.
To provide your user credentials to ADC for a Google Account, you use the Google Cloud CLI:
When you initialize the gcloud CLI, be sure to specify a Google Cloud project in which you have permission to access the resources your application needs.
- Create your credential file:
gcloud auth application-default login
- A sign-in screen appears. After you sign in, your credentials are stored in the local credential file used by ADC.
3. Ensure that the user account or service account you are using has the required permissions. For this sample, you must have the "storage.buckets.list" permission.
Args:
project_id: The project id of your Google Cloud project.
This project is licensed under the MIT License.