Sinatra::Praat
A Sinatra extension for running basic Praat commands.
This is not really intended for use outside of the vocal_tract_length project so it offers very little functionality but may be useful as a reference.
Usage
Currently, it adds a helper method extract_formant1
and a POST route
/extract_formant1
.
The helper method takes the same arguments as the Praat To Formant... command, but the route uses defaults for all the arguments except the file.
The POST /extract_formant1
route expects a WAV file as the data
param and returns its mean F1.
Installation
This assumes you have already installed Praat and it is
available as praat
in your $PATH.
Add this line to your application's Gemfile:
gem 'sinatra-praat'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sinatra-praat
In your Sinatra application, add the following:
require 'sinatra/praat'
class MyApp < Sinatra::Base
register Sinatra::Praat
end
Contributing
- Fork it ( https://github.com/mxhold/sinatra-praat/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request