{"id":15136451,"url":"https://github.com/ivanrj7j/transcription","last_synced_at":"2026-01-23T03:49:54.452Z","repository":{"id":253237927,"uuid":"842888915","full_name":"ivanrj7j/Transcription","owner":"ivanrj7j","description":"This project transcribes audio using whisper and provides an api","archived":false,"fork":false,"pushed_at":"2024-08-19T12:31:44.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T20:42:51.520Z","etag":null,"topics":["ai","api","flask","transcription","whisper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivanrj7j.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-15T10:15:41.000Z","updated_at":"2024-12-15T06:47:46.000Z","dependencies_parsed_at":"2024-08-19T14:29:03.052Z","dependency_job_id":null,"html_url":"https://github.com/ivanrj7j/Transcription","commit_stats":null,"previous_names":["ivanrj7j/transcription"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanrj7j%2FTranscription","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanrj7j%2FTranscription/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanrj7j%2FTranscription/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanrj7j%2FTranscription/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanrj7j","download_url":"https://codeload.github.com/ivanrj7j/Transcription/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248258280,"owners_count":21073894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","api","flask","transcription","whisper"],"created_at":"2024-09-26T06:21:53.053Z","updated_at":"2026-01-23T03:49:54.403Z","avatar_url":"https://github.com/ivanrj7j.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transcription and Video Subtitling API\n\nThis project is a Flask-based application that utilizes the Whisper library for transcribing audio files and adds functionality for video subtitling. The main components of the project are the API endpoints, the Whisper model, the Transcriber class, and the video subtitling modules.\n\n## Table of Contents\n\n1. [Introduction](#introduction)\n2. [Installation](#installation)\n3. [Usage](#usage)\n4. [API Endpoints](#api-endpoints)\n5. [Whisper Model](#whisper-model)\n6. [Transcriber Class](#transcriber-class)\n7. [Video Subtitling](#video-subtitling)\n8. [Utils Module](#utils-module)\n9. [Main Module](#main-module)\n10. [Contributing](#contributing)\n11. [License](#license)\n\n## Introduction\n\nThis project is a comprehensive solution for transcribing audio files using the Whisper library and adding subtitles to videos. It provides a set of API endpoints for audio transcription and includes modules for video subtitling. The project encompasses audio transcription, text extraction, and video subtitling functionalities.\n\n## Tutorial\n\nClick [here](https://github.com/ivanrj7j/Transcription/wiki/Tutorial) to see the tutorials for this project.\n\n## Installation\n\nTo install the project, follow these steps:\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/ivanrj7j/Transcription.git\n   ```\n\n2. Navigate to the project directory:\n   ```\n   cd Transcription\n   ```\n\n3. Install the required dependencies:\n   ```\n   pip install -r requirements.txt\n   ```\n\n## Usage\n\nTo use the project, follow these steps:\n\n1. Start the Flask application:\n   ```\n   python main.py\n   ```\n\n2. The application will start on port 5000 by default. You can access the API endpoints using a tool like Postman or curl.\n\n## API Endpoints\n\nThe project provides three main API endpoints for audio transcription:\n\n- `/transcribe`: Transcribes an audio file and returns the transcription as a JSON response.\n- `/text`: Extracts text from an uploaded audio file and returns it as a JSON response.\n- `/rawSegments`: Extracts raw audio segments from an uploaded audio file and returns them as a JSON response.\n\n## Whisper Model\n\nThe Whisper model is a state-of-the-art speech-to-text library used for transcribing audio files.\n\n## Transcriber Class\n\nThe [Transcriber](src/modules/transcriber.py) class encapsulates the functionality of the Whisper model, providing methods for transcription and text extraction.\n\n## Video Subtitling\n\nThe project includes video subtitling capabilities with two new modules:\n\n### VideoTranscriber (video.py)\n\nThe `VideoTranscriber` class in `video.py` handles the process of adding subtitles to videos. Key features include:\n\n- Initializing with a video file, subtitle configuration, and raw subtitle data\n- Converting timestamps to frame indices\n- Interpreting SRT-like subtitle data\n- Applying subtitles to video frames\n- Saving the subtitled video to a file\n\n### Subtitle and SubtitleConfig (subtitle.py)\n\nThe `subtitle.py` module contains two main classes:\n\n1. `SubtitleConfig`: Manages the configuration for subtitle appearance, including font, size, color, and positioning.\n\n2. `Subtitle`: Represents individual subtitle segments and handles the rendering of subtitles on video frames.\n\nThese classes work together to provide a flexible and customizable video subtitling system.\n\n## Utils Module\n\nThe `utils` module contains helper functions used throughout the project, including audio file handling and temporary file management.\n\n## Main Module\n\nThe `main` module initializes the Flask application, registers the API endpoints, and sets up the Whisper model and Transcriber class.\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanrj7j%2Ftranscription","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanrj7j%2Ftranscription","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanrj7j%2Ftranscription/lists"}