Skip to content
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

How to detect the silence and get separative line like below. #278

Open
neuromaancer opened this issue Aug 24, 2021 · 1 comment
Open

How to detect the silence and get separative line like below. #278

neuromaancer opened this issue Aug 24, 2021 · 1 comment

Comments

@neuromaancer
Copy link

Hi,

I am trying to the forced alignment between a transcript and a video, however, among the utterances, there are lots of silences. How do I figure the tool to detect those silence and not get a consecutive result. In an example:

I want from:

That thereby beauty's rose might never die, => [00:00:05.880, 00:00:09.240]
But as the riper should by time decease, => [00:00:09.240, 00:00:11.920]
His tender heir might bear his memory: => [00:00:11.920, 00:00:15.280]
But thou contracted to thine own bright eyes, => [00:00:15.280, 00:00:18.800]
Feed'st thy light's flame with self-substantial fuel, => [00:00:18.800, 00:00:22.760]
Making a famine where abundance lies, => [00:00:22.760, 00:00:25.680]

to

That thereby beauty's rose might never die, => [00:00:05.880, 00:00:09.240]
But as the riper should by time decease, => [00:00:10.240, 00:00:11.920]
His tender heir might bear his memory: => [00:00:11.920, 00:00:15.280]
But thou contracted to thine own bright eyes, => [00:00:16.280, 00:00:18.800]
Feed'st thy light's flame with self-substantial fuel, => [00:00:19.800, 00:00:22.760]
Making a famine where abundance lies, => [00:00:22.760, 00:00:25.680]

Thank you in advance.

@SaadBazaz
Copy link

You could use another library like PyDub. PyDub has a function called detect silence or something similar. Once you have determined what timestamps of the audio are silent, you can use some Python-coder-magic to fix your alignments ;)

Reference: https://stackoverflow.com/questions/45526996/split-audio-files-using-silence-detection/46001755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants