LogoLogo
HomeNewsSupportVideos
  • Welcome
  • Wisej.NET
  • Concepts
    • Getting Started
    • General Concepts
    • Architecture
    • Extensibility
    • AI Providers
    • Vector Databases
    • Usage Metrics
    • Logging & Error Handling
  • Markup
  • Components
    • API
      • SmartAdapter
        • SmartAudioTTSAdapter
        • SmartAudioWhisperAdapter
        • SmartCalendarAdapter
        • SmartChartAdapter
        • SmartChartJS3Adapter
        • SmartChatBoxAdapter
        • SmartComboBoxAdapter
        • SmartCopilotAdapter
        • SmartDataEntryAdapter
        • SmartDocumentAdapter
        • SmartFullCalendarAdapter
        • SmartObjectAdapter
        • SmartPictureBoxAdapter
        • SmartQueryAdapter
        • SmartRealtimeAdapter
        • SmartReportAdapter
        • SmartTextBoxAdapter
        • SmartAdapter.ExtendsAttribute
        • SmartAdapter.FieldNameAttribute
        • SmartAdapter.FieldPromptAttribute
        • SmartAdapter.FieldRectangleAttribute
        • SmartAdapter.WorksWithAttribute
      • SmartEndpoint
        • AmazonBedrockEndpoint
        • AnthropicEndpoint
        • AzureAIEndpoint
        • CerebrasEndpoint
        • DeepSeekEndpoint
        • GoogleAIEndpoint
        • GroqCloudEndpoint
        • GroqCloudEndpointWhisper
        • HuggingFaceEndpoint
        • HuggingFaceJavaScriptEndpoint
        • LocalAIEndpoint
        • LocalAIEndpointImageGen
        • LocalAIEndpointTTS
        • LocalAIEndpointWhisper
        • NvidiaAIEndpoint
        • OllamaEndpoint
        • OpenAIEndpoint
        • OpenAIEndpointDallE
        • OpenAIEndpointRealtime
        • OpenAIEndpointTTS
        • OpenAIEndpointWhisper
        • SambaNovaEndpoint
        • SmartHttpEndpoint
        • TogetherAIEndpoint
        • XAIEndpoint
        • SmartEndpoint.Metrics
        • SmartEndpoint.Response
      • SmartExtensions
      • SmartHub
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartObject
      • SmartPrompt
        • SmartAgentPrompt
        • SmartParallelPrompt
        • SmartPrompt.Parameter
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartRealtimeSession
      • SmartSession
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.Message
        • SmartSession.MessageCollection
        • SmartSession.MessageRole
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
        • SmartSession.TrimmingStrategy
      • SmartTool
        • SmartTool.IToolProvider
        • SmartTool.ToolAttribute
        • SmartTool.ToolContext
      • Markup
        • MarkupExtensions
      • Controls
        • UVLightOverlay
      • Embeddings
        • EmbeddedDocument
        • Embedding
        • Matches
        • Metadata
      • Helpers
        • ApiKeys
        • Markdown
        • TextTokenizer
      • Services
        • DefaultSessionTrimmingService
        • IDocumentConversionService
          • DefaultDocumentConversionService
        • IEmbeddingGenerationService
          • DefaultEmbeddingGenerationService
          • HuggingFaceEmbeddingGenerationService
        • IEmbeddingStorageService
          • AzureAISearchEmbeddingStorageService
          • ChromaEmbeddingStorageService
          • FileSystemEmbeddingStorageService
          • MemoryEmbeddingStorageService
          • PineconeEmbeddingStorageService
          • QdrantEmbeddingStorageService
        • IHttpClientService
          • DefaultHttpClientService
        • ILoggerService
          • DefaultLoggerService
        • IOCRService
          • DefaultOCRService
        • IRerankingService
          • DefaultRerankingService
          • LocalAIRerankingService
          • PineconeRerankingService
        • ISessionTrimmingService
          • DefaultSessionTrimmingService
        • ITextSplitterService
          • RecursiveCharacterTextSplitterService
          • TextSplitterServiceBase
        • ITokenizerService
          • DefaultTokenizerService
        • IWebSearchService
          • BingWebSearchService
          • BraveWebSearchService
          • GoogleWebSearchService
      • Tools
        • ArxivTools
        • ChartJS3Tools
        • DatabaseTools
        • DataTableFilterTools
        • DocumentSearchTools
        • DocumentTools
        • FullCalendarTools
        • IToolsContainer
        • MathTools
        • ToolsContainer
        • UtilityTools
        • WebSearchTools
    • Built-in Services
      • IOCRService
      • ILoggerService
      • ITextSplitterService
      • ITokenizerService
      • IHttpClientService
      • IWebSearchService
      • IRerankingService
      • ISessionTrimmingService
      • IDocumentConversionService
      • IEmbeddingStorageService
      • IEmbeddingGenerationService
    • Built-in SmartTools
      • ToolsContainer
      • MathTools
      • UtilityTools
      • DatabaseTools
      • DocumentTools
      • DocumentSearchTools
      • WebSearchTools
      • ChartJS3Tools
      • FullCalendarTools
    • Built-in SmartAdapters
      • SmartAdapter
      • SmartAudioTTSAdapter
      • SmartAudioWhisperAdapter
      • SmartCalendarAdapter
      • SmartChartAdapter
      • SmartChartJS3Adapter
      • SmartChatBoxAdapter
      • SmartComboBoxAdapter
      • SmartCopilotAdapter
      • SmartDataEntryAdapter
      • SmartDocumentAdapter
      • SmartFullCalendarAdapter
      • SmartObjectAdapter
      • SmartPictureBoxAdapter
      • SmartQueryAdapter
      • SmartRealtimeAdapter
      • SmartReportAdapter
      • SmartTextBoxAdapter
    • Configure Services
    • Using SmartHub
    • Using SmartTools
    • Using SmartPrompt
    • Using SmartSession
    • Using SmartRealTimeAdapter
    • UVLightOverlay Control
