Skip to content

Language Archiving Technology

Sections
Personal tools
You are here: Home » Tools » Elan » ELAN Forum » open praat in elan: LongSound file

open praat in elan: LongSound file

Up one level

open praat in elan: LongSound file

Posted by ast80 at 2010-01-13 15:46  

Hi, maybe someone can help me: I would like to open a selection of a wav.file in elan with praat. In principal that works well, but praat always opens a file which is called a "LongSound"-file and which doesn't allow for the analyses I'd need to do. However, if I open exactly the same wav.file in the praat programme itself (that means without the elan association)I get it as a "normal" sound file with all the praat funtions. It would be great if someone has an idea, how I can open the wav as "normal" sound file in elan. Thank you!

Re: open praat in elan: LongSound file

Posted by hasloe at 2010-01-15 23:18  

The first time this function is used in ELAN a Praat script named "openpraat-v2.praat" is created in a special ELAN data directory: <user_home>\.elan_data (Windows and Linux), <user_home>/Library/Preferences/ELAN (Mac).
You could change the behavior of the "open selection in Praat" function by editing this praat script. E.g. in the script there is a line:

Open long sound file... 'filepath$'

you could change this to:

Read from file... 'filepath$'

and adapt the rest of the file to something like this:

s = start / 1000
en = end / 1000
Edit
editor Sound 'filename$'
Select... 's' 'en'
Zoom to selection
endeditor

depending on what you want/need.
I'm not a Praat scripting specialist, so please consult the Praat manual for all the options.

-Han

Re: Re: open praat in elan: LongSound file

Posted by ast80 at 2010-01-19 11:48  

Thank you very much for you answer! I'll try...

Re: open praat in elan: LongSound file

Posted by ast80 at 2010-01-21 10:05  

I tried...but I couldn't find the open praat script for editing. In the elan data folder there is only a file called "praat.pfs". Do you know how I can get the openpraat script when it is not automatically generated? Thanks!!

Re: Re: open praat in elan: LongSound file

Posted by hasloe at 2010-01-27 09:30  

Is this on Windows? It is possible that the script file is in another directory when there are whitespaces in the absolute path to the ELAN data directory. In that case the Praat script file should be in the systems "temp" directory. Most likely something like "C:\tmp" or "C:\temp".
I can send you the Praat script, but it is of no use if ELAN cannot find it in the location it expects.

-Han

Re: Re: Re: open praat in elan: LongSound file

Posted by jan at 2010-03-02 13:01  

Dear Han,<br>I'm working with video and sound-files which have an offset one to another. When I use "open selection in Praat", the program opens fine, but it forgets to add the offset and the selection that I see in Praat is exactly that amount of time too early that I have added in the offset during the synchronisation of video and audio. When I add the offset to the selection in Praat I end up at the selection I wanted to have originally. As this is tiring to do with many selections I had a search on the forum here. I thought of changing the "openpraat-v2" script, to add the offset in the line of the selection: Select... 'starttime' 'endtime'. But similar to the User who had initiated this topic, I cannot find the script. Neither in .elan_data nore in C:\Windows\Temp nore elsewhere (I have no C:\tmp or C:\temp; even the search option for "openpraat" doesn't find anything.). My ELAN is in C:\Program Files\ELAN 3.7.2\ so the path contains whitespaces. I copied the ELAN folder to C:\ and renamed the folder itself so it doesn't contain any whitespace. Running ELAN from there and choosing a selection still does not create a openpraat-script.<br>I would be very greatful if you could point me to a solution to one or both of the problems described: 1) missing offset 2) help me find the "openpraat" script for a workaround.<br>Best wishes,<br>Jan<br>

Re: Re: Re: Re: open praat in elan: LongSound file

Posted by jan at 2010-03-02 13:56  

Hello again,<br>I found the openpraat.praat script in the following location: C:\Document and Settings\(username)\Local Settings\Temp . This is written in the Environment Variables ("TMP" and "TEMP"). The way I found it is: riht click on "My Computer" in the start menue; then "properties"; select the tab "Advanced"; then "Environment Variables".<br>It would be nice if the offset would be considered from the start though.<br>Kind regards,<br>Jan<br>

 

Powered by Plone

This site conforms to the following standards: