Shazam for Movies, using Speech to Text and Full-Text search on a DB made of subtitle files
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
public
solr_conf
test
vendor/assets
.gitignore
.ruby-gemset
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

SubZam

SubZam

This is the source for the Codebits 2014 project #517.

The costs of hosting a Solr server (using websolr for example), the size of the DB (~60Mb) and the lack of time to look for alternatives prevented us from having SubZam up and running on the web. If you can help us out with this, do get in touch!

However, we wanted you to try out SubZam, and that's the purpose of this repo. The instructions below will help you run your own copy.

Technology

  • Ruby 2.1
  • Ruby on Rails 4.1
  • Apache Solr for Full-Text Search (through sunspot)
  • OpenSubtitles.org for subtitles
  • Google's Web Speech API
  • Sapo's Ink
  • Some other gems described in the Gemfile

Setup

Install Ruby ~> 2.0.0 (if necessary). RVM is optional, but highly recommended.

$ rvm install ruby-2.1.0

Clone the repo:

$ git clone https://github.com/pgaspar/subzam.git
$ cd subzam

Install bundler (if necessary)

$ gem install bundler

Install the gems:

$ bundle install

Database

We've uploaded the same dataset we used on-stage. You can use this DB as your own.

$ cp db/development.sqlite3.backup db/development.sqlite3

Full-Text Search engine

Now that we have a decent Database, we need to index it with Solr. Let's start by starting the Solr server:

$ bundle exec rake sunspot:solr:run
# IMPORTANT: Wait until the solr directory has been created on your project root, then stop with Ctrl+C

We will now copy a solr configuration file so indexing works as we want and re-start the server:

$ cp -f solr_conf/schema.xml solr/conf/schema.xml
$ bundle exec rake sunspot:solr:run

Next, lets reindex:

$ bundle exec rake sunspot:solr:reindex

Running the Server

Once that's done, leave the Solr server running and start the Rails server (finally!):

$ rails s

Go to localhost:3000 and start searching 😄.

Contributing

  1. Fork it ( http://github.com/pgaspar/subzam/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request