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.5.tar.gz (4.2 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.5-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: NarrativeForge-0.1.5.tar.gz
  • Upload date:
  • Size: 4.2 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.5.tar.gz
Algorithm Hash digest
SHA256 ee1d6283819e821752552b62a01f9e092f0827431edf64e08c1d2754e0b2f484
MD5 1927f49e9f938b5376125431d343699a
BLAKE2b-256 160b57c9676d9de97c44d9fb1b4adc0792fa0a05c7c892cc86866646e5db411f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: NarrativeForge-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9502ed284c481b251dd258f098e8f5fa8dcbb201b9621cae18484462f6d77dae
MD5 e8dd578ab7715063f1037294c992e87e
BLAKE2b-256 5e9266dd5c988e06c578b9398c6f23c3dc89ec2a51f0f3c54331da0afde2ab94

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