H ARDWARE IS HARD . The electronics-industry adage applies not only to making ever more complex devices but also to selling them at a good price. Even inventive firms fail to ward off commoditisation. Will Sonos, a maker of wireless speakers that went public in August at a value of just under $1.5bn, escape this fate? It is a test case of whether smaller firms can still compete with the giants.

Founded 16 years ago in Santa Barbara, five hours’ drive south of Silicon Valley, the firm’s elegant devices have attracted a loyal following of over 7m households. Many of them still use the speakers they bought years ago and buy new ones on top (nearly two-fifths of buyers already own a Sonos). Yet their most appealing feature is neither design nor longevity, but software. Sonos was the first to make wireless speakers that are easy to set up, even across multiple rooms. And it often upgrades its products with new features over the internet.

For years Sonos had the market largely to itself, until the rise of smart speakers—wireless audio devices complete with a digital assistant that obeys voice commands. Nearly 100m of these have been sold, mostly by Amazon and Google. They are often no match for Sonos on sound quality but they do compete on service and price, says Ben Wood of CCS Insight, a market-research firm. Amazon’s Echo Dot or Google’s Home Mini start at $39.99 and $49 respectively, compared with $150 for Sonos’s cheapest speaker. And the tech giants’ products are getting better. Amazon now offers a wireless amplifier that powers conventional high-end speakers. As for Apple, its HomePod already competes directly with Sonos.

Sonos could react by selling cheaper speakers. But Amazon and Google can easily beat it at this game. They could offer their devices at or even below cost, since these are principally vehicles to spread digital assistants, which will eventually help the two firms earn more from their main e-commerce and advertising businesses. Sonos has instead opted to build on its existing strengths, says Patrick Spence, its boss.

One of these is high-end hardware. The firm has already developed devices in new forms, such as a sound bar and a television sound system. It is working with IKEA , a big furniture chain, on ways to integrate speakers into its products.

But Sonos’s bigger goal is to turn its software into a platform—a “Switzerland for audio services”, in the words of Mr Spence. Its products are equipped with a direct link to 60 music-streaming services, including Deezer and Spotify. It aims to repeat the trick by incorporating digital assistants: Amazon’s Alexa is already listening; Google’s Assistant is soon to come; others could follow. The firm may even introduce its own virtual butler, which would specialise in music-related commands. Outside developers can now write programs for Sonos’s platform—connecting it to a wireless doorbell or other smart-home devices, for example.

Investors are not yet persuaded. Sonos’s shares have fallen by 13% since its listing. The competition is fierce: Amazon is particularly aggressive on price. According to Mr Wood, Sonos will need to show that it can deal with the programming complexity that comes with being a platform without being able to tap a talent pool like Silicon Valley’s. One test of success will be if it can grow at least as fast as music-streaming, which Sanford C. Bernstein, a research firm, predicts will expand by more than a third over the next three years.

Sonos does have one big advantage. As a pioneer of wireless speakers, it has amassed a lot of patents. Its website lists nearly 700, including ones for how music can be streamed to speakers and how these can be tuned to the acoustics of the room they are in. IEEE Spectrum, a magazine, has ranked the portfolio the second strongest in the electronics industry, behind Apple’s. Sonos has already won an infringement case against Denon Electronics, another maker of wireless speakers. It has reportedly allowed Google to use its intellectual property in return for making Assistant available on its devices. Such behaviour recalls some of the tech giants’ own tactics, using one asset to gain an edge for others. With such huge rivals closing in, Sonos is wise to copy a few of their tricks.