Skip to content

Commit 2c0239f

Browse files
committed
exploration of alternative wavtokenizer
1 parent 02d5bb5 commit 2c0239f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/tts/convert_pt_to_hf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def flatten_state_dict(state_dict, parent_key='', sep='.'):
154154
"architectures": [
155155
"WavTokenizerDec"
156156
],
157-
"hidden_size": 1282,
157+
"hidden_size": 1282, # or 2402 for 40t/s
158158
"n_embd_features": 512,
159159
"n_ff": 2304,
160160
"vocab_size": 4096,

otherarch/tts_adapter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ static std::vector<float> embd_to_audio(
152152
const int n_codes,
153153
const int n_embd,
154154
const int n_thread) {
155-
const int n_fft = 1280;
156-
const int n_hop = 320;
157-
const int n_win = 1280;
155+
const int n_hop = 600;
156+
const int n_fft = n_hop*4; //its 1280 at 320, or 2400 at 600
157+
const int n_win = n_hop*4;
158158
const int n_pad = (n_win - n_hop)/2;
159159
const int n_out = (n_codes - 1)*n_hop + n_win;
160160

0 commit comments

Comments
 (0)