Skip to content

Commit

Permalink
fix bug with comma's and update to 2.0a
Browse files Browse the repository at this point in the history
  • Loading branch information
dopefishh committed Jan 24, 2017
1 parent 7afce8f commit 3b2157e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Praatalign: an interactive Praat plug-in for performing phonetic forced alignment

###Version 2.0
###Version 2.0a

Praatalign is a plug-in for Praat that can be used to do forced phonetic
alignment on speech signals and in particular free speech. Praatalign combines
Expand All @@ -14,15 +14,15 @@ MAUS\[1,2\].
[Latest manual](https://github.com/dopefishh/praatalign/releases/download/v2.0/book_2.0.pdf)

Latest plugin:
[.tar.xz](https://github.com/dopefishh/praatalign/releases/download/v2.0/praatalign_2.0.tar.xz)
[.zip](https://github.com/dopefishh/praatalign/releases/download/v2.0/praatalign_2.0.zip)
[.tar.xz](https://github.com/dopefishh/praatalign/releases/download/v2.0/praatalign_2.0a.tar.xz)
[.zip](https://github.com/dopefishh/praatalign/releases/download/v2.0/praatalign_2.0a.zip)

[Older releases](https://github.com/dopefishh/praatalign/releases)

###How to cite

```tex
@misc{praatalign2.0,
@misc{praatalign2.0a,
author={Lubbers, Mart and Torreira, Francisco},
title={Praatalign: an interactive Praat plug-in for performing phonetic forced alignment},
howpublished={\url{https://github.com/dopefishh/praatalign}},
Expand Down
5 changes: 2 additions & 3 deletions align.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def _force(phonetizer, utterance, starttime, duration, wavefile,
"""
Force aligns the given utterance, all parameters are passed by kwarg
"""
print(utterance)
logging.info('Starting to align: {}'.format(code))
logging.info('Removing old files')
for suffix in ['dot', 'htk', 'nis', 'rec', 'slf', 'status']:
Expand Down Expand Up @@ -124,7 +123,7 @@ def _force(phonetizer, utterance, starttime, duration, wavefile,

# Open the output file
out = 'praat_temp_out'
ortwords = utterance.split(' ')
ortwords = utterance.replace(",", "").split(' ')
with open(out, code) as fileio:
logging.info('Output file selected')
with open('{}.rec'.format(basename), 'r') as f:
Expand All @@ -148,7 +147,7 @@ def _force(phonetizer, utterance, starttime, duration, wavefile,
fileio.write('{:f},{:f},{},c\n'.format(
word[0], start, canonical.pop(0)))
fileio.write('{:f},{:f},{},o\n'.format(
word[0], start, ortwords.pop(0)))
word[0], start, ortwords.pop(0).encode('utf-8')))
word = (end, '')
# Else add the current phone to the current word
else:
Expand Down
2 changes: 1 addition & 1 deletion mkrelease.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
VERSION=2.0
VERSION=2.0a
zip -9rv praatalign_$VERSION.zip *.{praat,py,md} {install,par,LICENCE}*
tar -cvf praatalign_$VERSION.tar *.{praat,py,md} {install,par,LICENCE}*
xz -ve praatalign_$VERSION.tar
2 changes: 1 addition & 1 deletion settings.praat
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ endif

# Spawn the option window for the user
beginPause: "Basic options"
comment: "Praatalign version 2.0"
comment: "Praatalign version 2.0a"
comment: "Name for the output tier(may already exist)"
sentence: "new", new$

Expand Down

0 comments on commit 3b2157e

Please sign in to comment.