Skip to content

Easy to use cross platform speech recognition (speech to text) plugin for Xamarin & UWP

License

Notifications You must be signed in to change notification settings

remi-appsolu/speechrecognition

 
 

Repository files navigation

ACR Speech Recognition Plugin for Xamarin & Windows

Easy to use cross platform speech recognition (speech to text) plugin for Xamarin & UWP

Change Log - October 13, 2018

NuGet Build status

Platform Version
iOS 10+
Android 5.x
Windows UWP 16299+
.NET Standard 2.0

SETUP

iOS

Add the following to your

<key>NSSpeechRecognitionUsageDescription</key>  
<string>Say something useful here</string>  
<key>NSMicrophoneUsageDescription</key>  
<string>Say something useful here</string> 

Android

Add the following to your AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

UWP

Add the following to your app manifest

<Capabilities>
	<Capability Name="internetClient" />
 	<DeviceCapability Name="microphone" />
</Capabilities>

HOW TO USE

Request Permission

var granted = await CrossSpeechRecognition.Current.RequestPermission();
if (granted) 
{
    // go!
}

Continuous Dictation

var listener = CrossSpeechRecognition
    .Current
    .ContinuousDictation()
    .Subscribe(phrase => {
        // will keep returning phrases as pause is observed
    });

// make sure to dispose to stop listening
listener.Dispose();

Listen for a phrase (good for a web search)

CrossSpeechRecognition
    .Current
    .ListenUntilPause()
    .Subscribe(phrase => {})

Listen for keywords

CrossSpeechRecognition
    .Current
    .ListenForKeywords("yes", "no")
    .Subscribe(firstKeywordHeard => {})

When can I talk?

CrossSpeechRecognition
    .Current
    .WhenListenStatusChanged()
    .Subscribe(isListening => { you can talk if this is true });

FAQ

Q. Why use reactive extensions and not async?

A. Speech is very event stream oriented which fits well with RX

Q. Should I use CrossSpeechRecognition.Current?

A. Hell NO! DI that sucker using the Instance

Roadmap

  • Multilingual
  • Confidence Scoring
  • Mac Support
  • Start and end of speech eventing
  • RMS detection

About

Easy to use cross platform speech recognition (speech to text) plugin for Xamarin & UWP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 98.7%
  • Batchfile 1.3%