News Article Allies work experience student plugs Postcoder into Alexa
Norwich sixth form student, Elliott Cooper, has built and demonstrated a proof of concept that connects the company’s Postcoder address lookup API into Amazon Alexa during a work experience placement with Allies.
Alexa is a voice-controlled virtual assistant which can be accessed on hundreds of millions of devices built by Amazon and third-party manufacturers. Amazon allows third-party developers to create skills which can then be made available to all users in the Alexa skills marketplace.
Allies assigned the project to the Year 12 student to investigate one of the more novel ways to use Postcoder, beyond the popular use case of postcode lookup on websites and mobile apps. Elliott developed the Postcoder skill using Python within the web-based Alexa developer console.
Alexa, what’s the postcode for Allies Computing?
Elliott said “I hadn’t created an Alexa skill before so there was quite a steep learning curve. Every skill you create needs one or more intents (features) and one or more utterances (phrases) to invoke each intent. Utterances can also include slots (variables) which you can access within the code for your skill.”
“As an example, you can define an utterance of what’s the weather in [place] to invoke a getweather intent. The code for that intent will then have access to the [place] slot asked by the user.”
“Within the Postcoder skill, my code makes a request to Postcoder using my API key and the first part of an address, supplied via an [address] slot and URL encoded. It extracts what it needs from the JSON returned by Postcoder and then provides a spoken response to the user. If you have an Alexa device with a screen, it will display the address as well as saying it.”
“This has been a really interesting R&D project. I found the performance is very dependent on how well Alexa handles the user’s speech within the [address] slot. Phrases like “Allies Computing Norwich” or “100 Field Acre Way Long Stratton” convert to text as you would expect. Phrases like “Wymondham [win-dm] Road” or “Happisburgh [hayz-buh-ruh] Road”, for example, are harder for Alexa to convert as intended.”
Tim Stephenson, Head of DevOps, said “This is a great demonstration of one of the more unusual ways to use Postcoder. In this example, the skill can look up a postcode for the first part of an address, and as an added bonus, it even provides the weather for the location using another API. Elliott has done a great job at getting to grips with the technologies involved and helping us to research a novel use case.”
Elliott starts his second year of A-Levels in Computer Science, Maths and Physics in September, and hopes to embark upon a Computer Science degree in 2022. We hope he enjoys the rest of his summer and wish him well with his future studies.