Discussion:
Display F0 contours from other programs
Antje Schweitzer
2011-02-18 09:22:36 UTC
Permalink
Dear list,

does anyone know if it is possible to import F0 data that were generated
by other programs (ESPS, Edinburgh speech tools, or any ascii
representation), and view them as contours together with the sound file?
It does not have to be as an overlay to the signal in the Editor, a
separate tier with the contour would also be fine.

Any help would be greatly appreciated!

Thanks!!
Antje
--
Antje Schweitzer
IMS Uni Stuttgart
0711-685 81376
http://www.ims.uni-stuttgart.de/~schweitz


------------------------------------

To Post a message, send it to: praat-users-***@public.gmane.org

To Unsubscribe, send a blank message to: praat-users-unsubscribe-***@public.gmane.org

To consult archives : http://egroups.com/list/praat-users/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://uk.groups.yahoo.com/group/praat-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://uk.groups.yahoo.com/group/praat-users/join
(Yahoo! ID required)

<*> To change settings via email:
praat-users-digest-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org
praat-users-fullfeatured-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
praat-users-unsubscribe-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://uk.docs.yahoo.com/info/terms.html
psibre
2011-02-21 09:28:37 UTC
Permalink
This post might be inappropriate. Click to display it.
Antje Schweitzer
2011-02-21 11:04:31 UTC
Permalink
Dear Ingmar (and Christoph),

Both variants work exactly as described, thanks very much!! The latter
one is actually a solution along the same lines as Christoph's suggestion.

You are right, PitchTier objects just specify times and F0 values (and
duration info). I had looked at the exported text versions of Pitch
objects, and these require more than just the Pitch, which scared me off
:-) .

It's nice and maybe interesting to others reading this list that, as you
suggest, a condensed version of an exported PitchTier object is sufficient:

This is how praat usually saves the PitchTier object:

File type = "ooTextFile"
Object class = "PitchTier"

xmin = 0
xmax = 8.19
points: size = 340
points [1]:
time = 1.9899999999999995
value = 127.26927870263998
points [2]:
time = 1.9999999999999996
value = 125.30177032125353
[...]

This is what Ingmar's commands give, and it is sufficient (difference in
timestamps and F0 values due to different F0 algorithms, difference in
duration due to not knowing the length of the corresponding sound file
when converting from external file):

"ooTextFile"
"PitchTier"
0.000000 7.203750 348
1.97375 172
1.98375 154
[...]


By the way, an alternative to stripping the header off EST .pm files is
to use the script that www.festvox.org provides for converting .pm files
to ESPS label files (bin/make_pm_pmlab) and then read in these instead
of the raw text.

Thanks again!
Best,
Antje
Post by psibre
Dear Antje,
depending on what kind of external data you have, and how you want to
display it, this can be very simple to achieve if you're willing to do
some juggling.
If, for example, you have pitchmarks in an EST .pm file, just do
Read Matrix from raw text file... my.pm
Transpose
To PointProcess
Or maybe you have a headerless text file with one F0 time-value pair (in
s, Hz) per linie. You could convert it to a PitchTier file along the
awk 'END{printf("\"ooTextFile\"\n\"PitchTier\"\n%f %f %d\n", 0, $1,
NR)}' < my.f0 > my.PitchTier
cat my.f0 >> my.PitchTier
(probably you could do better if you know the true time domain).
Best wishes,
-Ingmar
--
Ingmar Steiner
Postdoctoral Researcher
LORIA Speech Group, Nancy, France
National Institute for Research in
Computer Science and Control (INRIA)
<mailto:praat-users%40yahoogroups.co.uk>, Antje Schweitzer
Post by Antje Schweitzer
Dear list,
does anyone know if it is possible to import F0 data that were generated
by other programs (ESPS, Edinburgh speech tools, or any ascii
representation), and view them as contours together with the sound file?
It does not have to be as an overlay to the signal in the Editor, a
separate tier with the contour would also be fine.
Any help would be greatly appreciated!
Thanks!!
Antje
--
Antje Schweitzer
IMS Uni Stuttgart
0711-685 81376
http://www.ims.uni-stuttgart.de/~schweitz
--
Antje Schweitzer
IMS Uni Stuttgart
0711-685 81376
http://www.ims.uni-stuttgart.de/~schweitz


------------------------------------

To Post a message, send it to: praat-users-***@public.gmane.org

To Unsubscribe, send a blank message to: praat-users-unsubscribe-***@public.gmane.org

