CLI
Requirements
- Node.js v20 or higher
Installation
Available Commands
Create a New Project
Create a new Dill Pixel project:
Options:
--use-pnpm
- Use PNPM as package manager (recommended)--use-yarn
- Use Yarn as package manager
Example:
Update Dill Pixel
Update to the latest version:
Install Peer Dependencies
Install required peer dependencies:
Audio Tools
Convert Audio
Convert audio files to the correct format:
Default input directory: ./src/assets/audio
Output will be placed in [input-directory]/output
Generate Captions
Generate caption files from CSV:
Default paths:
- Input:
./src/assets/audio/captions
- Output:
./src/assets/json
Voiceover CSV Generation
Generate voiceover CSV files from your i18n locale files:
Default paths:
- Input:
./src/locales
- Output:
./src/assets/audio/vo/csv
The tool supports parsing .js
, .ts
, and .json
locale files. It processes the following formats:
- Simple string values:
Generated CSV output:
- Array of options (using pipe separator):
Generated CSV output:
- Dynamic replacements with options:
Generated CSV output:
The generated CSV files will include the following columns:
FILENAME
- Unique identifier for the voice lineLINE
- The text to be voicedSCRATCH_VOICE
- Voice ID (default: en-US-Wavenet-D)SCRATCH_GENDER
- Voice gender (default: female)SCRATCH_LANGUAGE
- Voice language (default: en-US)CAPTION
- Caption flag (default: Y)
Text formatting:
<strong>text</strong>
is converted to*text*
<em>text</em>
is converted to_text_
- Other HTML tags are removed
Using Generated CSV Files with Google Text-to-Speech
The generated CSV files are formatted to work with Google Cloud Text-to-Speech service. Here’s how to use them:
-
Prerequisites:
- A Google Cloud account with Text-to-Speech API enabled
- Google Cloud credentials configured
-
CSV Format: The generated CSV files contain the necessary metadata for voice generation:
FILENAME
: Used as the output audio file nameLINE
: The text to be converted to speechSCRATCH_VOICE
: Google Cloud voice ID (e.g., ‘en-US-Wavenet-D’)SCRATCH_GENDER
: Voice gender preferenceSCRATCH_LANGUAGE
: Target language codeCAPTION
: Whether to generate captions (Y/N)
-
Example Workflow:
-
After Generation:
- Audio files will be created using the FILENAME from your CSV
- Generate captions using
dill-pixel audio captions
Version Information
Display the current version:
Project Structure
When creating a new project using dill-pixel create
, it will generate a standard project structure with all necessary configuration files. For more details on the project structure, see the Quick Start Guide
The easiest way to get started with Dill Pixel is to use the CLI to create a new project. Run the following command in your terminal:
This will create a new directory called my-application with all the necessary files and dependencies pre-configured.