Skip to content

thecmdrunner/remotion-gtts-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
thegamerhat
Apr 13, 2023
2ebebc5 · Apr 13, 2023

History

4 Commits
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023
Apr 13, 2023

Repository files navigation

Remotion video

Animated Remotion Logo

PROBLEMS TO FIX:

  1. Must kill the express server after render finishes.

Welcome to your TTS Remotion project!

Get Started

  1. Create Firebase Project Create project

  2. Go to Project Settings. In the "General" tab, go to "Your apps" section and register a "Web App".

/assets/firebase-register.mp4

  1. Copy the config credentials and paste into .env

  2. Enable storage, create storage bucket, and edit rules to allow read, write for remotion-gtts directory (or any other directory that you have specified for audioDirectoryInBucket in the constants.ts file).

/assets/firebase-storage-enable.mp4

  • Configure bucket rules
  rules_version = '2';
  service firebase.storage {
    match /b/{bucket}/o {
      match /remotion-gtts/{allPaths=**} {
        allow read, write: if true;
      }
    }
  }

Maybe you should have better security validation instead of just allowing write to everyone.

Create rules

  1. Enable TTS API on GCP
  • You will probably already have a project set up in GCP with the same name as the Firebase project you created earlier. Just use that, to keep things simple.

  • Open hambuger menu, go to APIs and Services -> Library

  • Search for "text to speech", and enable Cloud Text-to-Speech API. You may be required to enable billing, by creating a billing account. (Be sure to also review the pricing tab)

Create credentials

/assets/gcp-enable-api.mp4

  1. Create Credentials
  • After API is enabled, click on Manage -> Credentials (on sidebar)

Create credentials

  • Click on CREATE CREDENTIALS and select Service Account

Create credentials

  • Fill relevant fields, select the Basic role of Owner, and skip the other optional fields if not required.

/assets/gcp-create-serviceaccount.mp4

  • Now create a JSON key to download credentials as a .json file.

/assets/gcp-create-key.mp4

  • Name the JSON file as serviceaccount.json and place it in the root of your project - /serviceaccount.json

IMPORTANT: This file must never be committed, and must be added to .gitignore, .dockerignore, etc. if you change its name to something different.

If you change the location of this file, make sure to also update GOOGLE_APPLICATION_CREDENTIALS in .env

  1. Copy .env.example to .env and enter your secrets.

Example

Remotion TTS example

Commands

Install Dependencies

npm i

Start Preview

npm start

Render video

npm run build

See docs for server-side rendering here.

Upgrade Remotion

npm run upgrade

Docs

Get started with Remotion by reading the fundamentals page.

Issues

Found an issue with Remotion? File an issue here.

License

Notice that for some entities a company license is needed. Read the terms here.