mirror of
https://github.com/xiph/opus.git
synced 2025-05-28 06:09:15 +00:00
using features (except pitch gain which has NaNs for now)
This commit is contained in:
parent
b65031ef64
commit
617e462be3
2 changed files with 12 additions and 5 deletions
|
@ -12,12 +12,19 @@ import sys
|
|||
rnn_units=64
|
||||
pcm_bits = 8
|
||||
pcm_levels = 2**pcm_bits
|
||||
nb_used_features = 37
|
||||
|
||||
|
||||
def new_wavernn_model():
|
||||
pcm = Input(shape=(None, 1))
|
||||
feat = Input(shape=(None, nb_used_features))
|
||||
|
||||
rep = Lambda(lambda x: K.repeat_elements(x, 160, 1))
|
||||
|
||||
rnn = CuDNNGRU(rnn_units, return_sequences=True)
|
||||
rnn_in = Concatenate()([pcm, rep(feat)])
|
||||
md = MDense(pcm_levels, activation='softmax')
|
||||
ulaw_prob = md(rnn(pcm))
|
||||
ulaw_prob = md(rnn(rnn_in))
|
||||
|
||||
model = Model(pcm, ulaw_prob)
|
||||
model = Model([pcm, feat], ulaw_prob)
|
||||
return model
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue