Auto-lesson, v1.1
Posted on

Utility for a generation of video lessons from separate phrases as frames.
Generate speeches from phrases via Google Text-To-Speech API and combine them with a video track.
Change Log
- phrases:
- support a language specification (ISO 639-1 language code) for each phrase (see below for details);
- audio:
- generate speeches from phrases via Google Text-To-Speech API (in MP3 format);
- generate a sound track from speeches (in MP3 format);
- support a specification of an additionally gap between speeches;
- video:
- combine video and sound tracks (in AVI format with Xvid (MPEG-4) codec);
- set a duration of each frame equal to a corresponding speech;
- support a specification of an additionally gap between frames.
Features
- phrases:
- read of phrases from stdin;
- support single-line and multiline phrases (each phrase is separated from another by a double newline);
- support a language specification (ISO 639-1 language code) for each phrase (see below for details);
- frames:
- generate frames from phrases (in PNG format);
- support only a plain background;
- align a phrase on a center of a frame;
- split a phrase to lines for to fit it into a frame (support a specification of a frame padding);
- frame settings:
- background:
- width;
- height;
- padding;
- color;
- text:
- font (it supports only TrueType fonts);
- size;
- color;
- background:
- audio:
- generate speeches from phrases via Google Text-To-Speech API (in MP3 format);
- generate a sound track from speeches (in MP3 format);
- support a specification of an additionally gap between speeches;
- video:
- generate a video from frames and a sound track (in AVI format with Xvid (MPEG-4) codec);
- set a duration of each frame equal to a corresponding speech;
- support a specification of an additionally gap between frames;
- output a generated video to a specified file.
Phrases Format
Grammar in an EBNF:
phrase list = phrase, {PHRASE SEPARATOR, phrase};
phrase = language specification, paragraph;
language specification = LANGUAGE CODE, ":";
paragraph = ANY TEXT - PHRASE SEPARATOR;
PHRASE SEPARATOR = ? /(\r\n|\n\r|\n|\r){2}/ ?;
LANGUAGE CODE = ? /en|ru|.../i ?; (* see ISO 639-1 *)
ANY TEXT = ? /.+/s ?;
Example:
EN: Beauty lies in lover's eyes.
RU: Красота — в глазах любящего.
Screenshots


