Advertisement
Online Test Banks
Score higher
See Online Test Banks
eLearning
Learning anything is easy
Browse Online Courses
Mobile Apps
Learning on the go
Explore Mobile Apps
Dummies Store
Shop for books and more
Start Shopping

Smart Interaction (SI) Voice Recognition for Samsung SmartTV Applications

The SI voice recognition feature starts when a user speaks a preset start command, or presses the voice recognition button on a smart controller. The start command can be changed on the Samsung SmartTV’s configuration menu.

image0.jpg

The following charts demonstrates how the SI API handles a user’s voice recognition command.

Voice Recognition Flow Chart: When Initiated by a User’s Preset Start Command
Voice Recognition Flow Chart: When Initiated by a User’s Preset Start Command
Voice Recognition Flow Chart: When Initiated by a Voice Recognition Button
Voice Recognition Flow Chart: When Initiated by a Voice Recognition Button

Activating voice recognition

Once the preceding preparation is done, set the voice element to “y” in the config.xml file to enable the application of the voice recognition feature.

config.xml
<voice itemtype="string">y</voice>

Registering voice recognition

Use the Web API SubscribeExEvent() function to register voice recognition.

The SubscribeExEvent( ) Function
Function SubscribeExEvent
Version Support from RECOGNITION-0001
Security Type RECOG
Usage SubscribeExEvent( PL_RECOGNITION_TYPE type, String name, function callback)
Return Value Void
Display on the Emulator “The voice recognition result is returned with the callback function.”
(Result of voice recognition is returned by callback function)

The Parameters of the SubscribeExEvent( ) function follow:

image3.jpg

Following is an example of the SubscribeExEvent( ) function:

image4.jpg

Unregistering an event

Use the UnsubscribeExEvent() function to unregister an event that was previously registered with the SubscribeExEvent() function.

The UnsubscribeExEvent( ) Function
Function UnsubscribeExEvent
Version Support from RECOGNITION-0001
Security Type RECOG
Usage UnsubscribeExEvent( PL_RECOGNITION_TYPE type, String name)
Return Value 1 (Success)
0 (Failure)
Display on the Emulator Always 1 is returned

The Parameters of the UnsubscribeExEvent( ) function follow:

image5.jpg

Following is an example of the UnsubscribeExEvent( ) function:

image6.jpg

An application must use the UnsubscribeExEvent() function and unregister registered events on exit. Set up this exception handling in the window.onunload handler.

image7.jpg

Event handling

Samsung SmartTV runs the registered callback function when voice recognition is started. The function receives the event object as its parameter, which returns event type, result, and a few other properties.

The next table lists the event types.

Voice Recognition Event Types
Event type Description
EVENT_VOICE_BEGIN_MONITOR User spoke the start command
EVENT_VOICE_BTSOUND_START User pressed the voice recognition button on a smart controller
EVENT_VOICE_RECOG_RESULT The TV returns the voice recognition result

The result value holds the recognized user voice input.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement
Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win an iPad Mini. Enter to win now!