Embedding audio files

Hi folks.

I am writing a blog post with fastpages and it includes small audio clips. I wanted to know if there’s a better way to include audio clips without using IPython. On Colab, it renders pretty nicely -

image

Maybe can you provide a link to the Colab site?

You can embed many things if you copy the HTML so if you inspect the HTML with your browser and copy and paste there is a decent chance it will render for you

Okay. I will look into it. Thanks!

check this out https://jekyllcodex.org/without-plugin/open-embed/

Here’s what I did.

I hosted the audio files as .mp3 over GCS (one can use GitHub releases or anything similar). I then used <audio> HTML tags where in the src attribute I supplied the direct downloadable link to the audio clip like the following -

<audio controls>
  <source src="https://storage.googleapis.com/video-api-storage/labels.mp3" type="audio/mpeg">
</audio>

I like how it came out - https://sayak.dev/mlapis-maker/.

1 Like

Hey, @Sayak I tried the same in a nbdev repo but it did not work for me. I have an audio file (.mp3) in my Github repo and I am trying to embed it with the same

Thanks