Identifies contact details from the users utterances for easy form filling.
This configuration demonstrates how to implement a simple contact form that can be filled by using voice.
It defines five entities (name
, street_address
, email_address
, phone_number
and dob
) that are all implemented using our standard variables. The idea is to assign each of these entities to a different field in a form. The CodePen demo related to this configuration does this simply by using the name of the entity as the identifier of the form component, to which the entity value is written.
The configuration supports utterances such as
Things to note:
phrases
. The last line, $phrases {{and} $phrases}
defines that a single utterance can consist of up to two of these phrases spoken one after the other. (Optionally with the word “and” in between.)phrases = [
*fill [{[my | the]} name {is} | i'm | i am] $SPEECHLY.PERSON_NAME(name)
*fill [{[my | the]} address {is} | i live at] $SPEECHLY.STREET_ADDRESS(street_address)
*fill {[my | the]} email {is} $SPEECHLY.EMAIL_ADDRESS(email_address)
*fill {[my | the]} phone {number} {is} $SPEECHLY.PHONE_NUMBER(phone_number)
*fill [{[my | the]} [birthday | date of birth] {is} | i was born on {the}] $SPEECHLY.DATE(dob)
]
$phrases {{and} $phrases}
App ID
from the headerPaste your App ID
into the CodePen
https://codepen.io/speechly/pen/KKZVdZW?editors=1010
Follow the Using React Client guide and create a similar UI as in the CodePen above.
Last updated by Mathias Lindholm on November 2, 2022 at 20:24 +0200
Found an error on our documentation? Please file an issue or make a pull request