Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8124745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:33:52+00:00 2026-06-06T06:33:52+00:00

I am trying to implement a voice-cue system for a client where they can

  • 0

I am trying to implement a voice-cue system for a client where they can assign a word or a phrase to a slide in PowerPoint, and when they speak that word or phrase, the slide advances. Here is the code I am using to create the grammar (I use Microsoft’s SpeechRecognitionEngine for the actual work).

Choices choices = new Choices();
string word = speechSlide.Scenes[speechSlide.currentslide].speechCue;
if (word.Trim() != "")
{
    choices.Add(word);
    GrammarBuilder builder = new GrammarBuilder(choices);
    Grammar directions = new Grammar(builder);
    return directions;
}

I tried raising the threshold for the confidence, however I still get too many false positives. Is there a way to improve the grammar? Something tells me that adding only one word to the grammar acceptance list is what is provoking all the false positives.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:33:54+00:00Added an answer on June 6, 2026 at 6:33 am

    Here is what I came up with:

    As @Michael Levy said, the computer doesn’t do much work when you give it one word to listen for. It basically just listens for when the audio levels hit a certain value, then assumes it must be that word. So I decided that I must give it other words that SOUND opposite. Now my goal was not to spend weeks research phonetics and figure out a perfect algorithm to determine words that sound far away from the word I am trying to match, so I decided to focus on the first letter. Here is the order of operations:

    1. Extract the trigger word to progress slides from the XML file
    2. Find first letter of word
    3. Find 3 letters that are most unlike the sound of the letter found in step 2
    4. Find 4 words of varying length, syllable count, end sound, and second letter that begin with each of the three letters found in step 3
    5. Add all 12 words found in step 4 to the choices list, along with the trigger word. There are now 13 words. One is the word we found, and the other 12 sound nothing like the word. So the computer will be darn sure that it is correct before it fires any event handlers 🙂

    Now to determine the opposite letters, I posted a question here, but it got shut down before I got any useful advice ): I don’t know why, I checked the FAQ and it seems I was in the terms described there. I decided to poll my family and friends, and our combined brainpower came up with a list of opposites. Each letter has 3 letters that sound the furthers away from the original letter sound as possible.

    The last step was to find words for each of these letters. I found four words per letter, for a total of 104 words. I wanted words of varying length, second letter, and end sound, so that I could cover all my bases and “distract” the computer away from the target word as much as possible. I used this University Vocab List to come up with big words, and used my puny English-mind to come up with words <5 letters, and in the end I felt I had a good list. I formatted it in XML, added the parsing code, and checked the results….. Much better! Almost too good! No false positives, and somebody with poor articulation will have a hard time using my program! I will make it a little easier, perhaps by removing the number of distraction words, but overall I was very pleased with the results, and appreciate the suggestions by @Michael Levy and @Kevin Junghans

    Code:

    <?xml version="1.0" encoding="utf-8" ?>
    <list>
      <a opposite="m,q,n">abnegate,apple,argent,axe</a>
      <b opposite="k,l,s">berate,barn,bored,battology</b>
      <c opposite="v,r,j">chrematophobia,cremate,cease,camoflauge</c>
      <d opposite="l,q,w">dyslogy,distemper,dog,dilligent</d>
      <e opposite="j,n,k">exoteric,esoteric,enumerate,elongate</e>
      <f opposite="g,i,t">flagitious,flatulate,fart,funeral</f>
      <g opposite="f,v,z">gracile,grace,garner,guns</g>
      <h opposite="q,d,x">hebetate,health,habitat,horned</h>
      <i opposite="m,n,f">isomorphic,inside,iterate,ill</i>
      <j opposite="c,e,x">jape,juvenescent,jove,jolly</j>
      <k opposite="l,w,v">kinetosis,keratin,knack,kudos</k>
      <l opposite="b,d,g">lactate,lord,limaceous,launder</l>
      <m opposite="v,i,f">malaria,mere,morbid,murcid</m>
      <n opposite="h,r,v">name,nemesis,noon,nuncheon</n>
      <o opposite="b,n,j">orarian,opiate,opossum,oculars</o>
      <p opposite="n,m,d">pharmacist,phylogeny,pelt,puny</p>
      <q opposite="d,h,f">query,quack,quick,quisquous</q>
      <r opposite="c,f,x">random,renitency,roinous,run</r>
      <s opposite="b,y,d">sand,searing,sicarian,solemn,</s>
      <t opposite="l,m,f">tart,treating,thunder,thyroid</t>
      <u opposite="f,g,j">unasinous,unit,ulcer,unthinkable</u>
      <v opposite="c,k,m">version,visceral,vortex,vulnerable</v>
      <w opposite="d,k,n">wand,weasiness,whimsical,wolf</w>
      <x opposite="m,l,p">xanthopsia,xanthax,xylophone,xray</x>
      <y opposite="s,j,d">yellow,york,yuck,ylem</y>
      <z opposite="m,n,g">zamboni,zip,zoology,zugzwang </z>
    </list>
    

    Parsing code:

        private Dictionary<string, List<string>> opposites;
        private Dictionary<string, List<string>> words = new Dictionary<string, List<string>>();
    
        private void StartSpeechRecognition(Media_Slide slide)
        {
            if (opposites == null)
            {
                opposites = new Dictionary<string, List<string>>();
                System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
                string file = System.IO.Path.GetDirectoryName(Assembly.GetAssembly(typeof(MainWindow)).CodeBase).Remove(0, 6) + "\\buzzlist.xml";
                doc.Load(file);
                foreach (System.Xml.XmlNode node in doc.ChildNodes[1].ChildNodes)
                {
                    opposites.Add(node.Name, new List<string>(node.Attributes[0].InnerText.Split(',')));
                    words.Add(node.Name, new List<string>(node.InnerText.Split(',')));
                }
            }
    
            speechSlide = slide;
            rec = new SpeechRecognitionEngine();
            rec.SpeechRecognized += rec_SpeechRecognized;
            rec.SetInputToDefaultAudioDevice();
            try
            {
                rec.LoadGrammar(GetGrammar());
                rec.RecognizeAsync(RecognizeMode.Multiple);
            }
            catch
            {
            }
        }
    

    Checking code:

    void rec_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
        {
            if (e.Result.Text == speechSlide.Scenes[speechSlide.currentslide].speechCue)
            {
                rec.UnloadAllGrammars();
                ScreenSettings.NextSlide(speechSlide);
                try
                {
                    rec.LoadGrammar(GetGrammar());
                }
                catch
                {
                    rec.RecognizeAsyncCancel();
                }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to implement a rating system of users and postings. What is the best
when trying to implement an Aspect, that is responsible for catching and logging a
Possible Duplicate: How can I implement voice recognition into my iOS app? I am
Well i am trying to implement basic functionality of voice recording , like Record
I am trying to implement a simple UDP client and server. Server should receive
SetFocus I'm trying implement the above Se Focus code in a Class Library that
I've been trying to determine whether I can implement AJAX & SSL, so this
Trying to implement a MSMQ-backed WCF PubSub. I understand that net.msmq is one-way; however
I am trying to implement a simple encrypted file system for all usb storage
Trying to implement a timer for my game that I'm making. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.