Giter Club home page Giter Club logo

anime_video_generator's Introduction

API Documentation

We expect POST requests, where the keys are passed to request body at: http://34.67.150.35/story_to_video

Current keys

  • story_images: [] - A list of story images
  • callback_url: str - A url where the result will be sent to, use https://webhooks.site/ if you need a quick setup
  • voice: Optional[str] - A voice name or url supported by play.ht A list of voices can be found here: https://docs.play.ht/reference/api-list-ultra-realistic-voices
  • prompt: Optional[str] - The prompt to generate the text from
  • is_toontube: bool - If provided, the API will look for the first (and only) url in story_images, and use these story images`

Future keys

  • background_music: str - A key or phrase to generate background music from`

Note that due to the nature of POC not everything will work correctly, and debugging is based on "id" key of response json

Usage

Usage example:


curl -X 'POST' \
  'http://34.67.150.35/story_to_video' \
  -H 'Content-Type: application/json' \
  -d '{
        "story_images": [
            "https://storage.googleapis.com/public_stories/abc/007.jpg",
            "https://storage.googleapis.com/public_stories/abc/011.jpg",
            "https://storage.googleapis.com/public_stories/abc/018.jpg",
            "https://storage.googleapis.com/public_stories/abc/028.jpg"
        ],
        "callback_url": "https://webhook.site/f3fcb54c-24ce-47e6-9a65-663770829de1"
      }'

ANIMAX:

  • using chatgpt for narration
  • using elevenlabs for audio
  • using ffmpeg for video creation
  • using freesound for background music
  • using X for captions

Output Example:

A demo output video generated by this project can be found here:

How to run:

  • Install ffmpeg: https://ffmpeg.org/download.html (or, you can probably install it as a package: brew install ffmpeg, apt install ffmpeg, etc.)
  • Install Pip Environemnt: pipenv install && pipenv shell
  • Install Gemfile: sudo gem install bundler -v '2.4.21' && sudo bundle install
  • Set OpenAI API Key: export OPENAI_API_KEY=<KEY>
  • Set Elevenlabs API Key: export ELEVEN_API_KEY=<KEY>
  • In ./src/main.py (bottom): set the channel name, the desired topic, voice name, and the destination dir.
  • Run ./src/main.py

Missing from pip:

Known issues:

  • QuickTime Player on MacOS plays the audio incorrectly after a few seconds of playback. There is no problem with the video and it's audio, it's an issue with this specific player. The video can be uploaded without issues to YouTube and played with other players.

Contribution:

Feel free to fork, suggest ideas, report issues, and give general constructive feedback.

^(;,;)^

anime_video_generator's People

Contributors

roihala avatar eldare avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.