Most of the projects I work on as a contract developer involve some kind of 3rd party API integration. Because of that, I tend to think there should be an API for whatever external thing that needs to be done. A good amount of the time there is – if you need to send email, push real-time updates, offload data storage, deliver faxes, even hire someone like me, there really is an API for that. However, occasionally I run across some case where there is no API, even though it certainly seems like there should be. Maybe I’m just not throwing the right terms at google, maybe there aren’t really that many use cases, but every once in a while I think, “Shouldn’t there be an API that does [that]?”
Recently, voice verification has been the ‘that’. It seems like a simple concept to me – provide an audio sample in some acceptable format, and return an indicator of how closely it matches an existing sample. The API could be pretty straightforward, one endpoint to associate a sample with an unique identifier, another to compare a newly captured sample against the identifier. If needed, a couple of extra API calls to get text the user is prompted to say.
So where’s my API? There are services that provide this kind of voice verification – some are SDKs allowing developers to capture and process the data on a mobile device, others are APIs that initiate phone calls to the user’s number and return the verification status once the call is over.
But none – that I’ve found – provide a simple API for the process of sending an audio sample and getting a response. Each only works over a fixed channel – initiating a phone call, integrating a mobile SDK – which means developers are limited in how they can integrate them. What if I don’t want to call the user, but rather capture the audio using a desktop application? Or perhaps use an embedded device (something like a lockatron).
The closer an API gets you to the essential function it provides, the more useful it is – the more choices an API makes for you, the less freedom developers have. Sure, it’s sometimes a hard thing to balance, but it this case, I certainly wonder why there isn’t a voice verification API with a simple HTTP interface allowing it to be used by any application with a network connection.
Maybe it does exist, and I’ve just missed it – if it does, I want to use it. Is there an API you need, but it just isn’t out there? Let me know in the comments.