Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options.
See more
See less

How to utilize MS SAPI and Homeseer Speaker

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to utilize MS SAPI and Homeseer Speaker

    A quickie historical via Wiki
    Microsoft Speech API

    Homeseer 2 SAPI / Speaker.exe help file.

    Here is a clip and paste from the Homeseer 2 TTS / VR...this stuff should be in the Homeseer 3 documentation if it is not today (just one short paragraph relating to TTS / VR and then another paragraph relating to Amazon Echo / Google Voice).

    I'll move this post to the help section and refer to it here.

    Text-to-Speech Support and Voice Recognition

    HomeSeer supports automatic speech recognition (ASR, or voice recognition) and text-to-speech (TTS) technologies so that you can command it by voice and hear responses using speech. The underlying foundation for both of these capabilities is SAPI5, the latest generation of the Speech API by Microsoft. With SAPI5, any compatible ASR or TTS engine can be used with HomeSeer. HomeSeer includes an ASR engine and some TTS voices that are also provided by Microsoft.

    HomeSeer supports two different text-to-speech interfaces; SAPI4 and SAPI5. SAPI is simply a programming interface. Text-to-speech engines (voices) normally support one or both interfaces. There are many voices available for SAPI4, so HomeSeer continues to support this interface.

    HomeSeer Voices, which are an add-on product for HomeSeer, provide concatenated text-to-speech technology for use with HomeSeer. Concatenated speech TTS provides the best quality speech as it uses real human voices that were recorded, stored in a database, and then are quickly put together (concatenated) to form words to be spoken. The result is that a real human voice is speaking the words that you tell it to speak.

    Voice Recognition

    HomeSeer listens for an attention phrase, acknowledges the attention phrase, and then listens for commands. You must speak the attention phrase first. If you don't, commands will be ignored.

    Go to the Speaker Options screen.

    Left-click on the Enable field so that a checkmark appears (this enables the voice recognition feature for that Speaker Client).

    Enter an attention phrase, such as Computer. You will need to say this phrase whenever you want the computer to listen for your voice commands. The computer will respond with an acknowledgement and will start listening for commands. Be careful what you enter for the attention phrase, as the computer will always be listening for this and may hear this phrase in background noise. If you set an ignore phrase, the computer will continue to listen for commands until it hears the ignore phrase. This allows the following conversation:

    You: Computer

    HomeSeer: Yes, sire
    The computer is now listening for all your voice commands

    You: Turn on the table lamp

    HomeSeer: Turn on the table lamp

    You: Turn on the TV

    HomeSeer: Turn on the TV

    You (speaking the ignore phrase): Goodbye

    HomeSeer: (speaking the ignore acknowledge phrase): Goodbye, sir
    The computer now goes back to listening only for the attention phrase

    When creating devices and events, you can set an option to have HomeSeer ask for confirmation for each voice command. Go to the Add Device and Event Properties screens for additional information.

    Using scripts, you can interact with your computer. Through the scripting interface you can add your own voice commands that are active for as long as the script is running. See the stock_quote.txt script for examples (located at C:\Program Files\HomeSeer 2\scripts by default). This script retrieves stock quotes from the Internet.

    Acknowledge phrases may be text or a WAV file. If you would like your acknowledge phrase to be a WAV file, enter the complete path to the file in the Acknowledge Phrase text box. For example: C:\Data\My WAVs\Yes-Sire.wav.

    Voice Commands

    Devices and Events

    Click here for Messaging and Phone Voice Commands
    Click here for information on how to format voice recognition commands in events and scripts

    There are many different voice control commands available in HomeSeer. Before discussing the device, event, and reminder specific commands, there are some time modifiers that apply to each of those which should be discussed first. In all of the format descriptions listed here, words or phrases enclosed in brackets ([ and ]) are optional. Multiple choices of required words or phrases are shown enclosed in < and > symbols. For example, the phrase diagram "Turn [the] light <on | off>" indicates that you can speak Turn the light on, Turn light on, Turn the light off, or Turn light off.

    The General tab of the Setup pages has three settings related to voice commands and are:

    Speak Recognized Voice Commands

    When this option is set to Yes, commands that you speak are spoken back to you by HomeSeer. This is not a confirmation, the command is carried out, but this will let you know if HomeSeer heard what you wanted it to hear.

    Confirm "All" type voice commands (e.g. Turn On All Family Room Lights)
    If this option is set to Yes, you will get a confirmation question prior to HomeSeer carrying out any "All" location device commands.

    "Confirm "In" and "On" voice commands even if the device confirmation is turned off
    When this option is set to "Yes", a command such as "In 20 minutes turn on the kitchen light" will be confirmed even if the kitchen light device is not set for voice recognition confirmation.

    Time Command Modifiers

    Many of the commands the system supports allow you to delay the start of the command or provide a time period until the command is reversed. These are time modifiers and take one of these forms:

    Future Time Period

    in <1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|30|40|50 |60|70|80|90> <seconds|second|minutes|minute|hours|hour|days|day>

    Example: in 20 minutes
    in 2 hours


    for <1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|30|40|50 |60|70|80|90> <seconds|second|minutes|minute|hours|hour|days|day>

    Example: for 15 minutes
    for 1 hour

    Future Day

    [next] <today|tomorrow|Monday|Tuesday|Wednesday|Thursday|Friday|Sat urday|Sunday>

    Your computer's globalization settings will replace the above day names with the ones used on your system.

    Example: tomorrow
    Next Wednesday

    Future Time

    at <1|2|3|4|5|6|7|8|9|10|11|12> [<oh clock|oh>] [<1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16...58|59>]
    <AM|PM|In The Morning|In The Afternoon|In The Evening>

    Example: at 6 oh 4 in the evening (means: 6:04 PM)
    at 3 oh clock in the afternoon (means: 3:00 PM)
    at 11 45 PM (means: 11:45 PM)

    Future Date

    [<this month|next month> [on]] [on <January|February|March|April...December>] [the] <first|second|third|fourth...thirtieth|thirty first>

    Your computer's globalization settings will replace the above month names with the ones used on your system.

    Example: next month on the twentieth
    on April first
    this month on the twenty second

    Device Commands

    In the device properties for each device, enable this option (checkmark visible) if you want to be able to control the device by voice. A voice command will be created in the following formats (Note: You can also specify confirmation of voice commands per device on the device properties page.)

    For all devices:

    [<turn|shut>] [on] [off] [the] [<device location|device location2|device location location2>] name [on] [off]

    Example: turn on the master bedroom light
    turn the master bedroom light on
    shut off the family room reading lamp
    turn off the first floor family room reading lamp

    For dimmable devices

    [set] [dim] [bright] [raise] [the] [<device location|device location2|device location location2>] name [by] [to]
    <1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|25|30|35 |40|45|50|55|60|65|70|75|80|85|90|95|100> [percent]

    Example: set the master bedroom light to 50 percent
    raise the family room light to 55 percent
    increase the front porch light by 10 percent

    For all devices - Status

    get [the] status of [the] [<device location|device location2|device location location2>] name


    <check|what is|what's> [the] status of [the] [<device location|device location2|device location location2>] name


    <check|what is|what's> [the] [<device location|device location2|device location location2>] name <at|status>

    Example: get the status of family room light
    what's the status of the family room light
    what is the the family room light status
    what's the security system at

    For all locations - All Lights

    <turn|shut> <on|off> all <device location|device location2|device location location2> lights


    <turn|shut> [all] [the] <device location|device location2|device location location2> lights <on|off>

    Example: shut off all family room lights
    turn off all first floor lights
    turn off all first floor family room lights
    shut all master bedroom lights off

    Event Commands

    Events allow you to configure the voice command for the event in the event properties. You can trigger an event to be run by speaking the event trigger command, or using the syntax below with the event name. Events do not have to have a voice command, but if you wish to command them by voice or by voice using the event name, then the event must be enabled for voice command via microphone, telephone, or both. If you enable an event for voice command by microphone but do not enter a voice command, you will still be able to run the event by voice using the event name.

    By event command

    event command string

    By event name

    run event event name

    Reminder Commands

    Reminders use the dictation capabilities of the voice recognition engine to allow you to speak anything after the reminder keyword(s). You should be aware, however, that the VR dictionary will not have some words that you may wish to be spoken such as proper names. For example, the dictation engine would not recognize 'George', and although they sound alike, the name Harry would be recognized as hairy. HomeSeer Technologies may provide a way for you to add words to the dictionary at a later date. Reminders only work with the time modifiers above - they cannot be spoken by themselves. Here is the syntax for a reminder without the time modifier:

    <reminder|remind me> [<to|that>] dictation list

    Example: remind me to go to the store
    remind me to pick up the dry cleaning
    reminder take the garbage to the curb

    Using the "Voice Reminders" configuration page, you can set up reminder labels and associated destination remind methods. For example, you can create a reminder method where the label is "my wife via phone" and configure it to deliver the reminder via a phone call. If this is set up, then the syntax for reminders becomes:

    <reminder for label|reminder|remind label|remind me> [<to|that>] dictation list
    ('label' in the above is replaced with one of the voice reminder names/labels that you created on the Voice Reminders page.)

    Example: remind my wife via phone that it is time for the appointment
    reminder for Karen to please stop at the store and get some eggs

    Cancel Commands

    When a time modifier is used with a device or event command, it will result in an event being created in HomeSeer to carry out the command. These events are created in the "Delayed Voice Actions" group. You can use the HomeSeer Web UI to delete these events or run them earlier, but to cancel the future commands for a device or event by voice, use the cancel commands described here. These commands will only cancel future device and event commands that were created with a voice command (i.e. Only the events in the Delayed Voice Actions group.)

    cancel [the] [delayed] [action] [for] [the] event event name


    cancel [the] [delayed] [action] [for] [the] [event] event command

    or (for devices)

    cancel [the] [delayed] [action] [for] [the] [<device location|device location2|device location location2>] name

    Example: (assume an event called "Party Mode Start" has a trigger command of "Let's get the party started"
    cancel the event Party Mode Start
    cancel Let's get the party started
    cancel the delayed action for master bedroom light

    Putting It All Together

    The device, device all, and event commands all operate standalone as well as with certain time modifiers. The reminders only work with a time modifier. Here is the list of all of the commands with the time modifiers they can work with - this is the list of all of the voice command types supported in the system (telephone voice recognition adds voice commands for working with mailboxes and messaging and are listed elsewhere).
    Device On/Off, Dim, Status and "All" Location Commands


    turn off the kitchen light

    Status Command

    what is the status of the kitchen light

    All Command

    shut off all first floor lights

    Future Time Period Command

    in 20 minutes turn on the kitchen light

    Future Time Period Command Duration

    in 20 minutes turn on the kitchen light for 2 hours

    Future Time Command

    at 6 PM turn on the kitchen light

    Future Time Command Duration

    at 6 PM turn on the kitchen light for 20 minutes

    Future Day Future Time Command

    on Wednesday at 4 15 PM turn on the kitchen light

    Future Day Future Time Command Duration

    on Wednesday at 4 15 PM turn on the kitchen light for 30 seconds

    Future Date Future Time Command

    next month on the twenty first at 3 in the afternoon turn on the kitchen light

    Future Date Future Time Command Duration

    April first at 11 AM turn on the kitchen light for 45 minutes

    Event Commands


    run event Party Time

    Future Time Period Command

    in 20 minutes run event Party Time

    Future Time Command

    at 6 PM Let's get the party started

    Future Day Future Time Command

    on Wednesday at 4 15 PM run event Guest Lighting

    Future Date Future Time Command

    next month on the twenty first at 3 in the afternoon Let's get the party started

    Reminder Commands

    Future Time Period Reminder

    in 20 minutes remind me to go pick up the kids

    Future Time Reminder

    at 6 PM remind Karen via phone to leave for the meeting

    Future Day Future Time Reminder

    on Wednesday at 4 15 PM reminder to stop at the cleaners on the way home

    Future Date Future Time Reminder

    next month on the twenty first at 3 in the afternoon remind me to bake a cake

    Cancel Commands

    Event Cancel Command

    Cancel the delayed event Party Time

    Device Cancel Command

    Cancel the family room light

    Messaging and Phone Voice Commands

    If you have HomeSeer Phone installed, there are additional commands available to work with voicemail messages and to place calls using the information in your HomeSeer Phone Address Book.

    When you are using voice recognition via the telephone, there is an additional command available that is not available via the microphone, and that is "help" - speak this to get a list of the basic commands you can use while accessing HomeSeer via the phone.

    After accessing HomeSeer via the phone using the local-access method (pick up a phone in the house and press the pound [#] key) or from a phone outside the house (* and # when you hear your greeting, then enter a mailbox passcode when prompted), here are the commands available to you:
    Messaging and Phone Voice Commands

    To leave a message for somebody in their voice mailbox

    Syntax: Leave a message for (mailbox name)
    Example: "Leave a message for Mom"
    You can abort the recording at any time by pressing any key on the telephone keypad.
    To learn more about leaving messages, see Leaving Voice Messages

    To leave a message in the default voice mailbox

    Syntax: Leave a message
    Example: "Leave a message"
    You can abort the recording at any time by pressing any key on the telephone keypad.
    To learn more about leaving messages, see Leaving Voice Messages

    To access your voicemail messages

    Syntax: Messages
    Example: "Messages"
    If you accessed the system locally which does not prompt for a mailbox password, the system will prompt you to enter a mailbox number to read messages from.
    To learn more about retrieving messages remotely, see Remote Message Retrieval

    To call a person in your address book at their home phone number

    Syntax: Call (person name)
    Example: "Call Bill Smith"

    To call a person in your address book at one of their other numbers

    Syntax: Call (person name) at [the] (number field name)
    Examples: "Call Bill Smith at the second home number"
    "Call Bill Smith at work"
    "Call Bill Smith at the second work number"
    "Call Bill Smith's cell phone"
    "Call Bill Smith's second cell phone"

    To call a person not in your address book using their phone number

    Syntax: Dial (digits of the phone number)
    Example: "Dial 6 0 3 5 5 5 1 2 1 2"

    Attention Phrases

    Attention phrases may be a single word or a group of words. Try different words to find the one that works best for you. Simple words are not recommended as they can cause false recognitions. You can allow optional words by using brackets ("[") around the words. For example, suppose you wanted the computer to respond to "computer" OR "hey you". The attention phrase would be:

    [computer] [hey you]

    See Formatting Voice Commands for information on special characters used in constructing voice commands.

    Note that HomeSeer automatically raises the recognition confidence level of the attention phrase. This helps to keep the computer from thinking it heard the attention phrase when background noise is present. The confidence level is raised by adding a plus character (+) character to the beginning of the attention word.

    Controlling When HomeSeer is Listening

    After you give the attention phrase, HomeSeer awaits a voice command. After you give a voice command, HomeSeer then goes back to listening for the attention phrase. If you want to continue to give voice commands, set an "ignore phrase" in the options. HomeSeer will then continue listening for commands until the ignore phrase is heard. When it hears the ignore phrase, it will return to listening for the attention phrase only. There is also a timeout associated with the ignore phrase; the default timeout period is 30 seconds. If no command is given after 30 seconds, it will then automatically return to listening for the attention phrase. The timeout is set in the Speaker Client Options screen and must be in the range 1 to 60 seconds. This timeout can also be disabled. This time out is useful for situations where an attention phrase was accidentally detected and no one was around to cancel it or if you said the attention word and then walked away without saying the ignore phrase. This will reduce the chances of a false trigger.

    The Voice Reminders Setup Page

    This screen allows you to configure labels/names and destinations for use with HomeSeer's voice recognition based reminders. (See Voice Commands for more information.)

    On this screen you enter the label or name that you wish to speak as part of the reminder, and that label or name contains the rest of the reminder destination information which will be used to deliver the message.

    Use the Add/Remove buttons on the end of the rows to add new entries or remove existing entries. To make a change to an existing entry, change the text or selections and then click the 'Submit Changes' button.

    Formatting Voice Commands

    There are some tricks you can use to format voice commands.

    For instance, say you would like to give a command that changes your television to a specific channel. You could do this by creating a voice command for every possible channel, but that's impractical. Instead, your voice command can contain ranges of words. The recognition engine will accept any one of the words. The command that will change your television to any channel would look like this:

    TV channel (0|1|2|3|4|5|6|7|8|9)+

    This configuration will accept any command like "tv channel 0 1", or "tv channel 1 3 6". You can substitute the actual word for the number in the command like this:

    TV channel (zero|one|two) etc.

    It works the same either way.

    Nested parentheses "()" and brackets "[]" are not allowed. For example, the following configuration will not work: (hello|(bill|sue))

    Special Characters and Alternative Strings

    The string expression you supply can include square bracket characters ([ ]) to indicate optional words and vertical bar characters, (|) to indicate alternative strings. Alternates must be enclosed in parentheses. For example, "(hello [there] | hi)" tells the speech engine to accept "hello," "hello there," or "hi" for the command. Remember to include appropriate spaces between the text that's in brackets or parentheses and the text that's not in brackets or parentheses.

    You can use the star (*) operator to specify zero or more instances of the words included in the group or the plus (+) operator to specify one or more instances. For example, the following expression results in grammar that supports "try this", "please try this", and "please please try this", with unlimited iterations of "please":

    please* try this

    Note: Alternatively, a question mark (?) in front of a word is the same as an asterisk behind the word.
    Ex: ?please try this

    The following grammar format excludes "try this" because the + operator defines at least one instance of "please":

    please+ try this

    The repetition operators follow normal rules of precedence and apply to the immediately preceding text item. For example, the following grammar results in "New York" and "New York York", but not "New York New York":

    New York+

    Therefore, you typically want to use these operators with the grouping characters. For example, the following grammar includes both "New York" and "New York New York":

    (New York)+

    Repetition operators are useful when you want to compose an expression that includes a repeated sequence such as a phone number or specification of a list of items:

    call (one|two|three|four|five|six|seven|eight|nine|zero|oh)*

    Id like (cheese|pepperoni|pineapple|canadian bacon|mushrooms|and)+

    Although the operators can also be used with the optional square brackets grouping character, doing so may reduce the efficiency of the Speaker Client as it processes the grammar.

    Word Spotting

    You can also use ellipses (…) to support word spotting. Word spotting is where you tell the speech recognition engine to ignore words spoken in this position in the phrase (sometimes called garbage words). When you use ellipses, the speech engine recognizes only specific words in the string regardless of whether they're spoken with adjacent words or phrases. For example, if you set this property to "[…] check mail […]", the speech recognition engine will match phrases like "please check mail" or "check mail please" to this command. Ellipses can be used anywhere within a string.

    Be careful using this technique as voice settings with ellipses may increase the potential of unwanted matches.


    When you need to recognize one or more of several possible words in a row, and you do not know how many of these words will be spoken, you may wish to enable the dictation mode of the voice recognition engine. The dictation mode is not designed for the purposes of dictating a memo, but rather for situations such as what is described above. A good example of a use for the dictation functionality is the sample shopping list script that is available from the HomeSeer Updater. Click here for more information about the dictation tag in voice recognition.
    Tips and Suggestions

    When defining the expression for your command, include at least one word that is required; that is, avoid supplying only optional words.

    Make sure that the word includes only pronounceable words and letters. For numbers, it is better to spell out the word than use an ambiguous representation. For example, "345" is not a good grammar form. Similarly, instead of "IEEE", use "I triple E".

    Omit any punctuation or symbols. For example, instead of "the #1 $10 pizza!” use "the number one ten dollar pizza". Including non-pronounceable characters or symbols for one command may cause the speech engine to fail to compile the grammar for all your commands.

    Make your voice parameter as distinct as reasonably possible from other voice commands you define. The greater the similarity between the voice grammars for commands, the more likely the speech engine will make a recognition error. You can also use the confidence scores to better distinguish between two commands that may have similar or similar-sounding grammar.

    Adding a Kinect you can utilize TTS / VR / gesturing / Cortana and turn on or off the Amazon Echo / Google Voice devices.
    - Pete

    Auto mator
    Homeseer 3 Pro - (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb- Mono 6.8X
    Homeseer Zee2 (Lite) - (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.8X
    HS4 pro - - Ubuntu 18.04/W7e 64 bit Intel Kaby Lake CPU - 32Gb - Mono 6.8X

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant