/**
 * 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/TTS/InworldTTSTypes.h"
#include "Tasks/Task.h"

namespace inworld
{
class TTSInterface;
class InputStream_SpeechChunk;
}	 // namespace inworld

namespace inworld
{
namespace Tasks
{
namespace TTS
{

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

}	 // namespace TTS
}	 // namespace Tasks
}	 // namespace inworld
