C# Cortana voice activation programmatically





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







3















I am trying to invoke Cortana programmatically.



I am already using this code to start Cortana



await Launcher.LaunchUriAsync(new Uri("bing://home"));



The problem is that in order to make a search you have to click the mic button in Cortana.



I want is that when Cortana starts the user should not be promted to press the mic button in order to make a search. As in Cortana starts listening whenever I want or at least when it opens up.



Is this possible? If so then how?










share|improve this question































    3















    I am trying to invoke Cortana programmatically.



    I am already using this code to start Cortana



    await Launcher.LaunchUriAsync(new Uri("bing://home"));



    The problem is that in order to make a search you have to click the mic button in Cortana.



    I want is that when Cortana starts the user should not be promted to press the mic button in order to make a search. As in Cortana starts listening whenever I want or at least when it opens up.



    Is this possible? If so then how?










    share|improve this question



























      3












      3








      3


      1






      I am trying to invoke Cortana programmatically.



      I am already using this code to start Cortana



      await Launcher.LaunchUriAsync(new Uri("bing://home"));



      The problem is that in order to make a search you have to click the mic button in Cortana.



      I want is that when Cortana starts the user should not be promted to press the mic button in order to make a search. As in Cortana starts listening whenever I want or at least when it opens up.



      Is this possible? If so then how?










      share|improve this question
















      I am trying to invoke Cortana programmatically.



      I am already using this code to start Cortana



      await Launcher.LaunchUriAsync(new Uri("bing://home"));



      The problem is that in order to make a search you have to click the mic button in Cortana.



      I want is that when Cortana starts the user should not be promted to press the mic button in order to make a search. As in Cortana starts listening whenever I want or at least when it opens up.



      Is this possible? If so then how?







      c# windows-phone-8.1 cortana






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 3 at 6:07









      Cœur

      19.3k10116155




      19.3k10116155










      asked Feb 8 '15 at 19:05









      Rizwan AsifRizwan Asif

      708




      708
























          2 Answers
          2






          active

          oldest

          votes


















          3














          It's highly unlikely, due to the privacy concerns with an app developer being able to arbitrarily start recording what the user is saying.






          share|improve this answer































            1














            Have you tried using ContinuousRecognitionSession on Windows 10.



            private SpeechRecognizer speechRecognizer;
            private CoreDispatcher dispatcher;
            private StringBuilder dictatedTextBuilder;

            this.dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
            this.speechRecognizer = new SpeechRecognizer();
            SpeechRecognitionCompilationResult result =

            await speechRecognizer.CompileConstraintsAsync();
            speechRecognizer.ContinuousRecognitionSession.ResultGenerated +=
            ContinuousRecognitionSession_ResultGenerated;

            private async void ContinuousRecognitionSession_ResultGenerated(
            SpeechContinuousRecognitionSession sender,
            SpeechContinuousRecognitionResultGeneratedEventArgs args)
            {

            if (args.Result.Confidence == SpeechRecognitionConfidence.Medium ||
            args.Result.Confidence == SpeechRecognitionConfidence.High)
            {
            dictatedTextBuilder.Append(args.Result.Text + " ");

            await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
            dictationTextBox.Text = dictatedTextBuilder.ToString();
            btnClearText.IsEnabled = true;
            });
            }
            else
            {
            await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
            dictationTextBox.Text = dictatedTextBuilder.ToString();
            });
            }
            }


            Here is the complete example



            Considering integrate your app using Cortana on foreground too. Take a look here






            share|improve this answer
























            • Yes I am aware of the speechrecognizer and how to integrate Cortana in an app. My requirement was different, I wanted to invoke Cortana through bluetooth or through another app. But She never starts listening on it's own unless the speaker button is pushed or more recently, you say "Hey Cortana!"

              – Rizwan Asif
              Aug 11 '15 at 12:14












            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f28398098%2fc-sharp-cortana-voice-activation-programmatically%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            It's highly unlikely, due to the privacy concerns with an app developer being able to arbitrarily start recording what the user is saying.






            share|improve this answer




























              3














              It's highly unlikely, due to the privacy concerns with an app developer being able to arbitrarily start recording what the user is saying.






              share|improve this answer


























                3












                3








                3







                It's highly unlikely, due to the privacy concerns with an app developer being able to arbitrarily start recording what the user is saying.






                share|improve this answer













                It's highly unlikely, due to the privacy concerns with an app developer being able to arbitrarily start recording what the user is saying.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 3 '15 at 10:09









                Kristian WilliamsKristian Williams

                1,8291622




                1,8291622

























                    1














                    Have you tried using ContinuousRecognitionSession on Windows 10.



                    private SpeechRecognizer speechRecognizer;
                    private CoreDispatcher dispatcher;
                    private StringBuilder dictatedTextBuilder;

                    this.dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
                    this.speechRecognizer = new SpeechRecognizer();
                    SpeechRecognitionCompilationResult result =

                    await speechRecognizer.CompileConstraintsAsync();
                    speechRecognizer.ContinuousRecognitionSession.ResultGenerated +=
                    ContinuousRecognitionSession_ResultGenerated;

                    private async void ContinuousRecognitionSession_ResultGenerated(
                    SpeechContinuousRecognitionSession sender,
                    SpeechContinuousRecognitionResultGeneratedEventArgs args)
                    {

                    if (args.Result.Confidence == SpeechRecognitionConfidence.Medium ||
                    args.Result.Confidence == SpeechRecognitionConfidence.High)
                    {
                    dictatedTextBuilder.Append(args.Result.Text + " ");

                    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                    dictationTextBox.Text = dictatedTextBuilder.ToString();
                    btnClearText.IsEnabled = true;
                    });
                    }
                    else
                    {
                    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                    dictationTextBox.Text = dictatedTextBuilder.ToString();
                    });
                    }
                    }


                    Here is the complete example



                    Considering integrate your app using Cortana on foreground too. Take a look here






                    share|improve this answer
























                    • Yes I am aware of the speechrecognizer and how to integrate Cortana in an app. My requirement was different, I wanted to invoke Cortana through bluetooth or through another app. But She never starts listening on it's own unless the speaker button is pushed or more recently, you say "Hey Cortana!"

                      – Rizwan Asif
                      Aug 11 '15 at 12:14
















                    1














                    Have you tried using ContinuousRecognitionSession on Windows 10.



                    private SpeechRecognizer speechRecognizer;
                    private CoreDispatcher dispatcher;
                    private StringBuilder dictatedTextBuilder;

                    this.dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
                    this.speechRecognizer = new SpeechRecognizer();
                    SpeechRecognitionCompilationResult result =

                    await speechRecognizer.CompileConstraintsAsync();
                    speechRecognizer.ContinuousRecognitionSession.ResultGenerated +=
                    ContinuousRecognitionSession_ResultGenerated;

                    private async void ContinuousRecognitionSession_ResultGenerated(
                    SpeechContinuousRecognitionSession sender,
                    SpeechContinuousRecognitionResultGeneratedEventArgs args)
                    {

                    if (args.Result.Confidence == SpeechRecognitionConfidence.Medium ||
                    args.Result.Confidence == SpeechRecognitionConfidence.High)
                    {
                    dictatedTextBuilder.Append(args.Result.Text + " ");

                    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                    dictationTextBox.Text = dictatedTextBuilder.ToString();
                    btnClearText.IsEnabled = true;
                    });
                    }
                    else
                    {
                    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                    dictationTextBox.Text = dictatedTextBuilder.ToString();
                    });
                    }
                    }


                    Here is the complete example



                    Considering integrate your app using Cortana on foreground too. Take a look here






                    share|improve this answer
























                    • Yes I am aware of the speechrecognizer and how to integrate Cortana in an app. My requirement was different, I wanted to invoke Cortana through bluetooth or through another app. But She never starts listening on it's own unless the speaker button is pushed or more recently, you say "Hey Cortana!"

                      – Rizwan Asif
                      Aug 11 '15 at 12:14














                    1












                    1








                    1







                    Have you tried using ContinuousRecognitionSession on Windows 10.



                    private SpeechRecognizer speechRecognizer;
                    private CoreDispatcher dispatcher;
                    private StringBuilder dictatedTextBuilder;

                    this.dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
                    this.speechRecognizer = new SpeechRecognizer();
                    SpeechRecognitionCompilationResult result =

                    await speechRecognizer.CompileConstraintsAsync();
                    speechRecognizer.ContinuousRecognitionSession.ResultGenerated +=
                    ContinuousRecognitionSession_ResultGenerated;

                    private async void ContinuousRecognitionSession_ResultGenerated(
                    SpeechContinuousRecognitionSession sender,
                    SpeechContinuousRecognitionResultGeneratedEventArgs args)
                    {

                    if (args.Result.Confidence == SpeechRecognitionConfidence.Medium ||
                    args.Result.Confidence == SpeechRecognitionConfidence.High)
                    {
                    dictatedTextBuilder.Append(args.Result.Text + " ");

                    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                    dictationTextBox.Text = dictatedTextBuilder.ToString();
                    btnClearText.IsEnabled = true;
                    });
                    }
                    else
                    {
                    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                    dictationTextBox.Text = dictatedTextBuilder.ToString();
                    });
                    }
                    }


                    Here is the complete example



                    Considering integrate your app using Cortana on foreground too. Take a look here






                    share|improve this answer













                    Have you tried using ContinuousRecognitionSession on Windows 10.



                    private SpeechRecognizer speechRecognizer;
                    private CoreDispatcher dispatcher;
                    private StringBuilder dictatedTextBuilder;

                    this.dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
                    this.speechRecognizer = new SpeechRecognizer();
                    SpeechRecognitionCompilationResult result =

                    await speechRecognizer.CompileConstraintsAsync();
                    speechRecognizer.ContinuousRecognitionSession.ResultGenerated +=
                    ContinuousRecognitionSession_ResultGenerated;

                    private async void ContinuousRecognitionSession_ResultGenerated(
                    SpeechContinuousRecognitionSession sender,
                    SpeechContinuousRecognitionResultGeneratedEventArgs args)
                    {

                    if (args.Result.Confidence == SpeechRecognitionConfidence.Medium ||
                    args.Result.Confidence == SpeechRecognitionConfidence.High)
                    {
                    dictatedTextBuilder.Append(args.Result.Text + " ");

                    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                    dictationTextBox.Text = dictatedTextBuilder.ToString();
                    btnClearText.IsEnabled = true;
                    });
                    }
                    else
                    {
                    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                    dictationTextBox.Text = dictatedTextBuilder.ToString();
                    });
                    }
                    }


                    Here is the complete example



                    Considering integrate your app using Cortana on foreground too. Take a look here







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Aug 4 '15 at 16:41









                    talkitbrtalkitbr

                    1,079711




                    1,079711













                    • Yes I am aware of the speechrecognizer and how to integrate Cortana in an app. My requirement was different, I wanted to invoke Cortana through bluetooth or through another app. But She never starts listening on it's own unless the speaker button is pushed or more recently, you say "Hey Cortana!"

                      – Rizwan Asif
                      Aug 11 '15 at 12:14



















                    • Yes I am aware of the speechrecognizer and how to integrate Cortana in an app. My requirement was different, I wanted to invoke Cortana through bluetooth or through another app. But She never starts listening on it's own unless the speaker button is pushed or more recently, you say "Hey Cortana!"

                      – Rizwan Asif
                      Aug 11 '15 at 12:14

















                    Yes I am aware of the speechrecognizer and how to integrate Cortana in an app. My requirement was different, I wanted to invoke Cortana through bluetooth or through another app. But She never starts listening on it's own unless the speaker button is pushed or more recently, you say "Hey Cortana!"

                    – Rizwan Asif
                    Aug 11 '15 at 12:14





                    Yes I am aware of the speechrecognizer and how to integrate Cortana in an app. My requirement was different, I wanted to invoke Cortana through bluetooth or through another app. But She never starts listening on it's own unless the speaker button is pushed or more recently, you say "Hey Cortana!"

                    – Rizwan Asif
                    Aug 11 '15 at 12:14


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f28398098%2fc-sharp-cortana-voice-activation-programmatically%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    MongoDB - Not Authorized To Execute Command

                    How to fix TextFormField cause rebuild widget in Flutter

                    in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith