getVoiceAgentComponentStates static method
Get the current state of all voice agent components (STT, LLM, TTS).
Use this to check which models are loaded and ready for the voice pipeline. Models are loaded via the individual APIs (loadSTTModel, loadModel, loadTTSVoice).
Matches Swift: RunAnywhere.getVoiceAgentComponentStates()
Implementation
static VoiceAgentComponentStates getVoiceAgentComponentStates() {
final sttId = currentSTTModelId;
final llmId = currentModelId;
final ttsId = currentTTSVoiceId;
return VoiceAgentComponentStates(
stt: sttId != null
? ComponentLoadState.loaded(modelId: sttId)
: const ComponentLoadState.notLoaded(),
llm: llmId != null
? ComponentLoadState.loaded(modelId: llmId)
: const ComponentLoadState.notLoaded(),
tts: ttsId != null
? ComponentLoadState.loaded(modelId: ttsId)
: const ComponentLoadState.notLoaded(),
);
}