From b7e40cfb6b201e7c7f771eefbca988bd5cf814ba Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Thu, 2 Nov 2023 16:22:31 -0700 Subject: [PATCH] Enable Speech Recognition on IPhone --- src/apps/call/CallWizard.tsx | 5 +++-- src/common/components/useCapabilities.ts | 1 + src/common/components/useSpeechRecognition.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/apps/call/CallWizard.tsx b/src/apps/call/CallWizard.tsx index 7736f06c5..6081f936c 100644 --- a/src/apps/call/CallWizard.tsx +++ b/src/apps/call/CallWizard.tsx @@ -152,9 +152,10 @@ export function CallWizard(props: { strict?: boolean, conversationId: string, ch } text={ - (overriddenRecognition ? 'Speech recognition should be good to go.' : 'There might be a speech recognition issue.') + ((overriddenRecognition && !recognition.warnings.length) ? 'Speech recognition should be good to go.' : 'There might be a speech recognition issue.') + (recognition.isApiAvailable ? '' : ' Your browser does not support the speech recognition API.') - + (recognition.isDeviceNotSupported ? ' Your device does not provide this feature (IPhone?).' : '') + + (recognition.isDeviceNotSupported ? ' Your device does not provide this feature.' : '') + + (recognition.warnings.length ? ' ⚠️ ' + recognition.warnings.join(' · ') : '') } button={overriddenRecognition ? undefined : (