/asr/set_locale#

Caution

This documentation page has been auto-generated.

It may be missing some details.

/asr/set_locale Quick Facts

Category

Speech and language processing

Message type

i18n_msgs/SetLocale

Sets the current language of the vosk speech recognition (ASR) engine. Returns immediately if the required language is already loaded.

See How-to: Automatic Speech Recognition (ASR) and Internationalisation and language support for details.

Quick snippets#

Send a goal from the command-line#
$ rostopic pub /asr/set_locale/goal i18n_msgs/SetLocaleActionGoal # press Tab to complete the message prototype
Call the action from a Python script#
#!/usr/bin/env python

import rospy
import actionlib
from i18n_msgs.msg import *


if __name__ == "__main__":

    client = actionlib.SimpleActionClient("/asr/set_locale", i18n_msgs.msg.SetLocaleAction)
    client.wait_for_server()

    # check the i18n_msgs/SetLocaleGoal message
    # definition for the possible goal parameters
    goal = i18n_msgs.msg.SetLocaleGoal(param1=..., param2=...)

    client.send_goal(goal)
    client.wait_for_result()

    rospy.loginfo("Action returned: %s" % client.get_result())