Publish linked audio

What I’m trying to do

I’m trying to publish a big library of audio and written content. The Help documentation says you can only include 4 GB of content in your site, so it’s not ideal to add a lot of audio/video directly to the vault.

My audio files I will need to add are already more than 4 GB, so I’d like to host the audio files elsewhere (rather than adding them directly to the vault), and then have them somehow linked in so they play on the page, even though it’s pulling the actual file from wherever it’s stored.

Things I have tried

I sent an email to Obsidian help, and they suggested using an audio tag, directing to this documentation: <audio>: The Embed Audio element - HTML: HyperText Markup Language | MDN.
I used this format to try to add an audio tag on the Obsidian page: <audio controls src="[URL]"></audio>.

I tried adding an audio tag onto a test page, and then generating a link to the audio file via OneDrive (I tried a view-only and an editable version link).

I also tried putting the file on Google Drive and generating a link to anyone with the link.

I tested the links by opening an incognito window in the browser and pasting the links, and they played fine.

Neither the OneDrive nor the Google Drive links worked. It did create an audio player in the Obsidian publish page, but it shows “0:00/0:00”, and the play button doesn’t do anything.

Is there any cloud storage location where I could place my audio library, generate links, place the links into an Obsidian note, and have the audio be playable? I’m willing to use pretty much any cloud service.

Or is there some other way to do this?

Due to the lack of interest in the solution to this problem I took the time (cca. 1 minute) to copy paste your lines to ChatGPT4o and asked a question.
I am sharing the public link to this short back and forth. You may gain some insight from this and take it further:

I am afraid that is all I could come up with.

Best of luck

Oh wow, that Chat GPT answer looks so helpful! I usually ask Chat GPT all kinds of technical questions, but for some reason I assumed this one was too hard :). I will test this when I get a chance and report back if I find a solution.

1 Like

I worked with Chat GPT to come up with a solution. As mentioned in the reply from @Yurcee, the link must be a direct link to the audio. Many cloud providers offer shareable links that are not truly direct links. Dropbox allows you to create direct links to files, but it’s a manual process to modify each file into a direct link.

Chat GPT suggested other providers such as Amazon S3 as well as several more, that allow to create direct links to audio. I decided to go with Backblaze B2, which is extremely affordable (way cheaper than Amazon S3). It’s essentially going to be a few cents a month (or possibly even free) to host several gigabytes of audio and have it play directly in my Obsidian publish site.

Apparently it’s also possible to use Backblaze for hosting video files, but I haven’t tried that yet.

In my tests of uploading a few audio files to Backblaze, accessing the URL, and then pasting that URL into the relevant Obsidian note in this format: <audio controls src="[URL]"></audio>, it successfully generated a working audio player that plays the file both in my personal Obsidian workspace and in the published web page.

1 Like