From e9690a63b6cf057a9c1cecae2c080d952b36351f Mon Sep 17 00:00:00 2001 From: jamsch <12927717+jamsch@users.noreply.github.com> Date: Fri, 4 Oct 2024 15:15:11 +1300 Subject: [PATCH] register events --- .../modules/speechrecognition/ExpoSpeechRecognitionModule.kt | 2 ++ ios/ExpoSpeechRecognitionModule.swift | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/expo/modules/speechrecognition/ExpoSpeechRecognitionModule.kt b/android/src/main/java/expo/modules/speechrecognition/ExpoSpeechRecognitionModule.kt index febe4d7..c24e9f3 100644 --- a/android/src/main/java/expo/modules/speechrecognition/ExpoSpeechRecognitionModule.kt +++ b/android/src/main/java/expo/modules/speechrecognition/ExpoSpeechRecognitionModule.kt @@ -86,6 +86,8 @@ class ExpoSpeechRecognitionModule : Module() { "start", // Called when there's results (as a string array, not API compliant) "results", + // Called when the language detection (and switching) results are available. + "languagedetection", ) Function("getDefaultRecognitionService") { diff --git a/ios/ExpoSpeechRecognitionModule.swift b/ios/ExpoSpeechRecognitionModule.swift index b77bd7d..47e2821 100644 --- a/ios/ExpoSpeechRecognitionModule.swift +++ b/ios/ExpoSpeechRecognitionModule.swift @@ -85,7 +85,9 @@ public class ExpoSpeechRecognitionModule: Module { // intent to recognize grammars associated with the current SpeechRecognition "start", // Called when there's results (as a string array, not API compliant) - "result" + "result", + // Called when the language detection (and switching) results are available. + "languagedetection" ) OnCreate {