Coder Social home page Coder Social logo

cineaste's Introduction

Cineaste

Cineaste is a gem that takes a string and turns it into a video output. The gem searches a given S3 bucket for videos matching each word, then concatenates them together. If the videos are not found, the gem creates videos using a template file video and text-to-speech.

Cineaste Server is a small Sinatra application that uses the Gem.

Usage

@dictionary = "standard" 
@input = "welcome to crumbles" #this will be sanitized
@voice = "male" # male or female (determines which TTS service to use)

phrase = Cineaste::Phrase.new(@dictionary,@input,@voice)
phrase.get_video #will find or create a video on AWS and return the AWS URL as a string

File Structure

Currently the gem is hardcoded to use the 'crumbles-2015' bucket.

Videos are classified as "defined" or "generated." Generated videos are videos that have been created using a template video and MP3.

To add a new dictionary, simply create the following folder in S3: $S3_BUCKET/rresources/:video/dictionaries/:dictionary/defined/ and add your videos there.

The following files will be generated during use:

$S3_BUCKET/resources/:video/dictionaries/:dictionary/generated/undefined_word.mp4
$S3_BUCKET/resources/:video/dictionaries/:dictionary/phrases/base64_hash_of_phrase.mp4
$S3_BUCKET/esources/:audio/voice/:voice/tts_of_a_word.mp3

Files are stored locally in the tmp/ folder for use with FFMPEG. These files are not automatically deleted at this time.

A simple but functional server can be found in cineaste-server/. See the README.md there for more information.

Requirements

  • FFMPEG
  • AWS key and secret set for aws-cli (or in s3_client.rb)

Next Steps:

  • Tests
  • Extract S3 creds, file tree structure, and template video into config file
  • Ensure tmp/ folder is periodically emptied

Longer Term:

  • Account for multi-word phrases (eg. "ice cream")
  • Include ability to censor certain words from a list
  • Check for homonyms and mispellings as well as exact matches
  • Replace special chars used for letters ($ -> s)
  • Compress common mispellings (eg. "loooooolll" -> "lol"). Check analytics for full list
  • Ignore gibberish as best as possible (can we drop something like "(&*UHEJF" ?)

The icebox/ folder has a few word lists to help with the above.

cineaste's People

Contributors

alecturnbull avatar andrew-szymanski avatar

Watchers

 avatar James Cloos avatar  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.