wired up voice and vision, testing motion

This commit is contained in:
Jaroslav Vizner
2026-08-28 11:26:40 +02:00
parent 8d88495f6f
commit 3982c6fb6b
84 changed files with 7696 additions and 8984 deletions
+3
View File
@@ -5,6 +5,7 @@
#include "r1_voice/llm.hh"
#include "r1_voice/stt.hh"
#include "r1_voice/tts.hh"
#include "r1_voice/vision_context.hh"
namespace r1_voice {
@@ -12,6 +13,7 @@ struct ConversationConfig {
SttConfig stt;
LlmConfig llm;
TtsConfig tts;
VisionConfig vision;
};
class Conversation {
@@ -32,6 +34,7 @@ private:
SpeechToText stt_;
LLM llm_;
TextToSpeech tts_;
VisionContext vision_;
};
} // namespace r1_voice
+2 -1
View File
@@ -33,7 +33,8 @@ public:
explicit LLM(LlmConfig config);
std::string chat(
const std::string& user
const std::string& user,
const std::string& transient_context = {}
);
private:
+37
View File
@@ -0,0 +1,37 @@
#pragma once
#include <string>
namespace r1_voice {
struct VisionConfig {
std::string detections_path =
"/dev/shm/r1_detections.json";
// Reject YOLO output older than this.
double max_age_seconds = 2.5;
double min_confidence = 0.35;
};
class VisionContext {
public:
explicit VisionContext(
VisionConfig config
);
bool isVisionQuestion(
const std::string& text
) const;
std::string buildContext() const;
private:
VisionConfig config_;
static std::string lowerAscii(
std::string text
);
};
} // namespace r1_voice