ThingSmartSpeechService is used for voice control.
More...
#import <ThingSmartSpeechService.h>
ThingSmartSpeechService is used for voice control.
There's two main functions:
- Audio to text. Convert voice data into text strings.
- Execute text command. Device related commands can be done through this API.
Definition at line 21 of file ThingSmartSpeechService.h.
◆ 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
-
| audioData | The audio data. |
| audioRate | The audio rate. |
| audioType | The audio type. |
| homeId | The home ID. |
| success | Called when the task is finished. |
| failure | Called 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
-
| audioData | The audio data. |
| audioRate | The audio rate. |
| audioType | The audio type. |
| homeId | The home ID. |
| success | Called when the task is finished. |
| failure | Called 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
-
| audioData | The audio data. |
| audioRate | The audio rate. |
| audioType | The audio type. |
| homeId | The home ID. |
| success | Called when the task is finished. |
| failure | Called 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
-
| audioData | The audio data. |
| audioRate | The audio rate. |
| audioType | The audio type. |
| homeId | The home ID. |
| success | Called when the task is finished. |
| failure | Called 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
-
| speechText | The voice text. |
| homeId | The home ID. |
| success | Called when the task is finished. |
| failure | Called 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
-
| speechText | The voice text. |
| homeId | The home ID. |
| success | Called when the task is finished. |
| failure | Called 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
-
| speechText | The voice text. |
| homeId | The home ID. |
| success | Called when the task is finished. |
| failure | Called 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
-
| speechText | The voice text. |
| homeId | The home ID. |
| success | Called when the task is finished. |
| failure | Called when the task is interrupted by an error. |
The documentation for this class was generated from the following files:
- /Users/humtong/Downloads/Pods_副本/ThingSmartBaseKit/Build/ThingSmartBaseKit.xcframework/ios-arm64_x86_64-simulator/ThingSmartBaseKit.framework/Headers/ThingSmartSpeechService.h
- /Users/humtong/Downloads/Pods_副本/ThingSmartBaseKit/Build/ThingSmartBaseKit.xcframework/watchos-arm64_i386_x86_64-simulator/ThingSmartBaseKit.framework/Headers/ThingSmartSpeechService.h
- /Users/humtong/Downloads/Pods_副本/ThingSmartBaseKit/Build/ThingSmartBaseKit.xcframework/ios-arm64/ThingSmartBaseKit.framework/Headers/ThingSmartSpeechService.h
- /Users/humtong/Downloads/Pods_副本/ThingSmartBaseKit/Build/ThingSmartBaseKit.xcframework/watchos-arm64_arm64_32_armv7k/ThingSmartBaseKit.framework/Headers/ThingSmartSpeechService.h