Skip to main content

A package for adding text and ai generated voice to videos.

Project description

NarrativeForge

NarrativeForge is a Python package that enhances videos by adding text and synthesized speech over a background video. It's designed to simplify the process of creating engaging videos with customizable text and voice narration.

Features

  • Add text and synthesized speech to background videos.
  • Customize font, color, and other text parameters.
  • Easily integrate into existing video editing workflows.

Installation

You can install NarrativeForge using pip:

pip install NarrativeForge

Additionally, you need to set up your OpenAI API key. Obtain your API key by following the instructions on the OpenAI website. Once you have the API key, you can set it as an environment variable:

export OPENAI_API_KEY="your-api-key-here"

Make sure to replace "your-api-key-here" with your actual OpenAI API key.

Usage

use in command line as

NarrativeForge -i "input.mp4" -t "Hello, World!, Enhance your videos with NarrativeForge"
from NarrativeForge import TextToVideo

# Create an instance of TextToVideo
text_to_video_instance = TextToVideo()

# Specify input video, text, and output filename
input_filename = "input_video.mp4"
texts = "Hello, World!, Enhance your videos with NarrativeForge"
output_filename = "output_video.mp4"

# Generate the enhanced video
text_to_video_instance.generate_video(
    input_filename, texts, output_filename, caption_padding=100
)

Replace input_video.mp4 with the path to your input video and customize the texts list accordingly. The enhanced video will be saved as output_video.mp4.

Configuration

You can customize various parameters using the generate_video function. Refer to the function signature and documentation for options.

Contributing

Contributions are welcome! If you find any issues or have suggestions, please open an issue or submit a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NarrativeForge-0.1.7.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

NarrativeForge-0.1.7-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file NarrativeForge-0.1.7.tar.gz.

File metadata

  • Download URL: NarrativeForge-0.1.7.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for NarrativeForge-0.1.7.tar.gz
Algorithm Hash digest
SHA256 4fec6550672a42a5c95db761e357ef1cf9e7b849b3660f4ba264b03f80d261a5
MD5 5325290c0701a79dcecae3d0a02ff0f8
BLAKE2b-256 8ab05b8eb1aebb3fa29165c2b5a8792117099dd8b7d7abfd2686f7eefcfecf9e

See more details on using hashes here.

File details

Details for the file NarrativeForge-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: NarrativeForge-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for NarrativeForge-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a68f2e48c20b28b0a33cc139efbfa64da09e8759736800c9774f82804a72d01e
MD5 e62e08d23494ba54c154051ad7a56b61
BLAKE2b-256 1060b92256f783d5ca5ddfa4a6a9f3334aa703ada1250fc43d617ab7f87353eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page