mirror of https://github.com/coqui-ai/TTS.git
Make style
This commit is contained in:
parent
0f8932a6a9
commit
3b9fca2398
|
@ -79,9 +79,9 @@ def load_voice(model, voice: str, extra_voice_dirs: List[str] = []): # pylint:
|
||||||
# replace the file extension with .npz
|
# replace the file extension with .npz
|
||||||
output_path = os.path.splitext(audio_path)[0] + ".npz"
|
output_path = os.path.splitext(audio_path)[0] + ".npz"
|
||||||
generate_voice(audio=audio_path, model=model, output_path=output_path)
|
generate_voice(audio=audio_path, model=model, output_path=output_path)
|
||||||
breakpoint()
|
|
||||||
return load_voice(model, voice, extra_voice_dirs)
|
return load_voice(model, voice, extra_voice_dirs)
|
||||||
|
|
||||||
|
|
||||||
def zero_crossing_rate(audio, frame_length=1024, hop_length=512):
|
def zero_crossing_rate(audio, frame_length=1024, hop_length=512):
|
||||||
zero_crossings = np.sum(np.abs(np.diff(np.sign(audio))) / 2)
|
zero_crossings = np.sum(np.abs(np.diff(np.sign(audio))) / 2)
|
||||||
total_frames = 1 + int((len(audio) - frame_length) / hop_length)
|
total_frames = 1 + int((len(audio) - frame_length) / hop_length)
|
||||||
|
|
Loading…
Reference in New Issue