Tuya iOS Smart Life App SDK 5.15.0
ThingSmartSpeechService Class Reference

ThingSmartSpeechService is used for voice control. More...

#import <ThingSmartSpeechService.h>

Inheritance diagram for ThingSmartSpeechService:

Instance Methods

(void) - convertToTextWithAudioData:audioRate:audioType:homeId:success:failure:
 
(void) - executeCommandWithSpeechText:homeId:success:failure:
 
(void) - convertToTextWithAudioData:audioRate:audioType:homeId:success:failure:
 
(void) - executeCommandWithSpeechText:homeId:success:failure:
 
(void) - convertToTextWithAudioData:audioRate:audioType:homeId:success:failure:
 
(void) - executeCommandWithSpeechText:homeId:success:failure:
 
(void) - convertToTextWithAudioData:audioRate:audioType:homeId:success:failure:
 
(void) - executeCommandWithSpeechText:homeId:success:failure:
 

Detailed Description

ThingSmartSpeechService is used for voice control.

There's two main functions:

  1. Audio to text. Convert voice data into text strings.
  2. Execute text command. Device related commands can be done through this API.

Definition at line 21 of file ThingSmartSpeechService.h.

Method Documentation

◆ convertToTextWithAudioData:audioRate:audioType:homeId:success:failure: [1/4]

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

Converts from audio to text.

Parameters
audioDataThe audio data.
audioRateThe audio rate.
audioTypeThe audio type.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ convertToTextWithAudioData:audioRate:audioType:homeId:success:failure: [2/4]

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

Converts from audio to text.

Parameters
audioDataThe audio data.
audioRateThe audio rate.
audioTypeThe audio type.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ convertToTextWithAudioData:audioRate:audioType:homeId:success:failure: [3/4]

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

Converts from audio to text.

Parameters
audioDataThe audio data.
audioRateThe audio rate.
audioTypeThe audio type.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ convertToTextWithAudioData:audioRate:audioType:homeId:success:failure: [4/4]

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

Converts from audio to text.

Parameters
audioDataThe audio data.
audioRateThe audio rate.
audioTypeThe audio type.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ executeCommandWithSpeechText:homeId:success:failure: [1/4]

- (void) executeCommandWithSpeechText: (NSString *)  speechText
homeId: (long long)  homeId
success: (nullable ThingSuccessDict success
failure: (nullable ThingFailureError failure 

Runs audio commands.

Parameters
speechTextThe voice text.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ executeCommandWithSpeechText:homeId:success:failure: [2/4]

- (void) executeCommandWithSpeechText: (NSString *)  speechText
homeId: (long long)  homeId
success: (nullable ThingSuccessDict success
failure: (nullable ThingFailureError failure 

Runs audio commands.

Parameters
speechTextThe voice text.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ executeCommandWithSpeechText:homeId:success:failure: [3/4]

- (void) executeCommandWithSpeechText: (NSString *)  speechText
homeId: (long long)  homeId
success: (nullable ThingSuccessDict success
failure: (nullable ThingFailureError failure 

Runs audio commands.

Parameters
speechTextThe voice text.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ executeCommandWithSpeechText:homeId:success:failure: [4/4]

- (void) executeCommandWithSpeechText: (NSString *)  speechText
homeId: (long long)  homeId
success: (nullable ThingSuccessDict success
failure: (nullable ThingFailureError failure 

Runs audio commands.

Parameters
speechTextThe voice text.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

The documentation for this class was generated from the following files: