Skip to content

Commit

Permalink
use ne_hifigan default and add options for decoder and stream_chunk_size
Browse files Browse the repository at this point in the history
  • Loading branch information
gorkemgoknar committed Oct 30, 2023
1 parent d54d613 commit 84f9970
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,15 @@ async def predict_streaming_generator(parsed_input: StreamingInputs):
)
text = parsed_input.text
language = parsed_input.language
decoder = parsed_input.get("decoder", "ne_hifigan")

if decoder not in ["ne_hifigan","hifigan"]:
decoder = "ne_hifigan"

stream_chunk_size = int(parsed_input.get("stream_chunk_size", "20"))
add_wav_header = parsed_input.add_wav_header

chunks = model.inference_stream(text, language, gpt_cond_latent, speaker_embedding)
chunks = model.inference_stream(text, language, gpt_cond_latent, speaker_embedding, decoder=decoder,stream_chunk_size=stream_chunk_size)
for i, chunk in enumerate(chunks):
chunk = postprocess(chunk)
if i == 0 and add_wav_header:
Expand Down

0 comments on commit 84f9970

Please sign in to comment.