Skip to content

Commit

Permalink
Merge pull request #55 from sagar-kohli/minor_fixes
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
botanicvelious committed Jun 5, 2017
2 parents 470480f + 3f8412f commit 0cb9375
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apt-get install -y libfftw3-dev libavcodec-dev libavformat-dev libavutil-dev

# install thrift 0.10.0
RUN git clone -b 0.10.0 https://github.com/apache/thrift.git /opt/thrift \
&cd /opt/thrift/lib/py && python3 setup.py install
&& cd /opt/thrift/lib/py && python3 setup.py install

# build items
RUN mkdir -p /opt
Expand All @@ -46,10 +46,10 @@ RUN git clone https://github.com/MTG/gaia.git /opt/gaia \
RUN git clone https://github.com/MTG/essentia.git /opt/essentia \
&& cd /opt/essentia \
&& git checkout tags/v2.1_beta2 \
&& ./waf configure --mode=release --with-gaia --with-example=streaming_extractor_music_svm, streaming_extractor_music \
&& ./waf configure --mode=release --with-gaia --with-example=streaming_extractor_music_svm,streaming_extractor_music \
&& ./waf \
&& cp ./build/src/examples/streaming_extractor_music /usr/local/bin \
&& cp ./build/src/examples/streaming_extractor_music_svm /usr/local/bin \
&& cp ./build/src/examples/streaming_extractor_music_svm /usr/local/bin
#&& cp ./build/src/examples/streaming_extractor_freesound /usr/local/bin \
#&& cp ./build/src/libessentia.so /usr/local/lib

Expand Down
1 change: 1 addition & 0 deletions src/damn_at/analyzers/audio/acoustid_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def analyze(self, anURI):
fingerprint_uuid = uuid.uuid5(uuid.NAMESPACE_DNS, str(duration)+ str(fingerprint))
except Exception as e:
print(("E: AcoustID analyzer failed %s with error %s" % (anURI, e)))
return False
meta = {'duration': str(duration)+'s', 'fingerprint': fingerprint, 'fingerprint_uuid': fingerprint_uuid}
asset_descr.metadata = metadata.MetaDataAcoustID.extract(meta)
file_descr.assets.append(asset_descr)
Expand Down
Binary file not shown.
7 changes: 1 addition & 6 deletions src/damn_at/analyzers/audio/feature_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,7 @@ def analyze(self, anURI):
output_file = os.path.abspath(anURI).split(".")[0] + ".json"

try:
if os.path.exists(self.ex):
subprocess.call([self.ex, anURI, output_file])
else:
print('E: Extractor does not exist, '
'please place the extractor at '
'\'damn_at/analyzers/audio/extractors\'')
subprocess.call([self.ex, anURI, output_file])
except Exception as e:
print(('E: Feature Extraction failed %s with error %s'
% (anURI, e)))
Expand Down

0 comments on commit 0cb9375

Please sign in to comment.