Speech Recognition Messages

From WeChat Official Account Admin Platform
Jump to: navigation, search

When the speech recognition feature is enabled, WeChat system adds a Recognition field in the XML data package of the pushed audio message each time a user sends audio messages to an official account. Note: Enabling or disabling the speech recognition feature takes effect immediately for new followers and 24 hours for existing followers. Developers can unfollow and then follow in order to test this feature. An example of an audio XML packet is shown as below after the speech recognition feature is enabled:

<Recognition><![CDATA[WeChat Team]]></Recognition>

Parameter Description

Parameter Description
ToUserName Developer's WeChat ID
FromUserName Unique sender ID (an OpenID)
CreateTime Message creation time (Integer)
MsgType Voice
MediaID An audio message media ID that can call the download API to load the media file
Format Audio format: amr
Recognition Speech recognition result (UTF8)
MsgID Message ID (64 bit integer)
Developer Guide
Custom-defined Menu