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.1.tar.gz (851.0 kB view details)

Uploaded Source

Built Distribution

geass-0.1.1-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for geass-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2ee9f4136ff58572f3883923205d1d7922974a12c79f62b25937c4f548634578
MD5 2c21664396ea3728e5bbe3f9944c3be3
BLAKE2b-256 7ecc306e7ea4c1316b9e439430823be53e9d9e2116d97a13cbe7cbb2aa5e1abd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geass-0.1.1-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

Hashes for geass-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 873f0cbbae0c521805e8703da8adc21650b14808ff831c951c986c2643c8105f
MD5 0b344df33e6becd5d68dc6e1f30676eb
BLAKE2b-256 a80ba561fd741e1e3306c3572f92043a557b7d2600f71a0b70c68bdcbc10fdad

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