Fix speaker diarization: WAV conversion, pyannote 4.0 compat, telemetry bug
- Convert non-WAV audio to 16kHz mono WAV before diarization (pyannote v4.0.4 AudioDecoder returns None duration for FLAC, causing crash) - Handle pyannote 4.0 DiarizeOutput return type (unwrap .speaker_diarization) - Disable pyannote telemetry (np.isfinite(None) bug with max_speakers) - Use huggingface_hub.login() to persist token for all sub-downloads - Pre-download sub-models (segmentation-3.0, speaker-diarization-community-1) - Add third required model license link in settings UI - Improve SpeakerManager hints based on settings state - Add word-wrap to transcript text Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -118,12 +118,14 @@
|
||||
<p>Speaker detection uses <strong>pyannote.audio</strong> models hosted on HuggingFace. You must accept the license for each model:</p>
|
||||
<ol>
|
||||
<li>Create a free account at <!-- svelte-ignore a11y_no_static_element_interactions --><a class="ext-link" onclick={() => openUrl('https://huggingface.co/join')}>huggingface.co</a></li>
|
||||
<li>Accept the license on <strong>each</strong> of these pages:
|
||||
<li>Accept the license on <strong>all three</strong> of these pages:
|
||||
<ul>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<li><a class="ext-link" onclick={() => openUrl('https://huggingface.co/pyannote/speaker-diarization-3.1')}>pyannote/speaker-diarization-3.1</a></li>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<li><a class="ext-link" onclick={() => openUrl('https://huggingface.co/pyannote/segmentation-3.0')}>pyannote/segmentation-3.0</a></li>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<li><a class="ext-link" onclick={() => openUrl('https://huggingface.co/pyannote/speaker-diarization-community-1')}>pyannote/speaker-diarization-community-1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { speakers } from '$lib/stores/transcript';
|
||||
import { settings } from '$lib/stores/settings';
|
||||
import type { Speaker } from '$lib/types/transcript';
|
||||
|
||||
let editingSpeakerId = $state<string | null>(null);
|
||||
@@ -35,10 +36,13 @@
|
||||
<h3>Speakers</h3>
|
||||
{#if $speakers.length === 0}
|
||||
<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>
|
||||
{#if $settings.skip_diarization}
|
||||
<p class="setup-hint">Speaker detection is disabled. Enable it in Settings > Speakers.</p>
|
||||
{:else if !$settings.hf_token}
|
||||
<p class="setup-hint">Speaker detection requires a HuggingFace token. Configure it in Settings > Speakers.</p>
|
||||
{:else}
|
||||
<p class="setup-hint">Speaker detection ran but found no distinct speakers, or the model may need to be downloaded. Check Settings > Speakers.</p>
|
||||
{/if}
|
||||
{:else}
|
||||
<ul class="speaker-list">
|
||||
{#each $speakers as speaker (speaker.id)}
|
||||
|
||||
@@ -217,6 +217,8 @@
|
||||
.segment-text {
|
||||
line-height: 1.6;
|
||||
padding-left: 0.75rem;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.word {
|
||||
cursor: pointer;
|
||||
|
||||
Reference in New Issue
Block a user