0.0
No commit activity in last 3 years
No release in over 3 years
Sinatra extension for basic Praat operations.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

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

  1. Fork it ( https://github.com/mxhold/sinatra-praat/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 a new Pull Request