RapportModules
Description
The RapportModules API provides a robust and centralized set of tools for creating interactive, AI-driven characters. By acting as a central hub, it streamlines the process of integrating core functionalities like facial animation, text-to-speech, speech recognition, and AI interaction.
These modules empower you to build a character that can understand language, generate dynamic speech, and react in real-time, bringing a new level of engagement and realism to your applications.
Nested Classes
AcModule
The AcModule class controls the facial animations of a character. It provides methods to set the character's mood, the intensity of their facial movements, and the speed and frequency of those animations.
Methods
Name | Return Type | Description |
|---|---|---|
SetMood(string mood) | void | Sets the character's mood.
|
SetScale(float scale) | void | Adjusts the scale of the facial animations. A higher value results in more pronounced movements.
|
SetFrequency(float frequency) | void | Sets the frequency of animation changes. A higher value causes animations to change more rapidly.
|
SetSpeed(float speed) | void | Controls the playback speed of animations. A higher value makes animations play faster. |
AiModule
The AiModule class is responsible for sending text to an AI system and managing the session state.
Methods
Name | Return Type | Description |
|---|---|---|
SendText(string text, string language) | void | Sends a text string to the AI for processing.
|
void | Requests the current session ID from the AI module. | |
SetSessionId(string sessionId) | void | Sets the session ID for the AI module.
|
SetUserId(string userId) | void | Sets the user ID for the AI module, which can change the AI character within a project.
|
AsrModule
The AsrModule class handles speech recognition features, including setting the spoken language and attempting to identify a user's language.
Methods
Name | Return Type | Description |
|---|---|---|
SetLanguage(string language) | void | Sets the expected language for speech recognition. This uses the "amazon" ASR service by default.
|
IdentifyLanguage(string languageHints, int? timeout) | void | Tries to identify the speaker's language within a specified timeframe. The system requires at least 5 seconds of constant voice input. A successful identification or a timeout will be reported via the
|
TtsModule
The TtsModule class manages text-to-speech functionality, allowing the system to generate spoken audio from text.
Methods
Name | Return Type | Description |
|---|---|---|
SendText(string text, string language) | void | Sends text to be converted into speech.
|
SetLanguage(string language, string voice, string tts, bool neural) | void | Sets the language and voice for the text-to-speech system. This method internally makes two separate calls: one to set the language and another to configure the TTS provider, voice, and neural setting.
|
VadModule
The VadModule class is responsible for configuring voice activity detection settings. This helps distinguish between speech and silence.
Methods
Name | Return Type | Description |
|---|---|---|
SetMode(string mode) | void | Sets the aggressiveness mode for the VAD.
|
SetThreshold(float trueMs, float falseMs) | void | Sets the time thresholds in milliseconds for switching between speech and silence classifications.
|
Properties
Name | Type | Description |
|---|---|---|
AC | Animation Controller | |
AI | Artificial Intelligence | |
ASR | Automatic Speech Recognition | |
TTS | Text to Speech | |
VAD | Voice Auto Detect |