Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend documentation with simple example on how to run prediction on a .wav file #84

Open
emma3826 opened this issue Jan 10, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@emma3826
Copy link
Contributor

would be great to have a simple example on how to upload and run prediction on a wav file as part of ESC50: Environmental Sound Classification.ipynb

something like this:
learn_inf = load_learner('model name', cpu=True)
audio = AudioTensor.create('file name')
with out_pl_env: display(Audio(content))
pred,pred_idx,probs = learn_inf.predict(audio)
lbl_pred_env.value = f'Prediction: {pred}; Probability: {probs[pred_idx]:.04f}'

same example as in the fastai documentation, only adapted for audio use case

@scart97 scart97 added the enhancement New feature or request label Jan 11, 2021
@mogwai
Copy link
Member

mogwai commented Feb 11, 2021

Feel free to create a pr for this @emma3826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants