This project is an audio transcription application with a user-friendly web interface. It allows you to upload audio files and get transcriptions using either AssemblyAI or OpenAI’s Whisper API.
The application uses the following environment variables:
Variable | Description | Accepted Values | Default |
---|---|---|---|
TZ |
The timezone for the application. | Any valid timezone string (e.g., Europe/Amsterdam , America/New_York ) |
UTC |
ASSEMBLYAI_API_KEY |
Your API key for AssemblyAI. | Your AssemblyAI API key | None (required) |
OPENAI_API_KEY |
Your API key for OpenAI Whisper. | Your OpenAI API key | None (required) |
DEFAULT_TRANSCRIBE_API |
The default transcription API to use when the application loads. | assemblyai or openai |
assemblyai |
DEFAULT_LANGUAGE |
The default language to use for transcription when the application loads. | auto , en , nl , fr , es |
auto |
You have two primary options for installation and deployment:
This is the easiest way to get started. You can pull the pre-built image from Docker Hub and run it directly.
Pull the Docker Image:
docker pull arnoulddw/transcriber-app:latest
Run the Docker Container:
docker run -d -p 5001:5001 \
-e TZ="Your/Timezone" \
-e ASSEMBLYAI_API_KEY="your_assemblyai_api_key" \
-e OPENAI_API_KEY="your_openai_api_key" \
-e DEFAULT_TRANSCRIBE_API="assemblyai" \
-e DEFAULT_LANGUAGE="auto" \
--name transcriber-app \
arnoulddw/transcriber-app:latest
"Your/Timezone"
with your desired timezone (e.g., Europe/London
)."your_assemblyai_api_key"
and "your_openai_api_key"
with your actual API keys.DEFAULT_TRANSCRIBE_API
and DEFAULT_LANGUAGE
if needed.-d
flag runs the container in detached mode (in the background).-p 5001:5001
flag maps port 5001 on your host machine to port 5001 in the container.--name transcriber-app
gives your container a name for easier management.If you want to customize the application or develop it further, you can use Docker Compose to build and run the image locally.
Step 1: Clone the Repository
Clone this repository:
git clone https://github.com/arnoulddw/transcriber
cd [Your-Project-Name]
Step 2: Configure Environment Variables in docker-compose.yml
docker-compose.yml
file.Add your API keys and other environment variables under the environment
section. Make sure to replace the placeholder values with your actual API keys:
services:
transcriber:
build:
context: .
dockerfile: Dockerfile
ports:
- "5001:5001"
volumes:
- ./backend:/app/backend
- ./temp_uploads:/app/temp_uploads
environment:
- TZ=${TZ:-UTC}
- ASSEMBLYAI_API_KEY=your_assemblyai_api_key
- OPENAI_API_KEY=your_openai_api_key
- DEFAULT_TRANSCRIBE_API=${DEFAULT_TRANSCRIBE_API:-assemblyai}
- DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE:-auto}
restart: unless-stopped
Step 3: Build and Run with Docker Compose
In the project’s root directory, run the following command:
docker-compose up -d --build
This will build the Docker image and start the container in detached mode.
Open your web browser and go to:
http://localhost:5001
If you want to develop or test the application locally before deploying it with Docker, follow these steps:
Create a virtual environment:
python3 -m venv venv
Activate the virtual environment:
# On Linux/macOS
source venv/bin/activate
# On Windows
venv\Scripts\activate
Install the required Python packages:
pip install -r backend/requirements.txt
You can either set the environment variables temporarily in your terminal:
# Example for Linux/macOS:
export ASSEMBLYAI_API_KEY=your_assemblyai_api_key
export OPENAI_API_KEY=your_openai_api_key
export TZ=Europe/London
# ... other variables
Or, you can create a .env
file locally (but don’t commit it to Git) and add the variables there. Then, use python-dotenv
to load them in your app.py
(you’ll need to install it: pip install python-dotenv
).
Start the Flask development server:
python backend/app.py
Access the application in your browser at http://127.0.0.1:5001/
.
docker-compose.yml
file.If you’d like to contribute to this project, please feel free to submit pull requests or open issues on the GitHub repository.
This project is licensed under the MIT License.