Coder Social home page Coder Social logo

kennethnym / infinifi Goto Github PK

View Code? Open in Web Editor NEW
194.0 2.0 9.0 13.57 MB

infinifi plays gentle lofi music in the background indefinitely

Home Page: https://infinifi.cafe

License: Apache License 2.0

Python 35.02% HTML 8.78% JavaScript 33.34% CSS 22.29% Shell 0.57%
artificial-intelligence audiocraft lo-fi lo-fi-radio machine-learning musicgen pytorch

infinifi's Introduction

infinifi

infinifi is a cosy little website that plays calm, gentle lo-fi music in the background to help you relax and study!

audio generation

infinifi works by continuously generating 5 1-minute lofi music clips in the background using Meta's MusicGen model. Each clip is generated using a slightly different prompt to provide music clips with different, but still cosy vibes.

frontend

the frontend is written using pure HTML/CSS/JS with no external dependencies. it queries /current.mp3 to obtain the current lofi music clip. after the clip ends, it re-queries again, which will return a different clip. since each clip is completely different, the frontend applies a fade-in and fade-out effect at the start and the end of each clip.

inference

infinifi consists of two parts, the inference server and the web server. the two servers are connected via a websocket connection. whenever the web server requires new audio clips to be generated, it sends a "generate" message to the inference server, which triggers the generation on the inference server. when the generation is done, the inference server sends back the audio in mp3 format back to the web server over websocket. once the web server receives the mp3 data, it saves them locally as mp3 files.

running it yourself

you are welcome to self host infinifi. to get started, make sure that:

  • you are using python 3.9/3.10;
  • port 8001 (used by the inference server) is free.

then follow the steps below:

  1. install torch==2.1.0
  2. install deps from both requirements-inference.txt and requirements-server.txt
  3. run the inference server: python inference_server.py
  4. run the web server: fastapi run server.py --port ${ANY_PORT_NUMBER}

you can also run the inference server and the web server on separate machines. to let the web server know where to connect to the inference server, specify the INFERENCE_SERVER_WS_URL environment variable when running the web server:

INFERENCE_SERVER_WS_URL=ws://2.3.1.4:1938 fastapi run server.py --port ${ANY_PORT_NUMBER}

feature requests

if you have any feature idea, feel free to use the issue tracker to let me know!

credits:

infinifi's People

Contributors

callumcha avatar dmztdhruv avatar kennethnym avatar prashantrahul141 avatar rettend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

infinifi's Issues

Tuned in counter

Slight UI adjustment to create bigger gap on mobile. When slider is less than 100%.
image

image

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.