This script converts text files into videos with audio using AWS Polly for audio synthesis and ffmpeg for video processing.
Make sure you have the following programs installed:
- awk
- aws (Amazon Web Services CLI)
- ffmpeg
- Place your text files (.txt) in the same directory as the script.
- Run the script using the following command:
bash convert_text_to_video.sh
- Follow the on-screen prompts to select a text file and generate the video.
The script performs the following steps:
- Checks if the required programs (awk, aws, and ffmpeg) are installed.
- Scans for .txt files in the current directory and lists them with an ID.
- Prompts the user to select a file by ID.
- Splits the selected text file into segments based on paragraphs.
- Converts each segment of text to audio using AWS Polly.
- Creates videos with text overlay by merging the audio and video together.
- Concatenates all the videos to create a final video.
- Cleans up temporary files.
To get started with this script, follow these steps:
- Clone the repository to your local machine.
- Install the required programs (awk, aws, and ffmpeg).
- Make the script executable by running the following command:
chmod +x convert_text_to_video.sh
- Place your text files in the same directory as the script.
- Run the script using the command mentioned in the Usage section.
Please note the following limitations of this script:
- The script assumes that the input text files are in plain text format (.txt).
- AWS credentials must be properly configured in order to use AWS Polly for audio synthesis.
Contributions to improve the script are welcome! If you encounter any issues or have any suggestions, please open an issue or submit a pull request.
This script is released under the MIT License. Please see the LICENSE file for more details.
This script was developed by Linkyrex.