TuyaSmartSpeechService Class Reference

Inherits from NSObject
Declared in TuyaSmartSpeechService.h

– convertToTextWithAudioData:audioRate:audioType:homeId:success:failure:

audio data convert to text 音频转为文字

- (void)convertToTextWithAudioData:(NSData *)audioData audioRate:(NSString *)audioRate audioType:(NSString *)audioType homeId:(long long)homeId success:(nullable TYSuccessString)success failure:(nullable TYFailureError)failure

Parameters

audioData

audio data

audioRate

audio rate

audioType

audio type

homeId

home id

success

Success block (audio text)

failure

Failure block

Discussion

audio data convert to text 音频转为文字

Declared In

TuyaSmartSpeechService.h

– executeCommandWithSpeechText:homeId:success:failure:

execute voice command 执行音频命令

- (void)executeCommandWithSpeechText:(NSString *)speechText homeId:(long long)homeId success:(nullable TYSuccessDict)success failure:(nullable TYFailureError)failure

Parameters

speechText

Voice text

homeId

home id

success

Success block (dictionary contains command result and if need to keep session)

failure

Failure block

Discussion

execute voice command 执行音频命令

Declared In

TuyaSmartSpeechService.h