Recent

Author Topic: Sync Audio with Text project  (Read 726 times)

alaa123456789

  • Full Member
  • ***
  • Posts: 233
  • Try your Best to learn & help others
    • youtube:
Sync Audio with Text project
« on: May 06, 2022, 03:06:18 pm »

hi all ,
i want to make program to sync the text with the audio similar to this concept in below video

https://youtu.be/doEAyBiriMA

what is the principle to code it, waiting your kind support

thanks

af0815

  • Hero Member
  • *****
  • Posts: 1037
Re: Sync Audio with Text project
« Reply #1 on: May 06, 2022, 03:33:44 pm »
what is the principle to code it, waiting your kind support

In short, to understand how the sample in the video works.

In long, you have an audio track and must synchonize the rest to the audio. It is the same principle how karaoke works. Not more not less.
regards
Andreas

alaa123456789

  • Full Member
  • ***
  • Posts: 233
  • Try your Best to learn & help others
    • youtube:
Re: Sync Audio with Text project
« Reply #2 on: May 06, 2022, 03:44:04 pm »
In short, to understand how the sample in the video works.

In long, you have an audio track and must synchonize the rest to the audio. It is the same principle how karaoke works. Not more not less.
yes but in code how to do this (lets say we have memo have text inside and we have wav/mp3 sound

thanks

af0815

  • Hero Member
  • *****
  • Posts: 1037
Re: Sync Audio with Text project
« Reply #3 on: May 06, 2022, 04:01:15 pm »
Play the sound and control the time, make a table where is written what kind of thext at what time must be shown in the memo.


Ultrastar make the same and is open Source https://usdx.eu/ and https://usdx.eu/development/
« Last Edit: May 06, 2022, 04:03:05 pm by af0815 »
regards
Andreas

alaa123456789

  • Full Member
  • ***
  • Posts: 233
  • Try your Best to learn & help others
    • youtube:
Re: Sync Audio with Text project
« Reply #4 on: May 06, 2022, 04:25:27 pm »
Ultrastar make the same and is open Source https://usdx.eu/ and https://usdx.eu/development/

thanks for sharing this opensource , but this need maybe a year to study it and knows how it works , if there is simple Code snippets which can be more easier for beginner user


Thaddy

  • Hero Member
  • *****
  • Posts: 12208
Re: Sync Audio with Text project
« Reply #5 on: May 07, 2022, 01:45:47 pm »
You are doing it wrong. You should use the BMP from the audio file and sync that with the text, not the other way around. BMP detectors are readily available in Pascal. I wrote one for KOL in 2004. See if I can find it. But there are more.
That does exactly what you want: sync text to music, I used it to sync  midi or audio with lyrics, kind of autocue for music, mind that the BMP detector should be run in a separate thread, because of possible tempo changes.
I think my code is still at musicdsp.com. Also note that code was quite complex.

Anyway, if it is not at musicdsp I will have a look if I can find it at home. I do not remember if I wrote it in C or Pascal, but if it was C I can help you translate it.
« Last Edit: May 07, 2022, 01:59:12 pm by Thaddy »
Manuals, manuals, manuals first.
You have incompetence and sheer incompetence.

wp

  • Hero Member
  • *****
  • Posts: 10296
Re: Sync Audio with Text project
« Reply #6 on: May 07, 2022, 03:09:23 pm »
You are doing it wrong. You should use the BMP from the audio file and sync that with the text, not the other way around. BMP detectors are readily available in Pascal. I wrote one for KOL in 2004. See if I can find it. But there are more.
That does exactly what you want: sync text to music, I used it to sync  midi or audio with lyrics, kind of autocue for music, mind that the BMP detector should be run in a separate thread, because of possible tempo changes.
I think my code is still at musicdsp.com. Also note that code was quite complex.

Anyway, if it is not at musicdsp I will have a look if I can find it at home. I do not remember if I wrote it in C or Pascal, but if it was C I can help you translate it.
I hate abbreviations. What does a Windows bitmap file (BMP) have to do with an audio file? Or do you mean Beats Per Minute? But that would be BPM...

Thaddy

  • Hero Member
  • *****
  • Posts: 12208
Re: Sync Audio with Text project
« Reply #7 on: May 07, 2022, 04:56:47 pm »
Yes, right, typo it is indeed BPM.
Manuals, manuals, manuals first.
You have incompetence and sheer incompetence.

alaa123456789

  • Full Member
  • ***
  • Posts: 233
  • Try your Best to learn & help others
    • youtube:
Re: Sync Audio with Text project
« Reply #8 on: May 07, 2022, 07:06:01 pm »
hi Thaddy,Wp i also thought it is photo , i appreciate your replies ,if possible to have some code i will be grateful
thanks

 

TinyPortal © 2005-2018