File size: 5,518 Bytes
2a14d63 4c1d311 4bb1489 8e7e856 341ef1d 2a14d63 341ef1d 8e7e856 341ef1d 2a14d63 341ef1d 8e7e856 341ef1d 8e7e856 341ef1d 8e7e856 2a14d63 8e7e856 341ef1d 8e7e856 16fe86c 8e7e856 341ef1d 8e7e856 341ef1d 8e7e856 341ef1d 8e7e856 2a14d63 8e7e856 2a14d63 8e7e856 341ef1d 8e7e856 2a14d63 8e7e856 341ef1d 8e7e856 2a14d63 8e7e856 341ef1d 8e7e856 2a14d63 8e7e856 55e6d95 8e7e856 f6d66a6 8e7e856 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# PAST: Phonetic-Acoustic Speech Tokenizer
**Authors:** [Nadav Har-Tuv](https://scholar.google.com/citations?hl=en&authuser=1&user=txMFmZsAAAAJ), [Or Tal](https://scholar.google.com/citations?user=QK3_J9IAAAAJ&hl=en&authuser=1), [Yossi Adi](https://scholar.google.com/citations?user=ryMtc7sAAAAJ&hl=en&authuser=1)
**Affiliation:** The Hebrew University of Jerusalem
π [Paper PDF](https://arxiv.org/abs/2505.14470) | π [Project Page](https://pages.cs.huji.ac.il/adiyoss-lab/PAST/) | π» [Code](https://github.com/slp-rl/PAST)

## Abstract
We present PAST, a novel end-to-end framework that jointly models phonetic information alongside signal reconstruction, eliminating the need for external pretrained models. Unlike previous approaches that rely on pretrained self-supervised models, PAST employs supervised phonetic data, directly integrating domain knowledge into the tokenization process via auxiliary tasks. Additionally, we introduce a streamable, causal variant of PAST, enabling real-time speech applications. Results demonstrate that PAST surpasses existing evaluated baseline tokenizers across common evaluation metrics, including phonetic representation and speech reconstruction. Notably, PAST also achieves superior performance when serving as a speech representation for speech language models, further highlighting its effectiveness as a foundation for spoken language generation.
## Samples
Audio samples are available on our [project demo page](https://pages.cs.huji.ac.il/adiyoss-lab/PAST/).
## Model List
| Model | Variant | Description |
|:------|:--------|:------------|
| `PAST` | Full | PAST model trained on LibriSpeech + TIMIT |
| `PAST_streamable` | Streamable | Causal variant with 20ms look-ahead |
---
## Usage
### Pre-requisites
Install
```bash
conda create -n past_env python=3.10 -y
conda activate past_env
pip install git+https://github.com/slp-rl/PAST.git
```
Clone
```bash
git clone https://github.com/slp-rl/PAST.git
conda create -n past_env python=3.10 -y
conda activate past_env
pip install -r requirements.txt
```
### Inference
```python
# ---------------
# load PAST model
# ---------------
from past.models.past_model import PastModel
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
model = PastModel.from_pretrained("PAST", device=device) # one of ['PAST', 'PAST_streamable']
# ----------------------------------------------------------------------
# Run on audio: PAST expects a batched input format [Batch, Channels, T]
# ----------------------------------------------------------------------
import torchaudio
def read_one_wav(path, target_sr):
wav, sr = torchaudio.load(path)
if sr != target_sr:
wav = torchaudio.transforms.Resample(sr, target_sr)(wav)
if wav.shape[0] == 2:
wav = wav[:1]
return wav.unsqueeze(0)
wav = read_one_wav("path/to/audio.wav", model.sample_rate).to(device)
with torch.no_grad():
codes, scale = model.encode(wav)
reconstructed = model.decode(codes, scale)
```
### Evaluation
See [Eval README](https://github.com/slp-rl/PAST/eval_readme.md)
---
## Results (from the paper)
### Phonetic Information
| **Tokenizer** | **PNMI β** | **ABX β Within** | **ABX β Across** | **WER β Clean** | **WER β Other** |
|------------------------|------------|------------------|------------------|------------------|------------------|
| D. HuBERT 500 | 0.67 | 3.91 | 4.73 | 11.3 | 24.7 |
| SpeechTokenizer | 0.72 | 3.43 | 4.50 | 18.5 | 41.3 |
| X-Codec | 0.40 | 9.42 | 12.6 | 17.1 | 37.1 |
| **PAST** | **0.75** | **2.82** | **3.54** | 15.7 | 36.8 |
| **PAST - Streamable** | 0.74 | 3.05 | 3.89 | **14.3** | **32.3** |
### Reconstruction Quality
| **Tokenizer** | **SISNR β** | **VISQOL β** | **PESQ β** |
|-------------------------|-------------|--------------|------------|
| EnCodec | 7.49 | 4.48 | 3.88 |
| SpeechTokenizer | 0.44 | 4.38 | 3.15 |
| X-Codec | -7.12 | **4.46** | 3.33 |
| **PAST** | **4.84** | 4.40 | **3.55** |
| **PAST - Streamable** | 3.90 | 4.37 | 3.40 |
### Speech Language Modeling (sWUGGY)
| **Tokenizer** | **sWUGGY β Inter** | **sWUGGY β OOV** |
|-------------------------|--------------------|------------------|
| EnCodec | 56.3 | 53.7 |
| D. HuBERT 500 | 67.9 | 55.4 |
| SpeechTokenizer | 63.7 | 55.6 |
| X-Codec | 55.1 | 52.9 |
| **PAST** | **71.8** | **57.5** |
| **PAST - Streamable** | 70.2 | 56.3 |
---
## Citation
If you use PAST in your work, please cite:
```
@article{har2025past,
title={Past: Phonetic-acoustic speech tokenizer},
author={Har-Tuv, Nadav and Tal, Or and Adi, Yossi},
journal={arXiv preprint arXiv:2505.14470},
year={2025}
}
```
|