detectSttModel
Detect STT (Speech-to-Text) model type and structure without initializing the recognizer. Uses the same native file-based detection asinitializeStt. Useful to show model-specific options before initialization or to query the type for a given path.
Parameters
Absolute path to model directory. Use
resolveModelPath() first for asset/file paths.true: prefer int8 modelsfalse: prefer regular modelsundefined: try int8 first (default)
Explicit model type or
'auto' (default). Supported types:'transducer''nemo_transducer''paraformer''nemo_ctc''wenet_ctc''sense_voice''zipformer_ctc''whisper''funasr_nano''fire_red_asr''moonshine''dolphin''canary''omnilingual''medasr''telespeech_ctc''auto'
Returns
Whether detection succeeded
Array of detected model configurations, each containing:
type: Model type (e.g.,'transducer','whisper')modelDir: Path to the model directory
Primary detected model type (same as first entry in
detectedModels)detectTtsModel
Detect TTS (Text-to-Speech) model type and structure without initializing the engine. Uses the same native file-based detection asinitializeTts.
Parameters
Absolute path to model directory. Use
resolveModelPath() first for asset/file paths.Explicit model type or
'auto' (default). Supported types:'vits''matcha''kokoro''kitten''pocket''zipvoice''auto'
Returns
Whether detection succeeded
Array of detected model configurations, each containing:
type: Model type (e.g.,'vits','matcha')modelDir: Path to the model directory
Primary detected model type (same as first entry in
detectedModels)listAssetModels
List all model folders in the assets/models directory. Scans the platform-specific model directory and returns folder names with type hints.Returns
Array of model info objects found in assets/models/ (Android) or bundle models/ (iOS):
folder: Model directory namehint: Type hint based on folder name ('stt','tts', or'unknown')
This function is useful for discovering models at runtime without hardcoding paths. The
hint field is based on folder naming conventions and may not be 100% accurate - use detectSttModel() or detectTtsModel() for definitive detection.listModelsAtPath
List model folders under a specific filesystem path. When recursive is true, returns relative folder paths under the base path.Parameters
Absolute filesystem path to scan for models
When
true, scans subdirectories recursively and returns relative pathsReturns
Array of model info objects:
folder: Model directory name (or relative path if recursive)hint: Type hint based on folder name ('stt','tts', or'unknown')