Alan2
Alan2

Reputation: 24572

Is there any way to detect speech in a Xamarin Forms application?

I would like to find out if there's a way for my application to listen to speech from a user such as when they say the words "yes" or "no". Has anyone implemented anything like this in iOS, Android or Forms code. Anyone have any suggestions as to how this could be done or if it's possible?

Upvotes: 0

Views: 182

Answers (2)

Ivan I
Ivan I

Reputation: 9990

Xamarin Forms is just an abstraction of the user interface, it doesn't offer any additional cross platform APIs. Xamarin.iOS and Xamarin.Android do implement some cross platform APIs, but only general .NET APIs and they don't include speech to text APIs.

So you can use either native methods: https://devblogs.microsoft.com/xamarin/speech-recognition-in-ios-10/ and https://learn.microsoft.com/en-us/xamarin/android/platform/speech , or eventually find some package that abstracts them to cross platform APIs.

Upvotes: 1

Patrick Goode
Patrick Goode

Reputation: 1452

This can be achieved using the Microsoft Speech API

https://learn.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/cognitive-services/speech-recognition

The Microsoft Cognitive Services are a set of fully manned endpoints in Azure offering a range of AI related functionality. The endpoints are accessible over REST. The link contains a sample in a XF app

Upvotes: 2

Related Questions