Powered by GitBook
On this page
  • Constructors
  • SmartRealtimeAdapter()
  • Properties
  • Enabled
  • Listening
  • Muted
  • TranscriptionEnabled
  • Voice
  • Methods
  • CreateSession<T>(systemPrompt)
  • OnAnswerReceived(e)
  • OnEnabledChanged(e)
  • OnListeningChanged(e)
  • OnMutedChanged(e)
  • OnTranscriptionReceived(e)
  • Reset()
  • StartListening()
  • StopListening()
  • Events
  • AnswerReceived
  • EnabledChanged
  • ListeningChanged
  • MutedChanged
  • TranscriptionReceived
  • Implements
Export as PDF
  1. Components
  2. API
  3. SmartAdapter

SmartRealtimeAdapter

Wisej.AI.Adapters.SmartRealtimeAdapter

PreviousSmartQueryAdapterNextSmartReportAdapter

Last updated 5 days ago

Namespace: Wisej.AI.Adapters

Assembly: Wisej.AI (3.5.0.0)

Represents a smart adapter that provides real-time data processing capabilities for use with the endpoint.

public class SmartRealtimeAdapter : SmartAdapter
Public Class SmartRealtimeAdapter
    Inherits SmartAdapter

The SmartRealtimeAdapter class extends the base class to enable real-time data handling and integration with OpenAI's real-time endpoint. This adapter is designed to facilitate seamless communication and data exchange in scenarios where immediate processing and response are required.

Constructors

SmartRealtimeAdapter()

Initializes a new instance of the class.

This constructor sets up the by initializing the internal prompt and subscribing to the application's refresh event. The prompt is initialized with a default label, and the adapter will respond to application-wide refresh events for real-time updates.

Properties

Enabled

: Gets or sets a value indicating whether the component accepts voice input from the user. (Default: True)

When set to true (the default value), the component is enabled to receive and process voice input from the user. Setting this property to false disables voice input functionality for the component.

When set to true, the component is muted and may not produce sound or notifications. The default value is false.

When set to true, transcription features are activated. The default value is false.

