huseinzolkepliscicom commited on
Commit
db1992d
·
verified ·
1 Parent(s): a168966

Remove purged example audio references; use your_call.wav placeholder

Browse files
Files changed (1) hide show
  1. README.md +10 -12
README.md CHANGED
@@ -37,18 +37,18 @@ just `transformers` + `descript-audio-codec`.
37
  ```bash
38
  pip install torch torchaudio "transformers>=4.56" "descript-audio-codec>=1.0.0" soundfile "huggingface_hub[cli]"
39
 
40
- # pull the CLI + the two slim checkpoints + example clip straight from the Hub
41
  hf auth login # private repo: log in first (or export HF_TOKEN=hf_...)
42
  hf download Scicom-intl/sidon-callcentre \
43
  infer_callcentre.py fe_callcentre/fe_adapter_full.pt \
44
- decoder_callcentre/decoder_only.pt examples/audio1.mp3 --local-dir sidon-callcentre
45
 
46
  cd sidon-callcentre && python infer_callcentre.py \
47
- --input examples/audio1.mp3 --out-dir out \
48
  --fe-adapter fe_callcentre/fe_adapter_full.pt \
49
  --decoder decoder_callcentre/decoder_only.pt \
50
  --chunk 0 --device cuda # --chunk 0 = NO chunking (default single pass); --device cpu if no GPU
51
- # -> out/audio1_restored48k.wav (clean 48 kHz) + out/audio1_orig48k.wav (A/B)
52
  ```
53
 
