wq2012 commited on
Commit
380c509
·
1 Parent(s): 808238e

Update model.tflite with dynamic-range quantization and fix architecture/parameter metadata

Browse files
Files changed (3) hide show
  1. README.md +7 -7
  2. evaluation_metrics.json +4 -2
  3. model.tflite +2 -2
README.md CHANGED
@@ -37,8 +37,8 @@ Multi-source attention sequence-to-sequence **Acoustic Echo Cancellation (`AEC-S
37
 
38
  - **Condition**: Multiple interfering voices (LibriTTS + VCTK)
39
  - **Dataset Splits**: 400 training utterances (`train`), 100 validation utterances (`dev`), 100 `test-clean` utterances, and 100 `test-other` utterances at 24 kHz mixed at 0 dB SNR with synthetic image-method room impulse responses (RT60 = 0.25 s).
40
- - **Architecture**: Speech encoder (`SpeechEncoderV1`: 2× Conv2D + 4× Bi-LSTM + 1× Bi-CLSTM with stride `(2, 2)`), text encoder (`TtsEncoderV2`: 98-symbol character vocabulary `VOCAB_SIZE = 98`, 3× Conv1D + 1× Bi-LSTM, for TEC models), multi-source additive location-sensitive + content attention decoder (`SpeechEnhancementDecoderV1`: 1× autoregressive ZoneOut LSTM + 2× post-attention LSTM + 5×5 ConvTranspose2D + 2-layer Highway Postnet).
41
- - **Trainable Parameters**: `4,654,184`
42
  - **Checkpoint Selection**: Validation-loss early stopping (`best.ckpt` selected on the 100-utterance `dev` split over 500 training steps with batch size 8 and Adam `lr = 1e-3`).
43
 
44
  ---
@@ -146,7 +146,7 @@ ckpt_path = os.path.join(model_dir, "best.ckpt")
146
  result = inference.run_inference_on_wav(
147
  model_name="AecMultiInterfering",
148
  mixed_wav_path="/path/to/mixed_input.wav",
149
- interfering_text="currently in mountain view it is 72 degrees",
150
  checkpoint_path=ckpt_path,
151
  output_wav_path="/tmp/enhanced_clean.wav",
152
  )
@@ -167,18 +167,18 @@ model_dir = snapshot_download(repo_id="wq2012/aec_multi_interfering")
167
  tflite_path = os.path.join(model_dir, "model.tflite")
168
 
169
  dummy_mel = np.zeros((100, 128), dtype=np.float32)
170
- enhanced_mel = inference.run_tflite_inference(
171
  tflite_path=tflite_path,
172
  mixed_mel=dummy_mel,
173
- interfering_text="currently in mountain view it is 72 degrees",
174
  )
175
- print("TFLite predicted log-Mel shape:", enhanced_mel.shape)
176
  ```
177
 
178
  Expected console output:
179
 
180
  ```text
181
- TFLite predicted log-Mel shape: (1, 100, 128)
182
  ```
183
 
184
  ---
 
37
 
38
  - **Condition**: Multiple interfering voices (LibriTTS + VCTK)
39
  - **Dataset Splits**: 400 training utterances (`train`), 100 validation utterances (`dev`), 100 `test-clean` utterances, and 100 `test-other` utterances at 24 kHz mixed at 0 dB SNR with synthetic image-method room impulse responses (RT60 = 0.25 s).
40
+ - **Architecture**: Speech encoder (`SpeechEncoderV1`: 2× strided 3×3 Conv2D with stride `(2, 2)`, 1× Bi-CLSTM with stride `(1, 1)`, and 3× Bi-LSTM layers), text encoder (`TtsEncoderV2`: 98-symbol ASCII character vocabulary `VOCAB_SIZE = 98`, 512-dim embedding, 3× Conv1D + 1× Bi-LSTM, for TEC models), and multi-source GMM monotonic attention decoder (`MultiSourceFbeDecoderV1` / `FbeDecoderV1`: 2×256 Pre-Net, 2-layer autoregressive LSTM, frame reduction factor `r = 4`, and 5-layer 1D convolutional `PostEditConvNet`).
41
+ - **Trainable Parameters**: `18,496,991` (`18,501,730` total model variables; `221.98 MB` checkpoint shard; `19.18 MB` dynamic-range quantized `model.tflite`)
42
  - **Checkpoint Selection**: Validation-loss early stopping (`best.ckpt` selected on the 100-utterance `dev` split over 500 training steps with batch size 8 and Adam `lr = 1e-3`).
43
 
44
  ---
 
146
  result = inference.run_inference_on_wav(
147
  model_name="AecMultiInterfering",
148
  mixed_wav_path="/path/to/mixed_input.wav",
149
+ interfering_wav_path="/path/to/reference_tts.wav",
150
  checkpoint_path=ckpt_path,
151
  output_wav_path="/tmp/enhanced_clean.wav",
152
  )
 
167
  tflite_path = os.path.join(model_dir, "model.tflite")
168
 
169
  dummy_mel = np.zeros((100, 128), dtype=np.float32)
170
+ tflite_out = inference.run_tflite_inference(
171
  tflite_path=tflite_path,
172
  mixed_mel=dummy_mel,
173
+ interfering_mel=dummy_mel,
174
  )
175
+ print("TFLite predicted log-Mel shape:", tflite_out["predicted_mel"].shape)
176
  ```
177
 
178
  Expected console output:
179
 
180
  ```text
181
+ TFLite predicted log-Mel shape: (100, 128)
182
  ```
183
 
184
  ---
evaluation_metrics.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "model": "AecMultiInterfering",
3
  "condition": "Multiple interfering voices (LibriTTS + VCTK)",
4
- "trainable_parameters": 4654184,
5
  "test_clean": {
6
  "method": "AecMultiInterfering",
7
  "text_condition": "matched",
@@ -3995,5 +3995,7 @@
3995
  "As Master thinks best, Charles Gordon, leader of the class, the council declined to comment."
3996
  ]
3997
  }
3998
- }
 
 
3999
  }
 
1
  {
2
  "model": "AecMultiInterfering",
3
  "condition": "Multiple interfering voices (LibriTTS + VCTK)",
4
+ "trainable_parameters": 18496991,
5
  "test_clean": {
6
  "method": "AecMultiInterfering",
7
  "text_condition": "matched",
 
3995
  "As Master thinks best, Charles Gordon, leader of the class, the council declined to comment."
3996
  ]
3997
  }
3998
+ },
3999
+ "total_model_variables": 18501730,
4000
+ "tflite_quantized_bytes": 19179592
4001
  }
model.tflite CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1e008085f2bce3597d50b001fe4e33f10b53fbdd72fa4c1ca502701e30d69c9a
3
- size 74568956
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:081675589f57268b092ad6135480f00906821e9d987ad27ab33de025fc383ff6
3
+ size 19179592