Deep Learning with Audio Thread

The post just says that Jeremy wants to include the audio library in the next fastai library release :slight_smile: In the next month or two.


Am sorry , if its a dump question ? has anybody faced issue with _torch_sox ?.

i am not able to import _torch_sox

Are you using the fastai audio module or trying to import directly ? Can you post a full error message?

Trying to use fastai audio module, may be below error is the problem

Running in RHEL 3.10 , torch version is 1.0

sh-4.2$ python install
running install
running bdist_egg
running egg_info
writing torchaudio.egg-info/PKG-INFO
writing dependency_links to torchaudio.egg-info/dependency_links.txt
writing requirements to torchaudio.egg-info/requires.txt
writing top-level names to torchaudio.egg-info/top_level.txt
reading manifest file ‘torchaudio.egg-info/SOURCES.txt’
writing manifest file ‘torchaudio.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
error: [Errno 2] No such file or directory: ‘which’: ‘which’

Please suggest if you have seen this before.

I’m wondering if behavior related to unknown class is a function of using softmax.

During part 2 it was mentioned that Softmax always wants to elevate one feature. In a dataset that doen’t always conform to labels, or where more that on object might be present binomial loss function might be better.

Just a guess

I’ve made a post related to Siamese Networks but I’m using it for Audio related stuff.


Are you running the file?

Can Any Body please help me to set up fastai audio module in google colab . As I am new to this field and already tried with !wget to get files from github and also running but it is throwing me error .

Can you attach the error log?

1 Like

I’ve made a colab setting up the audio module:

Might want to pin this for others @MadeUpMasters


@baz I am getting this error when running in colab .

ImportError Traceback (most recent call last)

<ipython-input-5-310b7e31ad9a> in <module>() 1 from exp.nb_AudioCommon import * ----> 2 from exp.nb_DataBlock import * 3 import matplotlib.pyplot as plt 4 import torch 5 from fastai import *

/content/fastai-audio/exp/ in <module>() 15 from IPython.display import Audio 16 import torchaudio —> 17 from torchaudio import transforms 18 19 class AudioItem(ItemBase):

ImportError: cannot import name ‘transforms’

Thanks i got what i need from @baz

I’m not getting any problems? It should be the same on both machines? What is the output when you run the first cell?

I’ve been meaning to create a web app that can be used on peoples phones points to a server of the users choosing to send the recording to but I was finding it hard to find code that worked on iOS. However the search is over:

I’m going to fork this and create something simple that people can use on their phones/computers to test their models. Would people please do me a massive favour and confirm this works on their Android phones as I don’t have one :frowning:

Here is the initial very basic version. Working on iOS 12, Chrome on Mac.

Any suggestions for features?

I’m thinking:

  • Diagnostic for browser support
  • Remembers server url
  • Remembers results
  • Clear results

There is also an example of a simple flask server that you can run with the app to predict results. However, beware of ssl problems. For this app to work on a phone, you’ll need your prediction server to have a certified ssl certificate. Does anyone know a good way to do this locally?


First Cell Works fine but when i run below code

from exp.nb_DataBlock import *

i am getting error mentioned above . Problem actually states that not able to import transforms from torchaudio. I even updated torchaudio but faced the same problem

I checked functionality of all the blue buttons – they work on my Android galaxy s7

Thanks :slight_smile: Did you check to see whether simple version I built works too?

Ok, I just checked. I “start” and “stop” recording, then I can play the recording back. But underneath the playback progress bar, a “network error” message appears, for some reason.

Exciting news, though. I also checked simple version on my laptop, which has been acting as though the microphone is not working. Your app worked, as before (including the network error message), but it finally verifies for me that my laptop’s internal mic is working!

Thats because the wav file isn’t being sent no where. You have to specify the server that is hosting your model. If you’re using the app from, you’ll need to set up SLL too otherwise most browsers will block the request.

I’ve created a flask server in the repo but I’m having problems loading learners with torchaudio. torchaudio seems to depend on a version of torch that doesn’t work with load_learner.

Has anyone managed to export a audio related model, re-import it with load_learner and then use it to make a after wrapping it in a AudioItem?