question

Alamzaib-1962 avatar image
0 Votes"
Alamzaib-1962 asked YutongTie-MSFT answered

Video recording turns off when using speech to text Xamarin Forms

I am creating an interview app in which the app is recording a video and the user is using speech to text at the same time. The issue is video recording gets interrupted when speech to text is active maybe it's because speech to text starts using the mic. I am using CameraView from Xamarin Community Toolkit to access camera. The speech to text is from Google built-in SDK. Do I need to open a separate thread or something?

Interview Page XAML:

           Interview Page XAML:
           <xct:CameraView
             x:Name="xctCameraView"
             CaptureMode="Photo"
             CameraOptions="Front"
             MediaCaptured="MediaCaptured"
             HorizontalOptions="FillAndExpand"
             VerticalOptions="FillAndExpand" />

Inter page CS:

  xctCameraView.CaptureMode = CameraCaptureMode.Video;
         xctCameraView.Shutter();

Speech to text in view model:

 try
        {
            _speechRecongnitionInstance = DependencyService.Get<ISpeechToText>();
        }
        catch (Exception ex)
        {
            Answer = ex.Message;
        }
    
        MessagingCenter.Subscribe<ISpeechToText, string>(this, "STT", (sender, args) =>
        {
            SpeechToTextFinalResultReceived(args);
        });
    
        MessagingCenter.Subscribe<ISpeechToText>(this, "Final", (sender) =>
        {
               
        });
    
    
    
        MessagingCenter.Subscribe<IMessageSender, string>(this, "STT", (sender, args) =>
        {
            SpeechToTextFinalResultReceived(args);
        });


This is how I am starting speech to text:

 try
         {
             _speechRecongnitionInstance.StartSpeechToText();
         }
         catch (Exception ex)
         {
             Answer = ex.Message;
         }




not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

YutongTie-MSFT avatar image
0 Votes"
YutongTie-MSFT answered

Hello @Alamzaib-1962

Thanks for reaching out to us here. I am sorry XamarinCommunityToolkit is not supported in this form.

But the engineering team is moderating bugs/question in below repo, please post your question there.

https://github.com/xamarin/XamarinCommunityToolkit


Hope this helps.

Regards,
Yutong

-Please kindly accept the answer if you feel helpful to support the community, thanks.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.