googlecreativelab / aiexperiments-ai-duet Goto Github PK
View Code? Open in Web Editor NEWA piano that responds to you.
Home Page: https://aiexperiments.withgoogle.com/ai-duet
A piano that responds to you.
Home Page: https://aiexperiments.withgoogle.com/ai-duet
Hi,
I am wondering why there are only 1 note playing at a time in the response?
Where to change to play several notes at the same time?
In the README this is written:
A.I. Duet only works with Python 2.7
but in the TensorFlow installing site:
Requires Python 3.5–3.8
so how can I use it?
If I use the TensorFlow version specified in the README pip can't find this version and if I try to use a newer version or install from the whl from storage.googleapis.com(/tensorflow/...) it says my version is not supported
I followed the install instructions except that that pip failed on magenta:
Collecting magenta==0.1.3 (from -r requirements.txt (line 15))
Could not find a version that satisfies the requirement magenta==0.1.3 (from -r requirements.txt (line 15)) (from versions: )
No matching distribution found for magenta==0.1.3 (from -r requirements.txt (line 15))
So I followed the magenta install instructions and then activated the conda environment source activate magenta
and then pip install -r requirements.txt
and python server.py
.
[2016-11-15 16:00:08,627] ERROR in app: Exception on /predict [POST]
Traceback (most recent call last):
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "server.py", line 39, in predict
ret_midi = generate_midi(midi_data, duration)
File "/Users/grant/Downloads/aiexperiments-ai-duet-master/server/predict.py", line 52, in generate_midi
generate_response = basic_generator.generate(generate_request)
TypeError: generate() takes exactly 3 arguments (2 given)
127.0.0.1 - - [15/Nov/2016 16:00:08] "POST /predict?duration=1.986848072562358&generator=pop HTTP/1.1" 500 -
[2016-11-15 16:00:18,052] ERROR in app: Exception on /predict [POST]
Traceback (most recent call last):
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/grant/anaconda/envs/magenta/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "server.py", line 39, in predict
ret_midi = generate_midi(midi_data, duration)
File "/Users/grant/Downloads/aiexperiments-ai-duet-master/server/predict.py", line 52, in generate_midi
generate_response = basic_generator.generate(generate_request)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] No description
npm WARN [email protected] No license field.
/node_modules/webpack-cli/bin/webpack.js:242
throw err;
^
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object. (/node_modules/webpack-cli/bin/convert-argv.js:7:24)
at Module._compile (/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at yargs.parse (/node_modules/webpack-cli/bin/webpack.js:239:14)
at Object.parse (/node_modules/yargs/yargs.js:543:18)
at /node_modules/webpack-cli/bin/webpack.js:217:8
at Object. (/node_modules/webpack-cli/bin/webpack.js:512:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/usr/lib/node_modules/webpack/bin/webpack.js:12:2)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
The command '/bin/sh -c npm install && webpack -p' returned a non-zero code: 1
After I play a tune the AI doesn't play back to me. Instead I get
POST https://aiexperiments.withgoogle.com/ai-duet/view/predict?duration=3.1346938775510207 500 () (anonymous) @ 0.js:21 value @ 0.js:21 (anonymous) @ 0.js:18 value @ 0.js:18
and
Uncaught (in promise) 500
as console errors.
This is seen on the live demo page
I would like to be able to generate some new notes based on a real time stream of notes picked from an audio signal of a piano. These notes are extracted using already a machine listening code in SuperCollider (onsets, and pitch tracking information), and I can feed those using OSC messages communication to any platform for further use. So , the scenario is, piano plays some notes and I send these as OSC messages to my generative JS system which responds with the new notes. Is that possible, would this require some waiting moment for generating the notes or it can work dynamically flawlessly as in the web based platform example here.
Hey,
After I have the server up, whenever I click on a key, I get the error below(on the picture). I tried both the basic and docker setup on multiple other computers(Mac, Ubuntu) and they yielded the same result. I should mention that after the error is prompted, the AI does not play. Any help would be greatly appreciated. Thank you.
.
Installed the python way, and got the 404
error on the Main.js
. Then installed the docker way, and the same thing occurred. I have Node.js version 7.6.0 current
, and webpack 2.x
. Running in a virtual environment with the repo cloned at my root.
Sometimes I get:
127.0.0.1 - - [24/Feb/2017 19:31:46] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [24/Feb/2017 19:31:46] "GET /build/Main.js HTTP/1.1" 404 -
127.0.0.1 - - [24/Feb/2017 19:31:47] "GET /build/Main.js HTTP/1.1" 404 -
127.0.0.1 - - [24/Feb/2017 19:31:47] "GET /images/AIDuet_196.png HTTP/1.1" 304 -
127.0.0.1 - - [24/Feb/2017 19:31:47] "GET /images/AIDuet_152.png HTTP/1.1" 304 -
127.0.0.1 - - [24/Feb/2017 19:31:47] "GET /images/AIDuet_32.png HTTP/1.1" 304 -
in one setting.
The site remains white and empty throughout. Any ideas? Forgive me, I'm a newb when it comes to installation management.
I'm running the latest version of Docker Desktop for windows. The installation routine fails with the following error, can I fix this somehow?
Matplotlib 3.0+ does not support Python 2.x, 3.0, 3.1, 3.2, 3.3, or 3.4.
Beginning with Matplotlib 3.0, Python 3.5 and above is required.
This may be due to an out of date pip.
Make sure you have pip >= 9.0.1.
Complete output from command python setup.py egg_info:
Matplotlib 3.0+ does not support Python 2.x, 3.0, 3.1, 3.2, 3.3, or 3.4.
Beginning with Matplotlib 3.0, Python 3.5 and above is required.
This may be due to an out of date pip.
Make sure you have pip >= 9.0.1.
Hi,
I have tried on 3 different PC, clean ubuntu installed. After cloning the code. I got the error below in the web browser. I had an old folder which is working, and i tried to copy that folder to other places, also same error. Is there something wrong with the webpack? versions? Do you know any way to debug it? Thank you!
- Tone.js r9 *
0.js:12 THREE.WebGLRenderer 83
0.js:24 Uncaught TypeError: Cannot read property 'create' of undefined
at e.value (0.js:24)
at new e (0.js:24)
at Object. (0.js:8)
at M (Main.js:1)
at Main.js:1
0.js:8 Uncaught TypeError: Cannot read property 'start' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e. (0.js:24)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyDown' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyUp' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyDown' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyUp' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyDown' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyUp' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyDown' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyUp' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyDown' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyUp' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyDown' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
0.js:8 Uncaught TypeError: Cannot read property 'keyUp' of undefined
at e. (0.js:8)
at e.n.emit (0.js:7)
at e.value (0.js:25)
at e. (0.js:25)
at e.n.emit (0.js:7)
at HTMLDivElement. (0.js:24)
Is it possible to type in the names of the keys and display them on the keyboard using html or any other method? Tried using the .append() query and basic html syntax for inserting text- doesnt work!Racing against a timeline to complete the execution of this experiment as a part of a case study assignment- Any help ASAP would be appreciated.
After installing all the package, I'm getting the following error after starting the server with "python server.py"
Any tips on what I might have missed?
File "/Users/XXX/projects/aiexperiments-ai-duet/server/predict.py", line 19, in
import third_party.magenta.models.basic_rnn.basic_rnn_generator as basic_rnn_generator
File "/Users/XXX/projects/aiexperiments-ai-duet/server/third_party/magenta/models/basic_rnn/basic_rnn_generator.py", line 17, in
import basic_rnn_encoder_decoder
File "/Users/XXX/projects/aiexperiments-ai-duet/server/third_party/magenta/models/basic_rnn/basic_rnn_encoder_decoder.py", line 27, in
class MelodyEncoderDecoder(melodies_lib.MelodyEncoderDecoder):
AttributeError: 'module' object has no attribute 'MelodyEncoderDecoder'
Tried to create the docker container and I get an error that I need Python 3.6
So I moved to starting from Ubuntu 18.04, had to add "sudo" as part of the install list.
But something in the node installation says it won't work with bionic
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_7.x/dists/bionic/Release'
## Your distribution, identified as "bionic", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support
Is there a way I can use acoustic audio input? How can I do it? What kind of library I need to use?
Thanks!
when trying to run ai-duet (the accompanmient thing):
however, when i get to run it in macos high sierra on macbook a1278 with core i5:
* Serving Flask app "server" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
127.0.0.1 - - [12/Jun/2018 12:18:52] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [12/Jun/2018 12:18:52] "GET /build/Main.js HTTP/1.1" 404 -
127.0.0.1 - - [12/Jun/2018 12:18:52] "GET /images/AIDuet_32.png HTTP/1.1" 200 -
From the video is looks like the AI was trained with a sampling of music. Is there a way to add more music to the sampling?
Hi there, I have succesfully installed and used Your code, but I want to change some things a little.
I have changed mp3 files in static/audio/Salamander to my guitar samples, but when I did that, the page stuck on loading - nothing happens.
I'm looking forward for your response :D
pip install -r requirements.txt
results in:
Collecting magenta==0.1.3 (from -r requirements.txt (line 15))
Could not find a version that satisfies the requirement magenta==0.1.3 (from -r requirements.txt (line 15)) (from versions: )
No matching distribution found for magenta==0.1.3 (from -r requirements.txt (line 15))
According to the magenta install instructions, more than a pip install magenta
is required (e.g. create conda source environment, install TensorFlow in that environment, etc.). After I followed the "automated install" instructions and activated the magenta source environment, I ran pip install -r requirements.txt
and everything installed without error.
Am I missing something or should the README be updated?
After installing all the packages, I can't run the server. This is the error I got.
File "server.py", line 40
print time.time() - now
^
SyntaxError: invalid syntax
Did I do anything wrong?
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.