Giter Site home page Giter Site logo

Comments (4)

p0thi avatar p0thi commented on July 20, 2024

I just want to give an example why this can be usefull:
I am storing small audio files in a mongoDB database. It takes some time to get them back out of the database.
Then i store them to the drive to pass them to lavaplayer so it can read them back in.
For an audio file with a duration around 3 sec it takes 3 -4 sec to load. With an InputStream (the way I get the files from the database) it could be much faster.
(To be honest i dont know, if the file has to be downloaded completely in order to start playing, or if it could start reading the bytes from the InputStream while it already plays.)

EDIT:
I just tested it. it takes so long, no matter what source i choose. But only when the bot has to open an new audio connection.
Any solutions for that?

from lavaplayer.

LorisFriedel avatar LorisFriedel commented on July 20, 2024

Hello @sedmelluq ! I am also interested in a way to play audio from an InputStream, is there any workaround we can use until this is potentially implemented as a LavaPlayer feature ?
Thanks for your amazing work anyway!

from lavaplayer.

MrTroot avatar MrTroot commented on July 20, 2024

I'd love for this to be an option. Many text-to-speech services return their data in InputStream format, and there's currently no way to plug this into lavaplayer that I can find...

from lavaplayer.

alula avatar alula commented on July 20, 2024

You just need to implement proper AudioSourceManager, then register it in your bot...

Look here: https://github.com/sedmelluq/lavaplayer/tree/master/main/src/main/java/com/sedmelluq/discord/lavaplayer/source

from lavaplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.