- Add speaker_merges config option in config.js - Merge SPEAKER_08 and SPEAKER_09 into SPEAKER_07 - Add resolveSpeaker() function to map through merges - Apply merges in buildIntervals() and renderTranscript()
95 lines
2.4 KiB
JavaScript
95 lines
2.4 KiB
JavaScript
/**
|
|
* Configuration file for Amuta Space Talkers
|
|
*
|
|
* Edit this file to customize the application settings.
|
|
* Pythonic style: clear naming, organized sections.
|
|
*/
|
|
|
|
const CONFIG = {
|
|
// ===================
|
|
// FILE PATHS
|
|
// ===================
|
|
|
|
// Base name for the meeting (used to construct file paths)
|
|
meeting_name: "amuta_2026-01-12_1",
|
|
|
|
// Directory structure
|
|
input_dir: "input",
|
|
output_dir: "outputs",
|
|
output_format: "float32", // "float32" or "int8"
|
|
|
|
// Audio file extension
|
|
audio_extension: ".opus",
|
|
|
|
// ===================
|
|
// PLAYBACK
|
|
// ===================
|
|
|
|
// Start offset in seconds (skip intro/silence)
|
|
start_offset_seconds: 600,
|
|
|
|
// ===================
|
|
// SPEAKER LABELS
|
|
// ===================
|
|
|
|
// Map speaker IDs to display names
|
|
// Example: { "SPEAKER_01": "Maya", "SPEAKER_02": "David" }
|
|
speaker_labels: {
|
|
// "SPEAKER_01": "Maya",
|
|
},
|
|
|
|
// ===================
|
|
// SPEAKER MERGES
|
|
// ===================
|
|
|
|
// Merge multiple speakers into one (for diarization errors)
|
|
// Format: { "target_speaker": ["speaker_to_merge", ...] }
|
|
// All merged speakers will appear as the target speaker
|
|
speaker_merges: {
|
|
"SPEAKER_09": ["SPEAKER_07", "SPEAKER_08"],
|
|
"SPEAKER_18": ["SPEAKER_16"],
|
|
"SPEAKER_00": ["SPEAKER_03"],
|
|
},
|
|
|
|
// ===================
|
|
// TRANSCRIPT DEFAULTS
|
|
// ===================
|
|
|
|
transcript: {
|
|
rows: 6, // Number of transcript lines shown (2-12)
|
|
opacity: 0.25, // Transcript panel opacity (0.2-1.0)
|
|
size: "medium", // Text size: "small", "medium", "large"
|
|
},
|
|
|
|
// ===================
|
|
// COLOR PALETTE
|
|
// ===================
|
|
|
|
// Speaker colors (cycles through for each speaker)
|
|
palette: [
|
|
"#52f0c5",
|
|
"#ffb347",
|
|
"#ff7aa2",
|
|
"#9cbbff",
|
|
"#f4d35e",
|
|
"#7bffd2",
|
|
"#ffb4a2",
|
|
"#b8e1ff",
|
|
"#ffd36d",
|
|
"#d0b3ff",
|
|
],
|
|
};
|
|
|
|
// ===================
|
|
// DERIVED PATHS (computed from config)
|
|
// ===================
|
|
|
|
CONFIG.audio_path = `${CONFIG.input_dir}/${CONFIG.meeting_name}/${CONFIG.meeting_name}${CONFIG.audio_extension}`;
|
|
CONFIG.transcript_path = `${CONFIG.output_dir}/${CONFIG.output_format}/${CONFIG.meeting_name}/${CONFIG.meeting_name}.json`;
|
|
CONFIG.waveform_path = `${CONFIG.output_dir}/${CONFIG.output_format}/${CONFIG.meeting_name}/${CONFIG.meeting_name}.waveform.json`;
|
|
|
|
// Export for use in app.js
|
|
if (typeof module !== 'undefined' && module.exports) {
|
|
module.exports = CONFIG;
|
|
}
|