2026-02-26 16:09:48 -08:00
|
|
|
<script lang="ts">
|
|
|
|
|
import { speakers } from '$lib/stores/transcript';
|
|
|
|
|
import type { Speaker } from '$lib/types/transcript';
|
|
|
|
|
|
|
|
|
|
let editingSpeakerId = $state<string | null>(null);
|
|
|
|
|
let editName = $state('');
|
|
|
|
|
|
|
|
|
|
function startRename(speaker: Speaker) {
|
|
|
|
|
editingSpeakerId = speaker.id;
|
|
|
|
|
editName = speaker.display_name || speaker.label;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function finishRename(speakerId: string) {
|
|
|
|
|
const trimmed = editName.trim();
|
|
|
|
|
if (trimmed) {
|
|
|
|
|
speakers.update(list => list.map(s => {
|
|
|
|
|
if (s.id !== speakerId) return s;
|
|
|
|
|
return { ...s, display_name: trimmed };
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
editingSpeakerId = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function handleKeydown(e: KeyboardEvent, speakerId: string) {
|
|
|
|
|
if (e.key === 'Enter') {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
finishRename(speakerId);
|
|
|
|
|
} else if (e.key === 'Escape') {
|
|
|
|
|
editingSpeakerId = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
Phase 1 foundation: Tauri shell, Python sidecar, SQLite database
Tauri v2 + Svelte + TypeScript frontend:
- App shell with workspace layout (waveform, transcript, speakers, AI chat)
- Placeholder components for all major UI areas
- Typed stores (project, transcript, playback, AI)
- TypeScript interfaces matching the database schema
- Tauri bridge service with typed invoke wrappers
- svelte-check passes with 0 errors
Rust backend:
- Tauri v2 app entry point with command registration
- SQLite database layer (rusqlite with bundled SQLite)
- Full schema: projects, media_files, speakers, segments, words,
ai_outputs, annotations (with indexes)
- Model structs with serde serialization
- CRUD queries for projects, speakers, segments, words
- Segment text editing preserves original text
- Schema versioning for future migrations
- 6 tests passing
- Command stubs for project, transcribe, export, AI, settings, system
- App state management
Python sidecar:
- JSON-line IPC protocol (stdin/stdout)
- Message types: IPCMessage, progress, error, ready
- Handler registry with routing and error handling
- Ping/pong handler for connectivity testing
- Service stubs: transcribe, diarize, pipeline, AI, export
- Provider stubs: local (llama-server), OpenAI, Anthropic, LiteLLM
- Hardware detection stubs
- 14 tests passing, ruff clean
Also adds:
- Testing strategy document (docs/TESTING.md)
- Validation script (scripts/validate.sh)
- Updated .gitignore for Svelte, Rust, Python artifacts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:16:06 -08:00
|
|
|
<div class="speaker-manager">
|
|
|
|
|
<h3>Speakers</h3>
|
2026-02-26 16:09:48 -08:00
|
|
|
{#if $speakers.length === 0}
|
2026-02-26 18:02:48 -08:00
|
|
|
<p class="empty-hint">No speakers detected</p>
|
|
|
|
|
<p class="setup-hint">
|
|
|
|
|
Speaker detection requires a HuggingFace token.
|
|
|
|
|
Set the <code>HF_TOKEN</code> environment variable and restart.
|
|
|
|
|
</p>
|
2026-02-26 16:09:48 -08:00
|
|
|
{:else}
|
|
|
|
|
<ul class="speaker-list">
|
|
|
|
|
{#each $speakers as speaker (speaker.id)}
|
|
|
|
|
<li class="speaker-item">
|
|
|
|
|
<span class="speaker-color" style="background: {speaker.color}"></span>
|
|
|
|
|
{#if editingSpeakerId === speaker.id}
|
|
|
|
|
<input
|
|
|
|
|
class="rename-input"
|
|
|
|
|
type="text"
|
|
|
|
|
bind:value={editName}
|
|
|
|
|
onblur={() => finishRename(speaker.id)}
|
|
|
|
|
onkeydown={(e) => handleKeydown(e, speaker.id)}
|
|
|
|
|
/>
|
|
|
|
|
{:else}
|
|
|
|
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
|
|
|
<span class="speaker-name" ondblclick={() => startRename(speaker)}>
|
|
|
|
|
{speaker.display_name || speaker.label}
|
|
|
|
|
</span>
|
|
|
|
|
<button class="rename-btn" onclick={() => startRename(speaker)} title="Rename speaker">
|
|
|
|
|
✏
|
|
|
|
|
</button>
|
|
|
|
|
{/if}
|
|
|
|
|
</li>
|
|
|
|
|
{/each}
|
|
|
|
|
</ul>
|
|
|
|
|
<p class="speaker-hint">Double-click a name to rename</p>
|
|
|
|
|
{/if}
|
Phase 1 foundation: Tauri shell, Python sidecar, SQLite database
Tauri v2 + Svelte + TypeScript frontend:
- App shell with workspace layout (waveform, transcript, speakers, AI chat)
- Placeholder components for all major UI areas
- Typed stores (project, transcript, playback, AI)
- TypeScript interfaces matching the database schema
- Tauri bridge service with typed invoke wrappers
- svelte-check passes with 0 errors
Rust backend:
- Tauri v2 app entry point with command registration
- SQLite database layer (rusqlite with bundled SQLite)
- Full schema: projects, media_files, speakers, segments, words,
ai_outputs, annotations (with indexes)
- Model structs with serde serialization
- CRUD queries for projects, speakers, segments, words
- Segment text editing preserves original text
- Schema versioning for future migrations
- 6 tests passing
- Command stubs for project, transcribe, export, AI, settings, system
- App state management
Python sidecar:
- JSON-line IPC protocol (stdin/stdout)
- Message types: IPCMessage, progress, error, ready
- Handler registry with routing and error handling
- Ping/pong handler for connectivity testing
- Service stubs: transcribe, diarize, pipeline, AI, export
- Provider stubs: local (llama-server), OpenAI, Anthropic, LiteLLM
- Hardware detection stubs
- 14 tests passing, ruff clean
Also adds:
- Testing strategy document (docs/TESTING.md)
- Validation script (scripts/validate.sh)
- Updated .gitignore for Svelte, Rust, Python artifacts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:16:06 -08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.speaker-manager {
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
background: #16213e;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
color: #e0e0e0;
|
|
|
|
|
}
|
2026-02-26 16:09:48 -08:00
|
|
|
h3 {
|
|
|
|
|
margin: 0 0 0.5rem;
|
|
|
|
|
font-size: 0.95rem;
|
|
|
|
|
}
|
|
|
|
|
.empty-hint {
|
Phase 1 foundation: Tauri shell, Python sidecar, SQLite database
Tauri v2 + Svelte + TypeScript frontend:
- App shell with workspace layout (waveform, transcript, speakers, AI chat)
- Placeholder components for all major UI areas
- Typed stores (project, transcript, playback, AI)
- TypeScript interfaces matching the database schema
- Tauri bridge service with typed invoke wrappers
- svelte-check passes with 0 errors
Rust backend:
- Tauri v2 app entry point with command registration
- SQLite database layer (rusqlite with bundled SQLite)
- Full schema: projects, media_files, speakers, segments, words,
ai_outputs, annotations (with indexes)
- Model structs with serde serialization
- CRUD queries for projects, speakers, segments, words
- Segment text editing preserves original text
- Schema versioning for future migrations
- 6 tests passing
- Command stubs for project, transcribe, export, AI, settings, system
- App state management
Python sidecar:
- JSON-line IPC protocol (stdin/stdout)
- Message types: IPCMessage, progress, error, ready
- Handler registry with routing and error handling
- Ping/pong handler for connectivity testing
- Service stubs: transcribe, diarize, pipeline, AI, export
- Provider stubs: local (llama-server), OpenAI, Anthropic, LiteLLM
- Hardware detection stubs
- 14 tests passing, ruff clean
Also adds:
- Testing strategy document (docs/TESTING.md)
- Validation script (scripts/validate.sh)
- Updated .gitignore for Svelte, Rust, Python artifacts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:16:06 -08:00
|
|
|
color: #666;
|
|
|
|
|
font-size: 0.875rem;
|
2026-02-26 18:02:48 -08:00
|
|
|
margin-bottom: 0.25rem;
|
|
|
|
|
}
|
|
|
|
|
.setup-hint {
|
|
|
|
|
color: #555;
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
}
|
|
|
|
|
.setup-hint code {
|
|
|
|
|
background: rgba(233, 69, 96, 0.15);
|
|
|
|
|
color: #e94560;
|
|
|
|
|
padding: 0.1rem 0.3rem;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
font-size: 0.7rem;
|
Phase 1 foundation: Tauri shell, Python sidecar, SQLite database
Tauri v2 + Svelte + TypeScript frontend:
- App shell with workspace layout (waveform, transcript, speakers, AI chat)
- Placeholder components for all major UI areas
- Typed stores (project, transcript, playback, AI)
- TypeScript interfaces matching the database schema
- Tauri bridge service with typed invoke wrappers
- svelte-check passes with 0 errors
Rust backend:
- Tauri v2 app entry point with command registration
- SQLite database layer (rusqlite with bundled SQLite)
- Full schema: projects, media_files, speakers, segments, words,
ai_outputs, annotations (with indexes)
- Model structs with serde serialization
- CRUD queries for projects, speakers, segments, words
- Segment text editing preserves original text
- Schema versioning for future migrations
- 6 tests passing
- Command stubs for project, transcribe, export, AI, settings, system
- App state management
Python sidecar:
- JSON-line IPC protocol (stdin/stdout)
- Message types: IPCMessage, progress, error, ready
- Handler registry with routing and error handling
- Ping/pong handler for connectivity testing
- Service stubs: transcribe, diarize, pipeline, AI, export
- Provider stubs: local (llama-server), OpenAI, Anthropic, LiteLLM
- Hardware detection stubs
- 14 tests passing, ruff clean
Also adds:
- Testing strategy document (docs/TESTING.md)
- Validation script (scripts/validate.sh)
- Updated .gitignore for Svelte, Rust, Python artifacts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:16:06 -08:00
|
|
|
}
|
2026-02-26 16:09:48 -08:00
|
|
|
.speaker-list {
|
|
|
|
|
list-style: none;
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 0.5rem;
|
|
|
|
|
}
|
|
|
|
|
.speaker-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 0.5rem;
|
|
|
|
|
padding: 0.35rem 0.5rem;
|
|
|
|
|
background: rgba(255,255,255,0.03);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
.speaker-color {
|
|
|
|
|
width: 12px;
|
|
|
|
|
height: 12px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
.speaker-name {
|
|
|
|
|
flex: 1;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 0.875rem;
|
|
|
|
|
}
|
|
|
|
|
.rename-btn {
|
|
|
|
|
background: none;
|
|
|
|
|
border: none;
|
|
|
|
|
color: #666;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
padding: 0.15rem 0.3rem;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
}
|
|
|
|
|
.rename-btn:hover {
|
|
|
|
|
background: rgba(255,255,255,0.1);
|
|
|
|
|
color: #e0e0e0;
|
|
|
|
|
}
|
|
|
|
|
.rename-input {
|
|
|
|
|
flex: 1;
|
|
|
|
|
background: #1a1a2e;
|
|
|
|
|
color: #e0e0e0;
|
|
|
|
|
border: 1px solid #e94560;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
padding: 0.2rem 0.4rem;
|
|
|
|
|
font-size: 0.875rem;
|
|
|
|
|
font-family: inherit;
|
|
|
|
|
}
|
|
|
|
|
.rename-input:focus {
|
|
|
|
|
outline: none;
|
|
|
|
|
border-color: #ff6b81;
|
|
|
|
|
}
|
|
|
|
|
.speaker-hint {
|
|
|
|
|
color: #555;
|
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
margin-top: 0.5rem;
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
Phase 1 foundation: Tauri shell, Python sidecar, SQLite database
Tauri v2 + Svelte + TypeScript frontend:
- App shell with workspace layout (waveform, transcript, speakers, AI chat)
- Placeholder components for all major UI areas
- Typed stores (project, transcript, playback, AI)
- TypeScript interfaces matching the database schema
- Tauri bridge service with typed invoke wrappers
- svelte-check passes with 0 errors
Rust backend:
- Tauri v2 app entry point with command registration
- SQLite database layer (rusqlite with bundled SQLite)
- Full schema: projects, media_files, speakers, segments, words,
ai_outputs, annotations (with indexes)
- Model structs with serde serialization
- CRUD queries for projects, speakers, segments, words
- Segment text editing preserves original text
- Schema versioning for future migrations
- 6 tests passing
- Command stubs for project, transcribe, export, AI, settings, system
- App state management
Python sidecar:
- JSON-line IPC protocol (stdin/stdout)
- Message types: IPCMessage, progress, error, ready
- Handler registry with routing and error handling
- Ping/pong handler for connectivity testing
- Service stubs: transcribe, diarize, pipeline, AI, export
- Provider stubs: local (llama-server), OpenAI, Anthropic, LiteLLM
- Hardware detection stubs
- 14 tests passing, ruff clean
Also adds:
- Testing strategy document (docs/TESTING.md)
- Validation script (scripts/validate.sh)
- Updated .gitignore for Svelte, Rust, Python artifacts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:16:06 -08:00
|
|
|
</style>
|