mirror of
https://github.com/xiph/opus.git
synced 2025-05-20 18:38:34 +00:00
Making it easier to change the frame size
This commit is contained in:
parent
38cd5cf08f
commit
dc082d7c1c
4 changed files with 7 additions and 5 deletions
|
@ -36,6 +36,7 @@ import numpy as np
|
|||
import h5py
|
||||
import sys
|
||||
|
||||
frame_size = 160
|
||||
pcm_bits = 8
|
||||
embed_size = 128
|
||||
pcm_levels = 2**pcm_bits
|
||||
|
@ -139,7 +140,7 @@ def new_lpcnet_model(rnn_units1=384, rnn_units2=16, nb_used_features = 38, use_g
|
|||
|
||||
cfeat = fdense2(fdense1(cfeat))
|
||||
|
||||
rep = Lambda(lambda x: K.repeat_elements(x, 160, 1))
|
||||
rep = Lambda(lambda x: K.repeat_elements(x, frame_size, 1))
|
||||
|
||||
if use_gpu:
|
||||
rnn = CuDNNGRU(rnn_units1, return_sequences=True, return_state=True, name='gru_a')
|
||||
|
@ -158,6 +159,7 @@ def new_lpcnet_model(rnn_units1=384, rnn_units2=16, nb_used_features = 38, use_g
|
|||
model.rnn_units1 = rnn_units1
|
||||
model.rnn_units2 = rnn_units2
|
||||
model.nb_used_features = nb_used_features
|
||||
model.frame_size = frame_size
|
||||
|
||||
encoder = Model([feat, pitch], cfeat)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue