Skip to main content

Command your transcription API with Geass

Project description

Geass

Command your audio transcriptions API with Geass

Version License Python Version wakapi.dev

geass demo

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

  1. Clone the repository:
git clone git@github.com:Kabilan108/geass.git
cd geass/
  1. Install dependencies using Poetry:
poetry shell
poetry install --with dev
  1. Set up Modal:
python -m modal setup
  1. 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 for GEASS_SERVICE_TOKEN.

  2. 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.

  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geass-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

geass-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file geass-0.1.0.tar.gz.

File metadata

  • Download URL: geass-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for geass-0.1.0.tar.gz
Algorithm Hash digest
SHA256 186c46130f98935cc13ee378c487e118a256c67b75c22ead92c098168f65869b
MD5 7b76bae26f0bb378e264ebc0dfce34b5
BLAKE2b-256 85808785a9acf5634f7035a03546c4c2b9f3f3b1948be6d7df45e84623d8425a

See more details on using hashes here.

File details

Details for the file geass-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: geass-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for geass-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd2710a2afd4899447b3e41389f4c0cbef87e10bb82d7f44b273970150e020ec
MD5 b9036bad5c3033f56cf724a7ed692aaf
BLAKE2b-256 1d07e1187dc9ddfe177689803cae7ffa7e62ba4ed8feef842283d7a5cec425e2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page