|
Posts: 7
Registered: Oct 11, 2011
|
Posted: 2011-11-08 20:35:59
|
Hi,
I'm a newbie, and I hope my problem is due to my ignorance and that one of you can help...
I've set up Python, and the API key, etc and everything seems fine, and am trying to run one of the sample Remix scripts to get going, but every output file that is returned has size 0.
Here's one script I'm running (cut and pasted from Adam Lindsay's excellent intro)
import echonest.audio as audio
from echonest.selection import fall_on_the
song = audio.LocalAudioFile("WheresYourHeadAt.mp3")
beats = song.analysis.beats
ones = beats.that(fall_on_the(1))
out = audio.getpieces(song, ones)
out.encode("WheresYourOneAt.mp3")
It generates the new mp3 file ok, but has a size of 0 and there's nothing to play. What am I doing wrong?
thanks,
Mark.
|
|
|
Posts: 59
Registered: Sep 17, 2008
|
Posted: 2011-11-08 20:46:27
|
Hey Mr Lovely, can you make sure to install the latest version from github if you haven't. It has solved some issues for other users. Let me know.
|
|
|
Posts: 7
Registered: Oct 11, 2011
|
Posted: 2011-11-08 21:22:30
|
Thanks for the quick reply Tristan, I thought I'd installed the right files from github but will check tomorrow, as the zip file in the link you sent extracts to something different. Hopefully it was a dumb noob mistake after all.
Mark.
|
|
|
Posts: 59
Registered: Sep 17, 2008
|
Posted: 2011-11-08 21:26:09
|
Ok let me know, if that doesn't fix it.
|
|
|
Posts: 7
Registered: Oct 11, 2011
|
Posted: 2011-11-08 21:29:05
|
Just double checked - I used the Windows install file from here... http://code.google.com/p/echo-nest-remix/ (The Echo Nest Remix API-1.3b.win32-py2.6.exe)
The unzipped github install package that you sent me a link to for installing from source says that I need:
* python2.5-dev -- Python 2.5 or 2.6 with the headers
* ffmpeg (only if you are on Linux)
* python-numpy
* subversion
* A build environment, either XCode (mac), build-essential (gcc, Linux), Visual Studio Express or higher (Windows)
I'm fine with 1-3, but don't know what a subversion is and do I really need a build environment? I thought python scripts could be run without compiling?
thanks for your help,
Mark.
|
|
|
Posts: 59
Registered: Sep 17, 2008
|
Posted: 2011-11-09 18:33:54
|
You need compilers to get it to work from source. Some components there are compiled software that python calls. If you don't want to get your hands dirty, the windows installer is the way to go. Are you running python 2.6? If that doesn't work for you, I'm not too sure. There must be conflicting bits in your system. Can you identify where things break? For instance do you get something in objects beats or ones?
|
|
|
Posts: 7
Registered: Oct 11, 2011
|
Posted: 2011-11-09 19:23:58
|
Thanks Tristan - the windows installer should be more than enough for me for now, but I've just followed the instructions for the full install, and it seemed to work ok, but I still have the same problem.
Python seems to be working ok, and when I run the one.py file (code above) I get "Echo Nest API Error 5: The Identifier specified does not exist" but it seems to upload and analyse the file (see transcript below). Any suggestions for how I can find out where things are breaking?
thanks for your help.
Mark.
c:\Python26\Mark>python one.py
Computed MD5 of file is 21c6e87855d5182a12e9d24b0bf58ab7
Probing for existing analysis
Echo Nest API Error 5: The Identifier specified does not exist
Analysis not found. Uploading...
en-ffmpeg -i "WheresYourHeadAt.mp3"
en-ffmpeg -y -i "WheresYourHeadAt.mp3" -ac 2 -ar 44100 "c:\users\mark\appdata\lo
cal\temp\tmpfyoruc.wav"
en-ffmpeg -y -i "c:\users\mark\appdata\local\temp\tmpot3gft.wav" -ab 128k "Where
sYourOneAt.mp3"
Deleting: c:\users\mark\appdata\local\temp\tmpot3gft.wav
|
|
|
Posts: 713
Registered: Sep 08, 2008
|
Posted: 2011-11-09 20:07:23
|
Mr Lovely - the error message is an indication that the check for the analysis using the MD5 did not find anything. Even though it says 'error' it is not really an error. -- Paul
|
|
|
Posts: 7
Registered: Oct 11, 2011
|
Posted: 2011-11-09 20:15:15
|
Thanks Paul, good to know that's not the problem, although I'm still scratching my head here.
I've also tried running the one.py script from within the echo-nest-remix-examples folder that was created (after putting my mp3 in that folder). The output mp3 creates ok, and this time is 10kb (rather than 0kb) but still contains no sound (I've opened it in a sound editor as well so check the waveform - there isn't one). Any ideas?
thanks for your help.
|
|
|
Posts: 7
Registered: Oct 11, 2011
|
Posted: 2011-11-10 10:40:44
|
I reinstalled the Windows remix API again and it's working now - no idea what caused the problem before but I don't care!
Thanks all for your help - I hope my future posts will be more interesting as I get going!
Mark.
|
|