-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extracting out the phoneme / phone from audio #8
Comments
Do you know what is being said? If not, you'll need to use a speech
recognition system.
If you know what is being said (e.g. you have song lyrics or a speech
transcript), then you can use a forced aligner.
I am familiar with two forced aligners: MgGill prosody lab aligner
http://prosodylab.cs.mcgill.ca/tools/aligner/
and SPPAS
http://www.sppas.org/index.html
I have some code in praatio for post-processing the output of sppas.
These systems are based on machine learning. The more noise there is in
the recordings, the more inaccuracies there will be in the output. And
inaccuracies propogate. If you have clean recordings that are individual
utterances/sentences, you'll probably get good results.
…On Thu, Dec 27, 2018, 18:51 jiunn95 ***@***.*** wrote:
Hi Tim,
You've explained how to create a blank textgrid from audio file in your
tutorial. I was wondering how do you extract out the (phoneme / phone) and
words from audio and insert into textgrid.
Thank you!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AChv0OIFWrdKeb-ijNOUaw3b2SEFWrnBks5u9Yc6gaJpZM4ZjZAW>
.
|
So after I extracted out the phoneme I perform a forced aligners with the text I had. But how do we add into the tiersdict along with the entryList like the example: |
Specifically how do you add a new tier for example 'phone' into the textgrid along with their data and so on from the audio.. For now I only know how to create an tier with nothing in it The entryList stores nothing for now and I was wondering how / where to get the data to store in the entryList. Sorry for the confusion caused. |
tgio.IntervalTier('phone', [ ] , 0, pairedWav=join(inputPath, fn))
That empty list [ ] should be where you put the data. The format is
("label", start_time, end_time).
You'll get the label, start time and end time from the forced aligner.
What does your input to praatio look like (the output of the forced
aligner)?
…On Thu, Dec 27, 2018, 20:08 jiunn95 ***@***.*** wrote:
Specifically how do you add a new tier for example 'phone' into the
textgrid along with their data and so on from the audio..
Example : ['phone', 'word', 'pitch', ...etc ]
For now I only know how to create an tier with nothing in it
Example :
phonetier = tgio.IntervalTier('phone', [ ] , 0, pairedWav=join(inputPath,
fn))
The entryList stores nothing for now and I was wondering how / where to
get the data to store in the entryList.
Sorry for the confusion caused.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AChv0IuOaJdt14fQVK5NMUMmWsdpaLTLks5u9ZkvgaJpZM4ZjZAW>
.
|
As in [("label1", start_time_1, end_time_1), ("label2", start_time2,
end_time2), ...]
…On Thu, Dec 27, 2018, 22:03 Tim Mahrt ***@***.*** wrote:
tgio.IntervalTier('phone', [ ] , 0, pairedWav=join(inputPath, fn))
That empty list [ ] should be where you put the data. The format is
("label", start_time, end_time).
You'll get the label, start time and end time from the forced aligner.
What does your input to praatio look like (the output of the forced
aligner)?
On Thu, Dec 27, 2018, 20:08 jiunn95 ***@***.*** wrote:
> Specifically how do you add a new tier for example 'phone' into the
> textgrid along with their data and so on from the audio..
> Example : ['phone', 'word', 'pitch', ...etc ]
>
> For now I only know how to create an tier with nothing in it
> Example :
> phonetier = tgio.IntervalTier('phone', [ ] , 0, pairedWav=join(inputPath,
> fn))
>
> The entryList stores nothing for now and I was wondering how / where to
> get the data to store in the entryList.
>
> Sorry for the confusion caused.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#8 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AChv0IuOaJdt14fQVK5NMUMmWsdpaLTLks5u9ZkvgaJpZM4ZjZAW>
> .
>
|
Sorry, I'm trying out using sppas_util.py to do it instead. However I'm not sure if I'm doing it correctly. My code: import os inputgrid = join('C:/Users/Desktop/work27dec/praatIO-master/praatIO-master/examples/files','generated_textgrids','mary.TextGrid') output = join('C:/Users/Desktop/work27dec/praatIO-master/praatIO-master/examples/files','generated_textgrids2') sppasPostProcess(inputgrid,output) Error: |
To run sppas_util.sppasPostProcess() please see this example file:
https://github.com/timmahrt/praatIO/blob/master/examples/sppas_post_process.py
The arguments to sppasPostProcess() are folder paths, not files.
Also, instead of:
inputgrid = join('C:/Users/Desktop/work27dec/praatIO-master/
praatIO-master/examples/files','generated_textgrids','mary.TextGrid')
use (note the 'r' in front of the string):
input = r'C:/Users/Desktop/work27dec/praatIO-master/
praatIO-master/examples/files/generated_textgrids/mary.TextGrid'
…On Thu, Dec 27, 2018, 23:06 jiunn95 ***@***.*** wrote:
Sorry, I'm trying out using sppas_util.py to do it instead. However I'm
not sure if I'm doing it correctly.
My code:
import os
from os.path import join
from praatio import tgio
from praatio.applied_scripts.sppas_util import sppasPostProcess
inputgrid =
join('C:/Users/Desktop/work27dec/praatIO-master/praatIO-master/examples/files','generated_textgrids','mary.TextGrid')
output =
join('C:/Users/Desktop/work27dec/praatIO-master/praatIO-master/examples/files','generated_textgrids2')
sppasPostProcess(inputgrid,output)
Error:
File "C:\Users\Desktop\work27dec\praatIO-master\praatIO-master\sppas.py",
line 10, in
sppasPostProcess(inputgrid,output)
File
"C:\Users\Desktop\work27dec\praatIO-master\praatIO-master\praatio\applied_scripts\sppas_util.py",
line 95, in sppasPostProcess
tgFNList = utils.findFiles(tgPath, filterExt=".TextGrid")
File
"C:\Users\Desktop\work27dec\praatIO-master\praatIO-master\praatio\utilities\utils.py",
line 247, in findFiles
fnList = os.listdir(path)
NotADirectoryError: [WinError 267] The directory name is invalid:
'C:/Users/Desktop/work27dec/praatIO-master/praatIO-master/examples/files\generated_textgrids\mary.TextGrid'
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AChv0G2O62dbwP4Iwq00avpYe-ddNglyks5u9cLwgaJpZM4ZjZAW>
.
|
Hi Tim,
You've explained how to create a blank textgrid from audio file in your tutorial. I was wondering how do you extract out the (phoneme / phone) and words from audio and insert into textgrid.
Thank you!
The text was updated successfully, but these errors were encountered: