Code Monkey home page Code Monkey logo

srt_to_tts's Introduction

"Subtitles to Speech" and "FFMpeg combines video and audio"

Prerequites

  • get ready google cloud service confidentials under free tier limits, please see https://cloud.google.com/text-to-speech
  • python3 and pip
  • ffmpeg, ffmpeg-python, pydub, google-cloud-texttospeech==1.0.1
# apt update
# apt install ffmpeg
# pip install ffmpeg-python
# pip install pydub pysrt google-cloud-texttospeech==1.0.1 

Get Started

Subtitles to Speech

  • srt_to_gcs_tts.ipynb
    • use pysrt to parse the time in .srt subtitile files, and then call google cloud services text-to-service for each subtitle.
    • please make sure your google confidential is consistent to the path (os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = "../googlecloud.json")

FFMpeg combines video and audio

  • ffmpeg_combine.ipynb
    • use ffmpeg to combine original video and google-tts generated audio.

srt_to_tts's People

Contributors

chychen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

srt_to_tts's Issues

subtitle to speech

It will be amazing if it can integrate a gui text to speech option that can from a subtitle file and the original track generate automatically a new track where each sequence is synchronized with the original (realistic voice choice, pitch rate) and the subtitle timing(synchronize speed rate with each sequence timing).

The original voice can be removed from each sequence using an opensource AI like "spleeter", or simply replace each sequence with the new one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.