-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[server] add tts postprocess #1411
Conversation
This pull request is now in conflict :( |
|
||
import librosa | ||
import numpy as np | ||
import soundfile as sf | ||
import yaml | ||
from engine.base_engine import BaseEngine | ||
from ffmpeg import audio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -104,18 +107,26 @@ def postprocess(self, | |||
wav_vol = wav_tar_fs * volume |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个调整应该支持扩大了wave的数值,可能会出现截幅吧?
temp_wav = str(hash) + ".wav" | ||
temp_speed_wav = str(hash + 1) + ".wav" | ||
sf.write(temp_wav, wav_vol.reshape(-1, 1), target_fs) | ||
audio.a_speed(temp_wav, speed, temp_speed_wav) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方可以使用BytesIO替代吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果后续不用a_speed可以尝试,用 a_speed不能用BytesIO
PR types
New features
PR changes
add tts postprocess
Describe
speech server
#1368