Compare commits
2 Commits
182a37a672
...
e2cd25007f
Author | SHA1 | Date | |
---|---|---|---|
e2cd25007f | |||
d874613f81 |
@ -62,8 +62,11 @@ def usage():
|
|||||||
|
|
||||||
|
|
||||||
def rate(infile, outfile, rate_ratio):
|
def rate(infile, outfile, rate_ratio):
|
||||||
data, samplerate = sf.read(infile)
|
try:
|
||||||
new_samplerate = int(samplerate * rate_ratio)
|
data, samplerate = sf.read(infile)
|
||||||
|
new_samplerate = int(samplerate * rate_ratio)
|
||||||
|
except sf.LibsndfileError as e:
|
||||||
|
print("ERROR : {0}".format(e))
|
||||||
try:
|
try:
|
||||||
sf.write(outfile, data, new_samplerate)
|
sf.write(outfile, data, new_samplerate)
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user