To consult archives : http://egroups.com/list/praat-users/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://uk.groups.yahoo.com/group/praat-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://uk.groups.yahoo.com/group/praat-users/join
(Yahoo! ID required)

<*> To change settings via email:
praat-users-digest-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org
praat-users-fullfeatured-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
praat-users-unsubscribe-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://uk.docs.yahoo.com/info/terms.html
Jonas Lindh
2011-02-24 17:26:18 UTC
Permalink
Hi everyone.
I opened a table in Praat using Read Table from tab-separated file (had an exported tsv-file).
It opens ok and I can work with. I then save is as a Table file using Save as Table file...
When I try to open the file using Read Table from table file... I get an error (attaching error screen dump)
What has happened?
Best regards
Jonas



[Non-text portions of this message have been removed]



------------------------------------

To Post a message, send it to: praat-users-***@public.gmane.org

To Unsubscribe, send a blank message to: praat-users-unsubscribe-***@public.gmane.org

To consult archives : http://egroups.com/list/praat-users/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://uk.groups.yahoo.com/group/praat-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://uk.groups.yahoo.com/group/praat-users/join
(Yahoo! ID required)

<*> To change settings via email:
praat-users-digest-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org
praat-users-fullfeatured-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
praat-users-unsubscribe-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://uk.docs.yahoo.com/info/terms.html
Jonas Lindh
2011-02-24 17:36:10 UTC
Permalink
I found that the error had to do with weird names on column labels (two had "å,ä" or similar). Removing "" seems to have helped.
Jonas
Date: Thu, 24 Feb 2011 17:26:18 +0000
Subject: [praat-users] Saved Table file get error opening same...
Hi everyone.
I opened a table in Praat using Read Table from tab-separated file (had an exported tsv-file).
It opens ok and I can work with. I then save is as a Table file using Save as Table file...
When I try to open the file using Read Table from table file... I get an error (attaching error screen dump)
What has happened?
Best regards
Jonas
[Non-text portions of this message have been removed]
------------------------------------
To consult archives : http://egroups.com/list/praat-users/
Yahoo! Groups Links
[Non-text portions of this message have been removed]



------------------------------------

To Post a message, send it to: praat-users-***@public.gmane.org

