From b920762c7fb5334901f584c6fa98ee9af80bd337 Mon Sep 17 00:00:00 2001 From: Emil Date: Sun, 21 Jun 2026 23:55:41 +0300 Subject: [PATCH] Add 'How to use' guide in GUI Training tab Collapsible help section with: - Quick start steps (open DB, generate, rate, save) - Tips for effective rating - Rating guide (1-5 stars explained) - Workflow explanation (AI <-> user feedback loop) --- crates/soundgen-gui/src/app.rs | 70 ++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/crates/soundgen-gui/src/app.rs b/crates/soundgen-gui/src/app.rs index cd8fd51..04a655e 100644 --- a/crates/soundgen-gui/src/app.rs +++ b/crates/soundgen-gui/src/app.rs @@ -800,6 +800,76 @@ impl SoundgenApp { fn show_training(&mut self, ui: &mut egui::Ui) { ui.heading("Training — Rate Sounds for Feedback Loop"); + // How to use (collapsible, open by default on first visit) + ui.collapsing("How to use", |ui| { + ui.colored_label( + egui::Color32::from_rgb(140, 180, 220), + "This tab lets you rate generated sounds so the AI can learn your preferences.", + ); + ui.separator(); + + ui.label(egui::RichText::new("Quick start:").strong()); + ui.label("1. Open or create a feedback database (buttons above)"); + ui.label("2. Use \"Generate Batch\" below to create sounds by name"); + ui.label("3. Click ▶ to play each sound"); + ui.label("4. Click stars (1-5) to rate how well it matches the name"); + ui.label("5. Type feedback in the text field (e.g. \"too loud\", \"perfect\")"); + ui.label("6. Press Enter or click \"Save\" to save the feedback"); + ui.label("7. The AI reads your ratings when generating new sounds"); + ui.separator(); + + ui.label(egui::RichText::new("Tips:").strong()); + ui.label("• Green \"saved\" text means your feedback is stored in the database"); + ui.label("• Click a star again to unrate (set to 0)"); + ui.label("• \"Export Dataset\" creates a JSONL file for fine-tuning (rating >= 4)"); + ui.label("• The more sounds you rate, the better the AI gets at matching names"); + ui.label("• Comments are especially helpful — they tell the AI what to fix"); + ui.separator(); + + ui.label(egui::RichText::new("Rating guide:").strong()); + ui.label( + egui::RichText::new("5★") + .color(egui::Color32::from_rgb(255, 200, 80)) + .strong(), + ); + ui.label(" Perfect — sounds exactly like the name suggests"); + ui.label( + egui::RichText::new("4★") + .color(egui::Color32::from_rgb(255, 200, 80)) + .strong(), + ); + ui.label(" Good — close, minor issues"); + ui.label( + egui::RichText::new("3★") + .color(egui::Color32::from_rgb(255, 200, 80)) + .strong(), + ); + ui.label(" Okay — recognizable but needs improvement"); + ui.label( + egui::RichText::new("2★") + .color(egui::Color32::from_rgb(255, 200, 80)) + .strong(), + ); + ui.label(" Poor — barely matches"); + ui.label( + egui::RichText::new("1★") + .color(egui::Color32::from_rgb(255, 200, 80)) + .strong(), + ); + ui.label(" Bad — doesn't match at all"); + ui.separator(); + + ui.label(egui::RichText::new("Workflow with AI (via MCP):").strong()); + ui.label("• AI calls generate_batch → sounds appear here (unrated)"); + ui.label("• You rate them → ratings stored in database"); + ui.label( + "• AI calls render_sound → gets reference examples from your top-rated sounds", + ); + ui.label("• AI adjusts its approach based on what you liked/disliked"); + }); + + ui.separator(); + // DB controls ui.horizontal(|ui| { if ui.button("Open Feedback DB...").clicked() {