mirror of https://github.com/drowe67/LPCNet.git
fix ulaw2lin()
parent
f94e6304e3
commit
3e4d9878de
|
|
@ -3,7 +3,9 @@ import numpy as np
|
|||
import math
|
||||
|
||||
def ulaw2lin(u):
|
||||
return (math.exp(u/128*math.log(256))-1)/255
|
||||
s = np.sign(u)
|
||||
u = np.abs(u)
|
||||
return s*(np.exp(u/128*math.log(256))-1)/255
|
||||
|
||||
|
||||
def lin2ulaw(x):
|
||||
|
|
|
|||
Loading…
Reference in New Issue