Supported voices include: Alloy (default), Ash, Ballad, Coral, Echo, Sage, Shimmer, Verse. New voices can be used as they become available.

Methods

Parameter
Type
Description

T

Parameter
Type
Description

e

Parameter
Type
Description

e

Parameter
Type
Description

e

This method is called to notify subscribers that the listening state has changed. Derived classes can override this method to provide custom event data or additional logic.

Parameter
Type
Description

e

This method is called to notify subscribers that the muted state has changed. Derived classes can override this method to provide custom event data or additional logic.

Parameter
Type
Description

e

Resets the current conversation with the OpenAI Realtime API endpoint.

This method clears the ongoing conversation state, allowing a new conversation to begin with the OpenAI endpoint. It is useful when you want to discard the current context and start fresh.

Starts capturing and processing user voice input through the OpenAI Realtime API.

Call this method to begin listening for user voice input. The component will capture audio from the input device, transmit it to the OpenAI Realtime API, and process the response in real time. This enables interactive voice-driven features within your application.

Stops capturing and processing user voice input.

Call this method to stop listening for user voice input. The component will cease capturing audio from the input device and terminate any ongoing communication with the OpenAI Realtime API. This is useful for conserving resources or when voice input is no longer required.

Events

Subscribe to this event to be notified when the listening state is updated, such as when the component starts or stops listening for input.

Subscribe to this event to be notified when the muted state is updated, such as when the component is muted or unmuted.

Implements

Name
Description

Represents a provider that supplies tools.

Listening

: Gets a value indicating whether the component is currently listening for the user's voice.

The property reflects the current listening state of the component.

Muted

: Gets or sets a value indicating whether the component is muted. (Default: False)

TranscriptionEnabled

: Gets or sets a value indicating whether transcription functionality is enabled. (Default: False)

Voice

: Gets or sets the voice of the model. (Default: "Alloy")

CreateSession<T>(systemPrompt)

systemPrompt

Returns: .

OnAnswerReceived(e)

Raises the event.

The instance containing the event data.

This method invokes the event, passing the specified event arguments to all registered event handlers.

OnEnabledChanged(e)

Raises the event.

An instance that contains the event data.

This method is called to trigger the event. Derived classes can override this method to provide additional logic when the event is raised.

OnListeningChanged(e)

Raises the event.

An instance containing the event data.

OnMutedChanged(e)

Raises the event.

An instance containing the event data.

OnTranscriptionReceived(e)

Raises the event.

The instance containing the event data.

This protected virtual method allows derived classes to trigger the event. Override this method to provide custom event invocation logic.

Reset()

StartListening()

StopListening()

AnswerReceived

Occurs when an answer is received.

Subscribe to this event to handle actions when an answer is received. The event provides containing details about the received answer.

EnabledChanged

Occurs when the enabled state of the object changes.

Subscribe to this event to be notified whenever the enabled state of the object is modified. The event provides standard data.

ListeningChanged

Occurs when the listening state of the component changes.

MutedChanged

Occurs when the muted state of the component changes.

TranscriptionReceived

Occurs when a transcription is received.

Subscribe to this event to handle actions when a new transcription is received. The event provides containing details about the transcription.

Boolean
Boolean
Boolean
String
T
AnswerReceivedEventHandler
AnswerReceivedEventArgs
EventHandler
EventArgs
EventHandler
EventHandler
TranscriptionReceivedEventHandler
TranscriptionReceivedEventArgs
Listening
AnswerReceived
AnswerReceived
EnabledChanged
EnabledChanged
ListeningChanged
MutedChanged
TranscriptionReceived
TranscriptionReceived
SmartPrompt
AnswerReceivedEventArgs
AnswerReceivedEventArgs
EventArgs
EventArgs
EventArgs
EventArgs
EventArgs
EventArgs
TranscriptionReceivedEventArgs
TranscriptionReceivedEventArgs
IToolProvider
SmartAdapter
SmartRealtimeAdapter
OpenAIEndpointRealtime
SmartAdapter
SmartRealtimeAdapter
SmartRealtimeAdapter
Boolean