To Unsubscribe, send a blank message to: praat-users-unsubscribe-B11MqFFcr06IwRZHo2/***@public.gmane.orgm

To consult archives : http://egroups.com/list/praat-users/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://uk.groups.yahoo.com/group/praat-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://uk.groups.yahoo.com/group/praat-users/join
(Yahoo! ID required)

<*> To change settings via email:
praat-users-digest-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org
praat-users-fullfeatured-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
praat-users-unsubscribe-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://uk.docs.yahoo.com/info/terms.html
Paul Boersma
2011-02-25 09:47:54 UTC
Permalink
Post by Jonas Lindh
Post by Jonas Lindh
It opens ok and I can work with. I then save is as a Table file using Save as Table file...
When I try to open the file using Read Table from table file... I get an error (attaching error screen dump)
you can continue to open it with "Read Table from tab-separated file...", because "Read Table from table file..." regards all whitespace (spaces and tabs) as separators, whereas "Read Table from tab-separated file..." regards only tabs as separators. So if your column headers or your cells contain space characters, "Read Table from table file..." cannot read it well, but "Read Table from tab-separated file..." can.

I think I have to rename "Save as Table file..." to "Save as tab-separated file...", because that would give less chance of such confusions.

Please note that "Save as Table file..." tries to produce something that can be read by spreadsheet programs or statistics programs. If your goal is just to read the file into Praat again, you can use "Save as binary file..." or "Save as text file...", which produces files that are fully guaranteed to be readable in Praat. However, the combination of "Save as Table file..." and "Read Table from tab-separated file..." works correctly whenever your column headers or cells don't contain a tab character; using "å,ä" should pose no problem.
__________________________________
Paul Boersma
Phonetic Sciences, University of Amsterdam
Spuistraat 210, room 303
1012VT Amsterdam, The Netherlands
http://www.fon.hum.uva.nl/paul/



------------------------------------

To Post a message, send it to: praat-users-***@public.gmane.org

To Unsubscribe, send a blank message to: praat-users-unsubscribe-B11MqFFcr06IwRZHo2/***@public.gmane.orgm

To consult archives : http://egroups.com/list/praat-users/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://uk.groups.yahoo.com/group/praat-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://uk.groups.yahoo.com/group/praat-users/join
(Yahoo! ID required)

<*> To change settings via email:
praat-users-digest-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org
praat-users-fullfeatured-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
praat-users-unsubscribe-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://uk.docs.yahoo.com/info/terms.html
Jonas Lindh
2011-02-25 21:21:08 UTC
Permalink
Thanks Paul.
Date: Fri, 25 Feb 2011 10:47:54 +0100
Subject: Re: [praat-users] Saved Table file get error opening same...
Post by Jonas Lindh
Post by Jonas Lindh
It opens ok and I can work with. I then save is as a Table file using Save as Table file...
When I try to open the file using Read Table from table file... I get an error (attaching error screen dump)
you can continue to open it with "Read Table from tab-separated file...", because "Read Table from table file..." regards all whitespace (spaces and tabs) as separators, whereas "Read Table from tab-separated file..." regards only tabs as separators. So if your column headers or your cells contain space characters, "Read Table from table file..." cannot read it well, but "Read Table from tab-separated file..." can.
1. Yes. That also solves my issue about a standardised format to keep all my different data files.
I think I have to rename "Save as Table file..." to "Save as tab-separated file...", because that would give less chance of such confusions.
That might help...
Please note that "Save as Table file..." tries to produce something that can be read by spreadsheet programs or statistics programs. If your goal is just to read the file into Praat again, you can use "Save as binary file..." or "Save as text file...", which produces files that are fully guaranteed to be readable in Praat. However, the combination of "Save as Table file..." and "Read Table from tab-separated file..." works correctly whenever your column headers or cells don't contain a tab character; using "å,ä" should pose no problem.
2. Yes, I think I will keep them as the original and stay with tab separated txts. However, the error I got was not due to spaces, but reading the originally tab separated file into Praat added " " around the column name å,ä,ö (not my idea to name a column or category in such a way I may say ;-) which I suppose has to do with some string handling when importing?

Best regards
J
__________________________________
Paul Boersma
Phonetic Sciences, University of Amsterdam
Spuistraat 210, room 303
1012VT Amsterdam, The Netherlands
http://www.fon.hum.uva.nl/paul/
------------------------------------
To consult archives : http://egroups.com/list/praat-users/
Yahoo! Groups Links
[Non-text portions of this message have been removed]



------------------------------------

To Post a message, send it to: praat-users-***@public.gmane.org

To Unsubscribe, send a blank message to: praat-users-unsubscribe-B11MqFFcr06IwRZHo2/***@public.gmane.orgm

To consult archives : http://egroups.com/list/praat-users/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://uk.groups.yahoo.com/group/praat-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://uk.groups.yahoo.com/group/praat-users/join
(Yahoo! ID required)

<*> To change settings via email:
praat-users-digest-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org
praat-users-fullfeatured-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
praat-users-unsubscribe-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://uk.docs.yahoo.com/info/terms.html

Christoph Völker
2011-02-21 09:06:10 UTC
Permalink
Hello Antje,
Post by Antje Schweitzer
does anyone know if it is possible to import F0 data that were generated
by other programs (ESPS, Edinburgh speech tools, or any ascii
representation), and view them as contours together with the sound file?
It does not have to be as an overlay to the signal in the Editor, a
separate tier with the contour would also be fine.
that is possible I suppose. You will have to put the ascii files of ESPS
etc. in a format that Praat can read/import.

I would load a sound file to praat, calculate the Pitch, press "Down to
PitchTier". Then you export the PitchTier to your disk and study the
format of the file - like the header etc.:

File type = "ooTextFile"
Object class = "PitchTier"

Then you will get an idea how the ascii files from ESPS etc. have to
look like. Finally you import these to Praat, and then you can work with
them like it was calculated by Praat itself.

Which brings me to another idea: You can write a Praat Script that calls
ESPS out of Praat and returns the PitchTier-Object. Then you assign this
script to a new extra button in Praat that you can click if you need
external calculation. Comfort Deluxe.

Cheers,
Christoph
http://www.ipds.uni-kiel.de/cvo

PS: I would be interested in this.


------------------------------------

To Post a message, send it to: praat-users-***@public.gmane.org

To Unsubscribe, send a blank message to: praat-users-unsubscribe-***@public.gmane.org

To consult archives : http://egroups.com/list/praat-users/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://uk.groups.yahoo.com/group/praat-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://uk.groups.yahoo.com/group/praat-users/join
(Yahoo! ID required)

<*> To change settings via email:
praat-users-digest-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org
praat-users-fullfeatured-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
praat-users-unsubscribe-hHKSG33Tihj7tPOJXBBAsVpr/1R2p/***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://uk.docs.yahoo.com/info/terms.html
Loading...