--- license: cc-by-nc-sa-4.0 language: - en pipeline_tag: feature-extraction tags: - audio - speaker-verification - speaker-embedding - voice-authentication - tflite - litert - quantized - dynamic-range-quantization base_model: - facebook/w2v-bert-2.0 - zl389/w2v-bert-2.0_SV --- # Speaker Embedding W2V-BERT TFLite Package This repository contains a two-stage TFLite/LiteRT speaker embedding package for local CPU testing: deterministic waveform feature extraction followed by a dynamic-range quantized W2V-BERT feature-to-embedding model. ## Files | File | Purpose | | --- | --- | | `speaker_feature_extractor.tflite` | TFLite waveform-to-`input_features` preprocessing. | | `speaker_feature_extractor.tflite.manifest.json` | Feature extractor conversion/runtime manifest. | | `speaker_features_to_embedding.tflite` | TFLite `input_features`-to-embedding flatbuffer. | | `speaker_features_to_embedding.tflite.manifest.json` | Conversion/runtime manifest. | | `artifact_manifest.json` | Clean upload metadata, checksum, and source lineage. | ## Source lineage This is a converted/quantized derivative of a speaker verification stack built from: - Base model: [`facebook/w2v-bert-2.0`](https://huggingface.co/facebook/w2v-bert-2.0) - Speaker checkpoint / adapter: [`zl389/w2v-bert-2.0_SV`](https://huggingface.co/zl389/w2v-bert-2.0_SV) - Original implementation repo: Direct upstream artifact links used by this project: - W2V-BERT base weights: - Speaker checkpoint: GitHub repositories cannot be attached to the Hugging Face `base_model` field in the same way as Hub models, so the implementation source is listed explicitly above and in `artifact_manifest.json`. ## Runtime contract This package is a two-flatbuffer pipeline rather than a single direct waveform-to-embedding flatbuffer. - Sample rate: `16000 Hz` - Stage 1 input: waveform `[1, 64000]`, `float32` - Stage 1 output: `input_features` `[1, 199, 160]`, `float32` - Stage 1 preprocessing: SeamlessM4T/Kaldi fbank feature extraction equivalent to the W2V-BERT feature extractor configuration from `facebook/w2v-bert-2.0` - Stage 2 input: `input_features` `[1, 199, 160]`, `float32` - Stage 2 output: speaker embedding `[1, 256]`, `float32` - Stage 2 quantization mode: dynamic-range - Recommended postprocessing: L2-normalize each chunk embedding, average chunk embeddings for longer audio, then L2-normalize the pooled vector. ## Limitations - This is an experimental converted artifact, not an upstream official release. - It is packaged as two TFLite files; callers must run stage 1 before stage 2. - Quantization can shift speaker similarity scores. Recalibrate thresholds for your deployment. - The upstream speaker assets are marked in this project as CC BY-NC-SA 4.0 / research/testing unless legal review approves broader use.