TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Speech recognition, limiting to task context

Forums > SwiftUI

I am adding speech recognition to my app, to perform a specific data entry task. There is a fairly small dictionary of specific words which are valid in the context of the task.

The .contextualString parameter for the recognition request I believe provides additional words for context.

What I want to do is sort of the opposite - I want to suppress words which are not in the list of expected words. For example, the input is looking for the word four, but it returns fore amd for depending on other words its sees before or after. looking for two, and I could get to or too, again, depending on the sequence. Is there a parameter I could add to limit the words appropriate to return for context, or specify a dictionary? other examples are looking for heart and could get art. Lookinf for spade and sometimes get speed. I can manually try to filter and look for multiple things to represent what I am looking for, but want to be sure this isn't available as a parameter feature I just haven't found.

The words are in an array, and I can filter things that they might say that are extraneous, but very efficient.

3      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.