MiguelMJ / Scripter

Create interactive scripts from recordings for language learning. Deepgram + DEV hackathon submission.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scripter

Create interactive scripts from recordings for language learning

Create interactive HTML5 pages with a script from a recorded conversation. Powered by Deepgram. Requires API key from Deepgram. Submission for Deepgram+DEV hackathon, 2022.

Yout might want to read the submission post, where you will also find a demo.

Get the API key

  • Deepgram (required): Create an account in deepgram.com and get an API key.

Store it in a file named deepgramApiKey in the root folder or pass it directly in the CLI using the --deepgram-api-key argument.

Features

  • Tune the voice recognition process with the Deepgram query parameters for transcriptions pre-recorded audio with -P|--param KEY=VALUE arguments.
  • Downloads and results are cached to reduce redundant traffic, but you can force it using the -F|--force flag or directly removing the _cache folder.
  • All log information outputs through stderr and the search output through stdout (or a file, with the -o|--output-file FILE argument). This makes it easy to redirect and pipe different information safely.
  • Use the -H|--host HOST option to set the LibreTranslate host to call for translations. By default, https://libretranslate.de is called, but a local server is recommended.
  • Your language of use must be supported by both Deepgram and LibreTranslate. Set the source and target languages respectively with -f|--from LANG and -t|--to LANG.

Quick start

  • Install all dependencies:
    pip install -r requirements.txt
  • Generate an interactive script from a conversation in Spanish, using English translations.
    python main.py --from es --to en example_audio.ogg -o index.html

Set up a local LibreTranslate server (optional)

# Install the application
pip install libretranslate

# Launch it
# IMPORTANT: use --load-only to avoid loading
# the innecesary models of all supported languages
libretranslate --load-only es,en --disable-web-ui

Now you can use Scripter with the --host http://localhost:5000 argument.

Contributing

  • See the CONTRIBUTING file to make a PR.
  • ⭐ Star this repository
  • Raise an issue .

Contributors

Empty section, for now ;)

Ideas for the future

  • Allow usage of output templates.
  • Enable options to change which APIs to use for the transcription and translation services.
  • Add a demo.

License

This code is licensed under the MIT license, a copy of which is available in the repository.

About

Create interactive scripts from recordings for language learning. Deepgram + DEV hackathon submission.

License:MIT License


Languages

Language:Python 100.0%