- Must kill the express server after render finishes.
Welcome to your TTS Remotion project!
-
Go to Project Settings. In the "General" tab, go to "Your apps" section and register a "Web App".
/assets/firebase-register.mp4
-
Copy the config credentials and paste into
.env
-
Enable storage, create storage bucket, and edit rules to allow read, write for
remotion-gtts
directory (or any other directory that you have specified foraudioDirectoryInBucket
in theconstants.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.
- 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)
/assets/gcp-enable-api.mp4
- Create Credentials
- After API is enabled, click on Manage -> Credentials (on sidebar)
- Click on CREATE CREDENTIALS and select Service Account
- 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
- Copy
.env.example
to.env
and enter your secrets.
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
Get started with Remotion by reading the fundamentals page.
Found an issue with Remotion? File an issue here.
Notice that for some entities a company license is needed. Read the terms here.