Skip to content

Commit

Permalink
reverting back to librosa ffmpeg solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann Diedrick committed Feb 27, 2019
1 parent 8d76752 commit 1693533
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ ADD requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

#install ffmpeg
#RUN apt-get -y update && apt-get install -y wget nano git build-essential yasm pkg-config
#install ffmpeg (takes a long time...need to figure out a better solution)
RUN apt-get -y update && apt-get install -y wget nano git build-essential yasm pkg-config

# Compile and install ffmpeg from source
#RUN git clone https://github.com/FFmpeg/FFmpeg /root/ffmpeg && \
# cd /root/ffmpeg && \
# ./configure --enable-nonfree --disable-shared --extra-cflags=-I/usr/local/include && \
# make -j8 && make install -j8
RUN git clone https://github.com/FFmpeg/FFmpeg /root/ffmpeg && \
cd /root/ffmpeg && \
./configure --enable-nonfree --disable-shared --extra-cflags=-I/usr/local/include && \
make -j8 && make install -j8

# If you want to add some content to this image because the above takes a LONGGG time to build
#ARG CACHEBREAK=1
ARG CACHEBREAK=1

#install libsndfile
RUN apt-get install libsndfile1
#install libsndfile (need to fix)
#RUN apt-get install libsndfile1

COPY app app/

Expand Down
4 changes: 2 additions & 2 deletions app/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ async def homepage(request):
return templates.TemplateResponse('index.html', {'request': request})

def create_spectrograph(source_filepath, destination_filepath):
#y, sr = librosa.load(source_filepath, sr = 22050) # Use the default sampling rate of 22,050 Hz
y, sr = soundfile.read(source_filepath)
y, sr = librosa.load(source_filepath, sr = 22050) # Use the default sampling rate of 22,050 Hz
#y, sr = soundfile.read(source_filepath) try this again later

# Pre-emphasis filter
pre_emphasis = 0.97
Expand Down

0 comments on commit 1693533

Please sign in to comment.