54
  Prefer Python (load weights from the Hub with `hf_hub_download`)? See **[Python](#python-pull-weights-from-the-hub)** below.
@@ -66,7 +66,6 @@ Use the **current-run** checkpoints under `fe_callcentre/` and `decoder_callcent
66
  | `decoder_callcentre/decoder_only.pt` | **decoder (inference)** — 188M DAC decoder | ~0.75 GB |
67
  | `fe_callcentre/last.pt`, `decoder_callcentre/last.pt` | raw checkpoints (resume training) | ~2.5 / 2.8 GB |
68
  | `infer_callcentre.py` | inference CLI (below) | — |
69
- | `examples/audio1.mp3` | example 8 kHz call-centre clip | — |
70
 
71
  For inference you only need the two slim files + `infer_callcentre.py`. *(Root-level
72
  `fe_adapter_full.pt` / `decoder_only.pt` are from an earlier run and are superseded.)*
@@ -76,19 +75,18 @@ For inference you only need the two slim files + `infer_callcentre.py`. *(Root-l
76
  ```bash
77
  pip install torch torchaudio "transformers>=4.56" "descript-audio-codec>=1.0.0" soundfile "huggingface_hub[cli]"
78
 
79
- # pull the CLI + the two slim checkpoints + the example clip, straight from this repo
80
  hf auth login # private repo: log in first (or export HF_TOKEN=hf_...)
81
  hf download Scicom-intl/sidon-callcentre \
82
  infer_callcentre.py \
83
  fe_callcentre/fe_adapter_full.pt \
84
  decoder_callcentre/decoder_only.pt \
85
- examples/audio1.mp3 \
86
  --local-dir sidon-callcentre
87
  cd sidon-callcentre
88
 
89
- # restore the example clip end-to-end
90
  python infer_callcentre.py \
91
- --input examples/audio1.mp3 \
92
  --out-dir out \
93
  --fe-adapter fe_callcentre/fe_adapter_full.pt \
94
  --decoder decoder_callcentre/decoder_only.pt \
@@ -96,8 +94,8 @@ python infer_callcentre.py \
96
  ```
97
 
98
  Outputs:
99
- - `out/audio1_restored48k.wav` — the restored **clean 48 kHz** speech.
100
- - `out/audio1_orig48k.wav` — the input, naively upsampled to 48 kHz (no model), for an A/B listen.
101
 
102
  `--input` accepts a **file or a directory** (`.wav/.flac/.mp3/.ogg/.opus/.m4a`). Stereo (e.g.
103
  agent/customer on separate channels) is restored per channel and recombined.
@@ -142,7 +140,7 @@ def restore(path, out="restored48k.wav"): # single straight pass
142
  y = dec(fe(**feats).last_hidden_state.transpose(1, 2)).squeeze().float().cpu().numpy()
143
  sf.write(out, y / (np.abs(y).max() + 1e-9) * 0.97, SR_OUT); print("wrote", out)
144
 
145
- restore(hf_hub_download(REPO, "examples/audio1.mp3"))
146
  ```
147
 
148
  ## Model details
 
37
  ```bash
38
  pip install torch torchaudio "transformers>=4.56" "descript-audio-codec>=1.0.0" soundfile "huggingface_hub[cli]"
39
 
40
+ # pull the CLI + the two slim checkpoints from the Hub
41
  hf auth login # private repo: log in first (or export HF_TOKEN=hf_...)
42
  hf download Scicom-intl/sidon-callcentre \
43
  infer_callcentre.py fe_callcentre/fe_adapter_full.pt \
44
+ decoder_callcentre/decoder_only.pt --local-dir sidon-callcentre
45
 
46
  cd sidon-callcentre && python infer_callcentre.py \
47
+ --input your_call.wav --out-dir out \
48
  --fe-adapter fe_callcentre/fe_adapter_full.pt \
49
  --decoder decoder_callcentre/decoder_only.pt \
50
  --chunk 0 --device cuda # --chunk 0 = NO chunking (default single pass); --device cpu if no GPU
51
+ # -> out/your_call_restored48k.wav (clean 48 kHz) + out/your_call_orig48k.wav (A/B)
52
  ```
53
 
54
  Prefer Python (load weights from the Hub with `hf_hub_download`)? See **[Python](#python-pull-weights-from-the-hub)** below.
 
66
  | `decoder_callcentre/decoder_only.pt` | **decoder (inference)** — 188M DAC decoder | ~0.75 GB |
67
  | `fe_callcentre/last.pt`, `decoder_callcentre/last.pt` | raw checkpoints (resume training) | ~2.5 / 2.8 GB |
68
  | `infer_callcentre.py` | inference CLI (below) | — |
 
69
 
70
  For inference you only need the two slim files + `infer_callcentre.py`. *(Root-level
71
  `fe_adapter_full.pt` / `decoder_only.pt` are from an earlier run and are superseded.)*
 
75
  ```bash
76
  pip install torch torchaudio "transformers>=4.56" "descript-audio-codec>=1.0.0" soundfile "huggingface_hub[cli]"
77
 
78
+ # pull the CLI + the two slim checkpoints, straight from this repo
79
  hf auth login # private repo: log in first (or export HF_TOKEN=hf_...)
80
  hf download Scicom-intl/sidon-callcentre \
81
  infer_callcentre.py \
82
  fe_callcentre/fe_adapter_full.pt \
83
  decoder_callcentre/decoder_only.pt \
 
84
  --local-dir sidon-callcentre
85
  cd sidon-callcentre
86
 
87
+ # restore your audio end-to-end
88
  python infer_callcentre.py \
89
+ --input your_call.wav \
90
  --out-dir out \
91
  --fe-adapter fe_callcentre/fe_adapter_full.pt \
92
  --decoder decoder_callcentre/decoder_only.pt \
 
94
  ```
95
 
96
  Outputs:
97
+ - `out/your_call_restored48k.wav` — the restored **clean 48 kHz** speech.
98
+ - `out/your_call_orig48k.wav` — the input, naively upsampled to 48 kHz (no model), for an A/B listen.
99
 
100
  `--input` accepts a **file or a directory** (`.wav/.flac/.mp3/.ogg/.opus/.m4a`). Stereo (e.g.
101
  agent/customer on separate channels) is restored per channel and recombined.
 
140
  y = dec(fe(**feats).last_hidden_state.transpose(1, 2)).squeeze().float().cpu().numpy()
141
  sf.write(out, y / (np.abs(y).max() + 1e-9) * 0.97, SR_OUT); print("wrote", out)
142
 
143
+ restore("your_call.wav") # <-- your own telephony/call-centre audio
144
  ```
145
 
146
  ## Model details