algorithmic-music-exploration / amen-server Goto Github PK
View Code? Open in Web Editor NEWServer to run Amen analysis and return JSON results.
License: BSD 2-Clause "Simplified" License
Server to run Amen analysis and return JSON results.
License: BSD 2-Clause "Simplified" License
I think we need 2 endpoints:
POST /audio
.
This is where you upload a track. It returns a URL that you can poll to see if your analysis is done.
GET /analysis?id=<some-id>
This is where you poll to see if your analysis is done. It returns some sort of 50%
data if your analysis is still pending, and returns the actual analysis JSON once it is done. If we decide to host audio on S3, the S3 url is in the analysis JSON.
... how do we want to do these? check the interface and the get_url method?
I've got a version, at simple-tornado-server
that has a Dockerfile that works locally. You can also run it locally by running a three-line bash script.
Along the lines of @alnesbit's comments on not wanting to lock ourselves in to AWS or GCP, it seems like maybe the thing to do is to create Readmes / Docker infrastructure to help people run everything from a DIY bash-script version to a massively scaled Docker swarm/stack/wombat/cluster/etc version.
I would like to summon @psobot for his feelings about this, and also for his feelings about running both the webserver and the queue process in the same Docker container vs. running two containers.
(Two containers feels more "correct" to me, but it is also much more work? )
Doc Savage!
This is a Tornado config thing, it looks like.
http://www.tornadoweb.org/en/stable/guide/running.html#processes-and-ports
Basically, we want to recreate something very much like The Echo Nest's track/upload
endpoint. This means that:
POST
audio to the server and get a JSON blob of analysis back.It would be super-ideal if things like The Infinite Jukebox could just use our endpoint. May not be possible tho.
Less sure about this, but I think that the server takes the audio, puts it on a queue, and then the queue (or two queues?) handle analysis and uploading the audio to S3.
It may also be possible to use some S3 magic here, and post the audio directly to S3 - maybe even use their Lambda stuff?
We should pass them into the Dockerfile, or in run.sh, rather than in the upload call? Or something like that.
More tests! Don't forget that you may need to mock Amen
itself, due to FFMPEG install issues.
As per @psobot, can we gzip or compress the analysis JSON? And how will this work with remix.js?
wooo! Let's write some tests and set up Travis
This is down the road a piece, but it seems like we should be able to say "the queue is full, please wait", when people try to upload a thing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.