Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Interface for running Praat scripts through Python

Project Description
python-praat-scripts
====================

[![Build Status](https://travis-ci.org/mmcauliffe/python-praat-scripts.svg?branch=master)](https://travis-ci.org/mmcauliffe/python-praat-scripts)
[![Coverage Status](https://coveralls.io/repos/mmcauliffe/python-praat-scripts/badge.svg)](https://coveralls.io/r/mmcauliffe/python-praat-scripts)

Interface for running Praat scripts through Python

Installation
============

You can install python-praat-scripts through pip via:

```
pip install python-praat-scripts
```

Or through downloading this repository and running:

```
python setup.py install
```

Once installed, the `praatinterface` package will be importable.

Use
===

This package allows users to specify Praat scripts in Python code (as strings),
which can be called through a PraatLoader object, which can parse the output
to something more useable than plain text. There are several predefined
scripts included in the loader.

For basic usage, instantiate a PraatLoader object as below:

```
from praatinterface import PraatLoader

pl = PraatLoader(praatpath = '/path/to/praat')

text = pl.run_script('formants.praat', '/path/to/wav/file', 5, 5500)

formants = pl.read_praat_out(text)
```

The result of running the formants script gives the first two formants estimated by
Praat in the wav file specified, as a list of dictionaries with keys for
Time, F1, B1, F2, and B2.

The full list of scripts prewritten in this module are in `praatinterface.scripts.py`.

User-specified scripts can be given via keyword arguments to the PraatLoader class.

```
from praatinterface import PraatLoader

basic_script = 'echo hello'

pl = PraatLoader(praatpath = '/path/to/praat', basic = basic_script)

text = pl.run_script('basic')
```

For the above code, text should equal 'hello'.


Scripts that need to return some value should use the Praat function `echo`
which will be sent to the Python process.
Release History

Release History

This version
History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.14

History Node

0.1.13

History Node

0.1.12

History Node

0.1.11

History Node

0.1.10

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
python_praat_scripts-0.2.2-py2.py3-none-any.whl (10.2 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Sep 16, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting