## New Modules - StorageModule: SQLite persistence for sessions, app usage, conversations - MonitoringModule: Cross-platform window tracking (Win32/X11) - AIModule: Multi-provider LLM integration with agentic tool loop - VoiceModule: TTS/STT coordination with speak queue ## Shared Libraries - AissiaLLM: ILLMProvider abstraction (Claude + OpenAI providers) - AissiaPlatform: IWindowTracker abstraction (Win32 + X11) - AissiaAudio: ITTSEngine (SAPI/espeak) + ISTTEngine (Whisper API) - HttpClient: Header-only HTTP client with OpenSSL ## Configuration - Added JSON configs for all modules (storage, monitoring, ai, voice) - Multi-provider LLM config with Claude and OpenAI support ## Dependencies - SQLite3, OpenSSL, cpp-httplib (FetchContent) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
65 lines
1.5 KiB
C++
65 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
#include <vector>
|
|
#include <functional>
|
|
|
|
namespace aissia {
|
|
|
|
/**
|
|
* @brief Callback for transcription results
|
|
*/
|
|
using TranscriptionCallback = std::function<void(const std::string& text)>;
|
|
|
|
/**
|
|
* @brief Interface for Speech-to-Text engines
|
|
*
|
|
* Implementations:
|
|
* - WhisperAPIEngine: OpenAI Whisper API
|
|
*/
|
|
class ISTTEngine {
|
|
public:
|
|
virtual ~ISTTEngine() = default;
|
|
|
|
/**
|
|
* @brief Transcribe audio data
|
|
* @param audioData PCM audio samples (16-bit, 16kHz, mono)
|
|
* @return Transcribed text
|
|
*/
|
|
virtual std::string transcribe(const std::vector<float>& audioData) = 0;
|
|
|
|
/**
|
|
* @brief Transcribe audio file
|
|
* @param filePath Path to audio file (wav, mp3, etc.)
|
|
* @return Transcribed text
|
|
*/
|
|
virtual std::string transcribeFile(const std::string& filePath) = 0;
|
|
|
|
/**
|
|
* @brief Set language for transcription
|
|
* @param language ISO 639-1 code (e.g., "fr", "en")
|
|
*/
|
|
virtual void setLanguage(const std::string& language) = 0;
|
|
|
|
/**
|
|
* @brief Check if engine is available
|
|
*/
|
|
virtual bool isAvailable() const = 0;
|
|
|
|
/**
|
|
* @brief Get engine name
|
|
*/
|
|
virtual std::string getEngineName() const = 0;
|
|
};
|
|
|
|
/**
|
|
* @brief Factory to create STT engine
|
|
*/
|
|
class STTEngineFactory {
|
|
public:
|
|
static std::unique_ptr<ISTTEngine> create(const std::string& apiKey);
|
|
};
|
|
|
|
} // namespace aissia
|