• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN Run different audios sources

Is there a way to run different audio sources in the same instance?

Like when you are playing an audio with !yt and then use !say it overlays the two audio sources. Is there a way to overlay two !yt sources?

I mean via script, with media.yt or similar.

Thanks.
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
This is only possible if a sound is marked as "SFX" (for example in the webinterface tag editor). Then this sound plays over normal songs.
 
Last edited:
Via script see here.
This would need the already downloaded/cached files in which I would need the UUID of the file. I was planning on making it download on demand, with one kind of memebot, where user defines the type(URL[YT/mp3] or TTS), the name of the meme and the content(would be the URL itself or the text to read with the TTS).

It is already working with media.yt, but if anything else is playing it will stop to play the couple of seconds audio. It would be better with the overlay...

This is only possible if a sound is marked as "SFX" (for example in the webinterface tag editor). Then this sound plays over normal songs.
Is there a way to change the tag to SFX before playing it via yt?
 
Got it. Just made an wrapper to search for the URL of the video between the tracks, if not found call ytdl to download it. Then play from the found id.

Thanks for the assistance.

Btw, is there a way to make the script wait until ytdl is finished other than a simple "while(media.search('asd') == 0) { } "? Since it is calling ytdl and jumping onto the next operations. It would be good to add a sleep handler to avoid excessive cpu usage. Thanks.
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
Yeah a callback for downloads would be really useful, I don't think that there is a better solution right now. @flyth
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Btw, is there a way to make the script wait until ytdl is finished other than a simple "while(media.search('asd') == 0) { } "? Since it is calling ytdl and jumping onto the next operations. It would be good to add a sleep handler to avoid excessive cpu usage. Thanks.
event.on('ytdl.error', function(ev) {})
and
event.on('ytdl.success', function(ev) {})
can help there.
 
Top