/**
 * Copyright 2022-2025 Theai, Inc. dba Inworld AI
 */

#pragma once

#include "CoreMinimal.h"
#include "InworldRuntimeTypes.h"
#include "Misc/Paths.h"
#include "Misc/TVariant.h"
#include "Primitives/STT/InworldSTTTypes.h"
#include "Tasks/Task.h"

namespace inworld
{
class STTInterface;
class InputStream_string;
}	 // namespace inworld

namespace inworld
{
namespace Tasks
{
namespace STT
{

/**
 * @brief Creates an asynchronous task for initializing an STT (Speech-to-Text) interface.
 *
 * This function creates a task that initializes the STT system with the provided configuration.
 * The task returns either a valid STT interface or an error message string. The STT interface
 * can be used for converting speech audio to text with various recognition options.
 *
 * @param STTCreationConfig Configuration parameters for STT creation (local or remote)
 * @return Task that resolves to either a shared pointer to STTInterface or an error string
 */
UE::Tasks::TTask<TVariant<TSharedPtr<inworld::STTInterface>, FString>> CreateSTTTask(
	const FInworldSTTCreationConfig& STTCreationConfig);

}	 // namespace STT
}	 // namespace Tasks
}	 // namespace inworld
