Command your transcription API with Geass
Project description
Geass
Command your audio transcriptions API with Geass
Welcome to Geass, the ultimate tool for transcribing your audio files with ease. Just like how Lelouch commands others with his Geass, you can now command your audio transcriptions with this powerful CLI and serverless API. Let's embark on this journey together and make transcribing audio as smooth as Lelouch's plans!
Features
- Convert video files to audio format
- Transcribe audio files using the Geass serverless API
- Check the status of transcription jobs
- Retrieve transcripts in different formats (text, JSON, SRT)
- Manage and list transcription jobs
Prerequisites
Before using Geass, make sure you have the following:
- Python 3.10 or higher
- Poetry package manager
- Modal account (for deploying the transcription service)
- ffmpeg (for video to audio conversion)
Installation
- Clone the repository:
git clone git@github.com:Kabilan108/geass.git
cd geass/
- Install dependencies using Poetry:
poetry shell
poetry install --with dev
- Set up Modal:
python -m modal setup
-
Create a secret in your modal account called
geass-secrets
. Take a look at .env.template to see what secrets need to be defined. Use the generate-token.sh script to generate a value forGEASS_SERVICE_TOKEN
. -
Deploy the transcription service:
modal deploy geass.service.main
Once the service is running, set GEASS_SERVICE_API_URL
to the fast api URL. This and GEASS_SERVICE_TOKEN
should be set in your local environment.
- Install the Geass CLI:
pip install -e .
Usage
Convert Vido to Audio
The modal endpoint only accepts audio files, so you need to convert videos into
mp3s first. To convert a video file to audio format, use the video-to-audio
command:
geass video-to-audio VIDEO_PATH [AUDIO_PATH]
VIDEO_PATH
: Path to the video file.AUDIO_PATH
(optional): Path where the converted audio file should be saved. If not provided, the audio file will be saved in the same location as the video file with an .mp3 extension.
Transcribe Audio
To start a transcription job, use the transcribe command:
geass transcribe AUDIO_PATHS [--num-threads NUM_THREADS]
AUDIO_PATHS
: Path(s) to the audio file(s) to be transcribed.--num-threads
(optional): Number of threads to use for submitting the transcription job (default: 4).
List Transcription Jobs
To list all transcription jobs, use the list-jobs command:
geass list-jobs [--status STATUS] [--limit LIMIT] [--refresh]
--status
(optional): Filter jobs by status.--limit
(optional): Limit the number of jobs to display (default: 10).--refresh
(optional): Refresh the status of running jobs.
Check Job Status
To check the status of a specific transcription job, use the check-status command:
geass check-status JOB_ID
JOB_ID
: ID of the transcription job.
Get Transcript
To retrieve the transcript of a completed job, use the get-transcript command:
geass get-transcript JOB_ID [--format FORMAT] [--retry]
JOB_ID
: ID of the transcription job.--format
(optional): Format of the transcript (choices: text, json, srt; default: text).--retry
(optional): Retry getting the transcript if the job is not yet complete.
Acknowledgments
We would like to express our gratitude to the following:
- The creators of Code Geass for inspiring the name and theme of this project. All hail Lelouch!
- The open-source community for providing the tools and libraries used in this project.
Remember, with Geass, you have the power to command your audio transcriptions effortlessly. Happy transcribing!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file geass-0.1.2.tar.gz
.
File metadata
- Download URL: geass-0.1.2.tar.gz
- Upload date:
- Size: 851.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e39fd2d6cc613a8bfa13bb3c0d2887cf19df11da396c520de67a4b37a06084a |
|
MD5 | 6820e9daec2d5cef1156664757f0a9e8 |
|
BLAKE2b-256 | a4983c79d70201ee710f1880d5d3098dc3b8ccdb58a6a4afd144f4bd9c712f8f |
File details
Details for the file geass-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: geass-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50ce3a03706a33ec92bc3d293d5765b5c23bdfe7c5df42d6d8088eeed12e15a4 |
|
MD5 | bd4bedd56ef289430dc7897b6d36dbf6 |
|
BLAKE2b-256 | 7b68831fc0d133bc0e8b5d731c3609d29bbc7bb80f150633d6dd2af801c82cc0 |