insta-captions is a tool that will allow for the instant transcription and translation of audio files to and from different languages.
Project description
insta-captions
insta-captions is a tool that will allow for the instant transcription and translation of audio files to and from different languages.
View more on our documentation page
Installation
"pip install insta-captions"
Overview
insta-captions is a library that deals with the conversion of audio into "captions". I have been learning Mandarin, my third language. Part of my learning process, as well as maintenance for Spanish, is to watch videos, shows, and movies in the language I am trying to deepen. Sometimes, however, I need to watch content in English but want to read it in another language, and there is no easy way to do this if captions are not provided by the video maker, which is the crux of this issue.
The main feature that I envision for this project would be for audio to be converted into text of any (supported) language regardless of the language of the input audio. This involves two, albeit involved, steps:
- given an audio file, convert that audio into text of language it is in
- given text of one language, translate into another
Installation and Running
insta-captions transcriptions are possible with DeepSpeech. For installation of DeepSpeech, refer to their documentation. I use their pre-trained models on english and mandarin. These models are included in this repository via Git LFS due to large file size.
Additional libraries used are numpy to convert the buffer of the .wav files into int16 numpy arrays as this is what DeepSpeech speech-to-text accepts.
Example Usage
Using a .wav file from the data folder,
from insta-captions import Transcribe as Trans
t = Trans()
print(t.transcribe('./8455-210777-0068.wav'))
>>> [('./2830-3980-0043.wav', 'experience proves this')]
make commands
make develop: install and build this library and its dependencies usingpipmake build: build the library usingsetuptoolsmake format: autoformat this library usingblackmake lint: perform static analysis of this library withflake8andblackmake test: run automated tests withunittestmake coverage: run automated tests withunittestand collect coverage information
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
File details
Details for the file insta-captions-0.2.0.tar.gz.
File metadata
- Download URL: insta-captions-0.2.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2214ce2a84bcf9ecdb2c92ce2c7d3814e086f4e1af39b2a4f7c2710e48b7c1c0
|
|
| MD5 |
4e662f856c900de3b795fa21e6c1a0ee
|
|
| BLAKE2b-256 |
d7ad19fcefbadf9be18d3d88a866535017a70db405a05c13ba5b9f8a1499f3b2
|