Skip to content

Commit

Permalink
Merge pull request #102 from lenML/dev_tts_pipeline
Browse files Browse the repository at this point in the history
Dev tts pipeline
  • Loading branch information
zhzLuke96 authored Jul 13, 2024
2 parents bfc3789 + 846d18f commit 4028da1
Show file tree
Hide file tree
Showing 108 changed files with 2,562 additions and 1,414 deletions.
2 changes: 1 addition & 1 deletion data/load_json_spk.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json

from modules.speaker import speaker_mgr
from modules.core.speaker import speaker_mgr

# 出处: https://github.com/2noise/ChatTTS/issues/238
data = json.load(open("./data/slct_voice_240605.json", "r"))
Expand Down
44 changes: 28 additions & 16 deletions modules/ChatTTS/ChatTTS/model/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,23 +545,35 @@ def generate(
if show_tqdm:
pbar.close()
self.logger.warn("regenerate in order to ensure non-empty")
del_all(attentions)
del_all(hiddens)
del (
start_idx,
end_idx,
finish,
temperature,
attention_mask_cache,
past_key_values,
idx_next,
inputs_ids_tmp,
)
new_gen = self.generate(
emb,
inputs_ids,
old_temperature,
eos_token,
attention_mask,
max_new_token,
min_new_token,
logits_warpers,
logits_processors,
infer_text,
return_attn,
return_hidden,
stream,
show_tqdm,
ensure_non_empty,
context,
emb=emb,
inputs_ids=inputs_ids,
old_temperature=old_temperature,
eos_token=eos_token,
attention_mask=attention_mask,
max_new_token=max_new_token,
min_new_token=min_new_token,
logits_warpers=logits_warpers,
logits_processors=logits_processors,
infer_text=infer_text,
return_attn=return_attn,
return_hidden=return_hidden,
stream=stream,
show_tqdm=show_tqdm,
ensure_non_empty=ensure_non_empty,
context=context,
)
for result in new_gen:
yield result
Expand Down
12 changes: 6 additions & 6 deletions modules/api/impl/google_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

from modules.api import utils as api_utils
from modules.api.Api import APIManager
from modules.api.impl.handler.SSMLHandler import SSMLHandler
from modules.api.impl.handler.TTSHandler import TTSHandler
from modules.api.impl.model.audio_model import AdjustConfig, AudioFormat
from modules.api.impl.model.chattts_model import ChatTTSConfig, InferConfig
from modules.api.impl.model.enhancer_model import EnhancerConfig
from modules.speaker import Speaker, speaker_mgr
from modules.core.handler.datacls.audio_model import AdjustConfig, AudioFormat
from modules.core.handler.datacls.chattts_model import ChatTTSConfig, InferConfig
from modules.core.handler.datacls.enhancer_model import EnhancerConfig
from modules.core.handler.SSMLHandler import SSMLHandler
from modules.core.handler.TTSHandler import TTSHandler
from modules.core.speaker import Speaker, speaker_mgr


class SynthesisInput(BaseModel):
Expand Down
139 changes: 0 additions & 139 deletions modules/api/impl/handler/AudioHandler.py

This file was deleted.

105 changes: 0 additions & 105 deletions modules/api/impl/handler/SSMLHandler.py

This file was deleted.

Loading

0 comments on commit 4028da1

Please sign in to comment.