Skip to content
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

Merged
merged 4 commits into from
Jan 28, 2022
Merged

Conversation

lym0302
Copy link
Contributor

@lym0302 lym0302 commented Jan 28, 2022

PR types
New features

PR changes
add tts postprocess

Describe
speech server
#1368

@lym0302 lym0302 added this to the r0.2.0 milestone Jan 28, 2022
@mergify
Copy link

mergify bot commented Jan 28, 2022

This pull request is now in conflict :(

@mergify mergify bot added the conflicts label Jan 28, 2022
@mergify mergify bot removed the conflicts label Jan 28, 2022

import librosa
import numpy as np
import soundfile as sf
import yaml
from engine.base_engine import BaseEngine
from ffmpeg import audio
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用的这个吗 https://github.com/kkroening/ffmpeg-python? win可以用不?

@@ -104,18 +107,26 @@ def postprocess(self,
wav_vol = wav_tar_fs * volume
Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方可以使用BytesIO替代吗?

Copy link
Contributor Author

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

@WilliamZhang06 WilliamZhang06 merged commit 3573898 into PaddlePaddle:server Jan 28, 2022
@lym0302 lym0302 deleted the tts-server2 branch May 6, 2022 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants