Orcasound’s new live-audio solution: from hydrophone to headphone with a Raspberry Pi computer and HLS/DASH streaming software

Over the winter of 2017-2018 a team of acoustic experts, hardware geeks, and software developers have been working to realize the goal of the 2017 Kickstarter. Paul, Steve, Skander, Ty, Val, and I have been busy sorting through a dizzying array of cool new hardware options and potential software solutions, seeking the optimal combination. We’ve hit some roadblocks along the way, but are very excited about the solution that we’re now alpha-testing!

The latest Orcasound 2.0 prototype: A hydrophone cable (blue) connects to the input of the Pisound sound board which is attached to a Raspberry Pi3 which is powered over the ethernet cable (black) that also allows open-source software, including ffmpeg and s3fs, to transfer live audio data to an S3 bucket hosted by Amazon Web Services! It’s all kept safe (eventually next to the ocean!) in an inexpensive, easy to set-up waterproof box, plus there’s room for a second hydrophone, an optional external speaker, and maybe someday even a camera…

Our goal remains clear — create a new way to stream live ocean audio — from hydrophone to headphone — that “just works” on any browser/device combination and scales beyond the historic limits of 20-50 simultaneous listeners. Of course, as with most cutting-edge technological innovations, the devil is in the details!

Recent alpha-test data results: the HLS player is performing well on more and more combinations of devices, operating systems, and browsers as possible! Once we have it working on as many as possible, we’ll begin beta-testing with the Kickstarter founders and influencers…

Without going into too much nitty-gritty, in this update I want to show you where we’ve ended up. Along the way, I’ll explain recent shifts in Internet streaming technology and how we see Orcasound fitting in, not only as a user and advocate for open-source software, but also as a contributor (through the Orcasound Git repositories).

Where we’ve been

When we first started streaming live data from Orcasound hydrophones more than a decade ago, we used a big desktop computer running Windows XP and proprietary, but free software (WinAmp with the Shoutcast plugin). Depending on the hydrophones — which typically cost $500-5000 each, there was more hardware next to the PC — external sound boards, power supplies, isolation amplifiers, etc. The Shoutcast stream was replicated by a company in Texas, allowing up to 20 folks to listen to the audio stream for about $1/person/month.

The old way: the now defunct streaming hydrophone computer at the Port Townsend Marine Science Center took up a lot of counter space in the classroom (with a Windows XP PC, monitor, keyboard, Griffin iMic, isolation amplifiers, and external hard drive & speakers).

Most folks got the live MP3-encoded stream to work with iTunes or WinAmp, but many struggled to find the right software to listen live on their computers… and then tablets… and then phones. The main complaints from listeners and network members over the years have remained: (1) I can’t get the stream to “just work” on my new or updated device; (2) all the listening “seats” are occupied just when my friend told me the whales sounds were really great; and (3) all this clunky hydrophone hardware is hard to set up and expensive to maintain.

Where we’re at

Thanks to the 2017 Kickstarter, we’ve been able to step back and look at the full range of technological solutions currently available for streaming live audio from the ocean to your ears — from hydrophone to headphone. The good news is that many new tools and technologies have emerged, including software that is often open-source — free for using and improving. The bad news is that we had so many choices that it took us longer than expected to find an optimal solution — one that would ideally alleviate all those key complaints.

For example, the list of single-board computers that could replace our old, clunky PCs is really long, so we ended up looking closely at Arduino, Beaglebone, Udoo, and Raspberry Pi devices. Each one has its own audio capabilities, or ones that can be added to it, as well as constraints on what software will run easily on it…

The new way: a Raspberry Pi 3B+ with the Pisound HAT fits in your palm!

We’ve ended up choosing the following components for Orcasound 2.0 — a completely new way to listen to the oceans (latest update to this list Dec 18, 2019):

So, that comes to $500 for a science-grade hydrophone, $50 for the seafloor stand, and less than ~$275 for the streaming hardware. That’s a total of ~$800 to establish a basic listening node that is calibrated over and can resolve frequencies from at least 20-48,000 Hz, with the bulk of the expense in the hydrophone. Luckily, there are cheaper hydrophone options if you don’t need to conduct research, e.g. have a flat, calibrated response over a particular range of frequencies.

Here’s what an assembled Orcasound test/development rig looks like in December 2019 (the green box, POE injector, & UPS):

Dec 2019 Orcasound hardware = Raspberry Pi 4 model B with 4GB RAM + Pisound HAT

(If you’re curious to see more of this hardware and our tests of it, check out the Google photo album of Orcasound node hardware.)

Once the ocean sounds have made it to a server on the Internet, the next big task is to get them to play on the ever-increasing galaxy of devices, operating systems, and apps. Paul led the way quickly to the HLS or DASH protocols and multiple advisors agreed we should develop a web app — software that is hosted on the web and runs in the browser on any given device — rather than native applications for specific devices. Again there were a LOT of choices and we tried many of them, but have ended up with this tech stack:

  • Raspian-based ffmpeg and s3fs generate compressed lossy (HLS or DASH) files, and optionally lossless FLAC files
  • Data are stored in an AWS S3 bucket specific to each hydrophone node — from which as many streams as necessary can be provided via HTTP (and from which continuous lossless recordings from the previous month will be accessible)
  • Heroku-hosted web site are implemented in Phoenix/Elixir
  • HLS segments are played by Media Element and HLS.JS (we also tried and like the Shaka player and look forward to helping develop similar DASH players, as well as the ability to live-stream lossless FLAC audio data over DASH)

We’d welcome your help in developing any/all of these software components. Join us via the Orcasound Git repositories!

8 thoughts on “Orcasound’s new live-audio solution: from hydrophone to headphone with a Raspberry Pi computer and HLS/DASH streaming software

  1. Scott Veirs says:

    Alternative hardware being tested with Raspberry Pi4s in 2020:

    — D-link 1port Gigabit PoE Injector instead of the TrendNet because the RPi4’s are more power hungry and may require more than the 15.4W 802.3af PoE. The D-link injectors can provide up to 30W (802.3at) if required.
    — AUVPAL Gigabit PoE splitter, model AP-POE-USBC
    — HiFiBerry DAC+ADC pro HATs. A little less expensive than the PiSound; still sample to 192kHz; will see if their preamps are as nice as the PiSound’s…

    — HTI-96-MIN hydrophones
    — Subconn wet connectors
    — Draka FSS-3 hydrophone cable

  2. Dean says:

    Hi
    I have just taken delivery of A hifiberry DAC ADC and curious as to how to get it to stream live audio from a microphone that records wildlife sounds especially birds. Is your software readily available ?

  3. Chiara Semenzin says:

    Hello! Amazing work. Are you able to record frequencies beyond 23kHz reliably? The PiSound card seems to have a loopback bandwidth up to 23kHz that make it look like the quality would be degraded from those frequencies on?

  4. Scott Veirs says:

    @Chiara Thank you! We have not yet done many experiments with the Pisound ADC at the higher sampling rates (96 kHz and 192 kHz), but plan to do some this year (in 2024). At the 48 kHz sample rate, we have been recording both lossy (HLS) and lossless (FLAC) data from one of our locations for about the last year. Here is a pointer to the lossless archive from Port Townsend — https://open.quiltdata.com/b/archive-orcasound-net/tree/rpi_port_townsend/

    There we are using Labcore-40 hydrophones (<$300, but flat response only from ~3-6 kHz). Here is a response curve for one of the Labcore-40 elements -- https://beamreach.org/wiki/index.php?title=File:Labcore40.png

Leave a Reply

Your email address will not be published. Required fields are marked *