Il prossimoProssima guida
Diarizzazione degli oratori
IA audio
GUIDA AI audio
Un x-vector è un elenco a lunghezza fissa di numeri che una rete neurale estrae da un tratto di parlato per riassumere chi sta parlando, indipendentemente da ciò che viene detto.
Ascolta questa guidaNarrato dall'IA · ~7 min
Introdotti dai ricercatori della Johns Hopkins University nel 2018, gli x-vector hanno sostituito gli i-vector come rappresentazione standard del parlante per la verifica vocale e per la diarizzazione, che etichetta chi ha parlato quando in una registrazione.
An x-vector is a speaker embedding: a short, fixed-length vector of numbers, typically a few hundred values, that represents the characteristics of a voice in a stretch of audio. Two recordings of the same person should produce x-vectors that are close together, and recordings of different people should produce vectors that are far apart, whatever words are spoken. The term comes from a 2018 ICASSP paper by David Snyder, Daniel Garcia-Romero, Gregory Sell, Daniel Povey and Sanjeev Khudanpur at Johns Hopkins University's Center for Language and Speech Processing. Because the embedding has the same size no matter how long the input is, systems can store, compare and cluster voices with simple arithmetic.
The extraction pipeline works step by step. First, audio is converted into frames of acoustic features; the original system used 24-dimensional filterbank energies from 25-millisecond frames, normalized over a sliding window of up to 3 seconds, and an energy-based detector dropped silent frames. Second, five frame-level layers form a time-delay neural network (TDNN), a network whose layers each look at a small window of neighboring frames, so by the fifth layer each output sees 15 frames of context. Third, a statistics pooling layer takes the mean and standard deviation of those frame outputs over the whole segment, turning a variable number of frames into one 3,000-value vector. Fourth, segment-level layers process that summary, and during training a final softmax layer classifies which of the N training speakers is talking. After training, the softmax is thrown away and the 512-value output of the first segment-level layer, taken before its nonlinearity, is the x-vector.
Comparing two x-vectors is a separate step called the backend. In the original paper, x-vectors were centered, reduced to 150 dimensions with linear discriminant analysis (LDA), a projection that emphasizes differences between speakers, length-normalized, and then scored with probabilistic linear discriminant analysis (PLDA), a statistical model that outputs how much more likely two vectors are to come from the same speaker than from different ones. Splitting the system into an embedding network and a separately trained scorer let researchers reuse the backend tools developed over years for the earlier i-vector approach. Simpler deployments often use cosine similarity between embeddings instead.
The x-vector built on earlier work. Before it, most speaker recognition used i-vectors, which project statistics from a Gaussian mixture model into a low-dimensional vector learned without speaker labels. Google researchers had trained an end-to-end network on the phrase OK Google, and the Johns Hopkins group adapted the idea to text-independent speech with a temporal pooling layer in 2017. The 2018 paper's contribution was showing that data augmentation makes the neural approach clearly better. Training data was multiplied threefold with copies corrupted by babble from three to seven overlapping speakers, music, background noise from the MUSAN corpus, or simulated room reverberation. Augmentation helped the supervised x-vector network far more than the unsupervised i-vector extractor.
The numbers in that paper show the effect. Without augmentation, x-vectors were slightly worse than i-vectors on Speakers in the Wild, a set of noisy English video recordings, with 9.40% equal error rate (EER) against 9.29%. EER is the error rate at the threshold where false accepts and false rejects are equal, so lower is better. With augmentation of both the network and the PLDA training data, and with the VoxCeleb celebrity interview corpus added, x-vectors reached 4.16% EER on Speakers in the Wild against 7.45% for acoustic i-vectors, and 5.71% on Cantonese telephone speech against 9.23%. The trained network has about 4.2 million parameters, excluding layers dropped after training.
Compared with alternatives, x-vectors sit in the middle of a lineage. The i-vector approach needs no speaker labels, but in the 2018 comparison it exploited extra and augmented training data less effectively. End-to-end systems that learn the embedding and the scoring together can be powerful but historically needed large proprietary datasets. Later architectures kept the x-vector recipe of frame layers plus pooling and improved its parts. ECAPA-TDNN, published at Interspeech 2020 by Brecht Desplanques and colleagues, added Res2Net blocks, squeeze-and-excitation channel attention, multi-layer feature aggregation and attentive statistics pooling, and reported 0.87% EER on the VoxCeleb1 test set against 1.49% for an extended x-vector baseline. ResNet-style networks borrowed from computer vision are another common choice.
X-vectors have well-documented limitations. Their accuracy depends on how closely training conditions match deployment: the 2018 paper's training data was dominated by 8 kHz telephone speech, and adding microphone data from VoxCeleb produced large gains on microphone test sets. Short recordings carry less information, and the evaluation sets in the paper used utterances of roughly 6 seconds or longer. Embeddings capture channel, language and recording effects alongside the voice, so the backend usually needs data from the target domain for normalization. Diarization adds difficulties of its own, such as overlapping speech, which the DIHARD challenge chose to score in full. An x-vector system is trained to tell enrolled human speakers apart, not to detect synthetic or replayed audio, so voice-authentication products typically need separate anti-spoofing checks.
In practice, x-vectors are inexpensive to run. The network is small enough for a CPU, and pretrained models are freely available, including the original Kaldi recipe and SpeechBrain's VoxCeleb model, which takes 16 kHz single-channel audio. Training a strong model from scratch needs thousands of labeled speakers; VoxCeleb1 and VoxCeleb2 together provide 7,363 celebrities from YouTube interview videos, released for research through a request form with a privacy notice. Because voiceprints can identify people, stored x-vectors are a form of biometric data and deserve the same consent and security practices as other identity records.
04Esempio lavorato
Registra due clip di almeno diversi secondi ciascuna, convertite in file WAV mono a 16 kHz.
Carica il modello spkrec-xvect-voxceleb di SpeechBrain con EncoderClassifier.from_hparams.
Chiama encode_batch su ciascuna clip per ottenere un x-vector per registrazione.
Calcola la similarità coseno tra i due vettori, un valore compreso tra -1 e 1.
Ripeti con coppie che sai essere dello stesso speaker e coppie che sai essere diverse, e registra i punteggi.
Scegli una soglia decisionale che separi i due gruppi, idealmente su coppie di test.
Cosa mostra
Le coppie dello stesso speaker dovrebbero ottenere punteggi notevolmente più alti rispetto a quelle di speaker diversi, e la soglia trasforma i punteggi in decisioni di accettazione o rifiuto. Verifica l'affidabilità stimando il tasso di errore uguale su un set di test separato, e testa separatamente clip rumorose o brevi, poiché entrambe riducono l'accuratezza.
Verifica del parlante: confrontare una registrazione di enrolment con una nuova enunciazione per decidere se provengono dalla stessa voce, il compito valutato nel paper x-vector del 2018 su Speakers in the Wild e NIST SRE 2016 Cantonese.
Diarizzazione di registrazioni difficili: il miglior sistema del team Johns Hopkins nella sfida inaugurale DIHARD ha raggruppato x-vector addestrati su dati di microfono a banda larga, per poi affinare il risultato con un passo Variational-Bayesian.
Embedding pronti all'uso in Python: il modello spkrec-xvect-voxceleb di SpeechBrain con licenza Apache-2.0, addestrato su VoxCeleb1 e VoxCeleb2, estrae x-vector da audio a 16 kHz e riporta un tasso di errore uguale del 3,2% sul set di test VoxCeleb1.
Pipeline open-source nel toolkit di riconoscimento vocale Kaldi, dove gli autori originali hanno pubblicato la loro ricetta x-vector e un sistema preaddestrato per il riutilizzo da parte di altri.
Una baseline per modelli di speaker più recenti come ECAPA-TDNN, il cui paper del 2020 riporta un tasso di errore uguale dello 0,87% su VoxCeleb1 contro 1,49% per una baseline x-vector estesa.
Dal 2018, la ricerca si è concentrata su encoder più potenti e su funzioni di perdita di addestramento basate sullo stesso modello embedding-plus-pooling. ECAPA-TDNN del 2020 ha mostrato guadagni sostanziali grazie all’attenzione sul canale e al pooling attento. La ricerca sulla diarizzazione, influenzata da sfide come DIHARD che è iniziata nel 2018, continua a lottare con il sovrapposizione del parlato e condizioni di registrazione altamente variabili, dove il clustering di embedding fissi fatica. Due preoccupazioni probabilmente plasmeranno il deployment. La prima è la robustezza al parlato sintetico, poiché gli embedding del parlante sono addestrati a separare i veri parlanti umani e non segnalano di per sé voci clonate o riprodotte. La seconda è la governance: le impronte vocali sono identificatori biometrici, e i dataset come VoxCeleb sono distribuiti con avvisi di privacy espliciti. Come i regolatori e le organizzazioni trattano gli embedding del parlante memorizzati, e quanto bene i futuri sistemi resistono allo spoofing, sono domande aperte piuttosto che risultati consolidati.
Newsletter gratuita
Tre storie verificate sull'IA ogni mattina nei giorni feriali, scritte in un inglese semplice. Gratuito per sempre, senza pubblicità.
Un'email ogni giorno feriale. Disiscriviti con un clic. Non vendiamo né condividiamo mai il tuo indirizzo.
Mettiti alla prova
Feedback immediato su ogni risposta e un certificato condivisibile con un ID verificabile una volta superato un corso.
Sostieni l'istruzione gratuita sull'IA. AI Understanding è un'organizzazione non profit 501(c)(3) — nessun annuncio, nessun paywall, mai. Fai una donazione
Un x-vector è un elenco di numeri a lunghezza fissa che una rete neurale estrae da un tratto di parlato per riassumere chi sta parlando, indipendentemente da ciò che viene detto. Introdotti da ricercatori della Johns Hopkins University nel 2018, gli x-vector hanno sostituito gli i-vector come rappresentazione standard dell'oratore per la verifica vocale e per la diarizzazione, che etichetta chi ha parlato quando in una registrazione.
Gli embedding dell'oratore mirano a rappresentare l'identità vocale, ma la loro qualità può dipendere dal contenuto, dalla durata, dal rumore e dalle condizioni del canale.
Il pooling delle statistiche aggrega le attivazioni a livello di frame in statistiche sulla media e sulla deviazione standard a livello di espressione, producendo una rappresentazione di dimensione fissa.
Il classico estrattore di vettori x è un TDNN addestrato per classificare gli altoparlanti, con l'incorporamento letto da uno strato nascosto.
La somiglianza viene solitamente misurata con la distanza del coseno o valutata con un modello PLDA per giudicare se due incorporamenti corrispondono.
Il documento ha confrontato il suo sistema x-vector appreso con baseline i-vector in esperimenti specifici, piuttosto che dimostrare una sostituzione universale di ogni implementazione i-vector.
Continua a imparare
Altre guide selezionate per questo argomento
Il prossimoProssima guida
Diarizzazione degli oratori
IA audio