SYMBOL INDEX (491 symbols across 50 files) FILE: ChatTTS/config/config.py class Path (line 5) | class Path: class Decoder (line 15) | class Decoder: class VQ (line 24) | class VQ: class DVAE (line 32) | class DVAE: class GPT (line 51) | class GPT: class Embed (line 67) | class Embed: class FeatureExtractorInitArgs (line 75) | class FeatureExtractorInitArgs: class FeatureExtractor (line 84) | class FeatureExtractor: class BackboneInitArgs (line 90) | class BackboneInitArgs: class Backbone (line 98) | class Backbone: class FourierHeadInitArgs (line 104) | class FourierHeadInitArgs: class FourierHead (line 112) | class FourierHead: class Vocos (line 118) | class Vocos: class Config (line 125) | class Config: FILE: ChatTTS/core.py class Chat (line 32) | class Chat: method __init__ (line 33) | def __init__(self, logger=logging.getLogger(__name__)): method has_loaded (line 50) | def has_loaded(self, use_decoder=False): method download_models (line 66) | def download_models( method load (line 137) | def load( method unload (line 167) | def unload(self): method sample_random_speaker (line 178) | def sample_random_speaker(self) -> str: method sample_audio_speaker (line 181) | def sample_audio_speaker(self, wav: Union[np.ndarray, torch.Tensor]) -... class RefineTextParams (line 185) | class RefineTextParams: class InferCodeParams (line 198) | class InferCodeParams(RefineTextParams): method infer (line 210) | def infer( method interrupt (line 274) | def interrupt(self): method _load (line 278) | def _load( method _infer (line 390) | def _infer( method _vocos_decode (line 511) | def _vocos_decode(self, spec: torch.Tensor) -> np.ndarray: method _decode_to_wavs (line 518) | def _decode_to_wavs( method _infer_code (line 547) | def _infer_code( method _refine_text (line 670) | def _refine_text( FILE: ChatTTS/model/cuda/patch.py class LlamaRMSNorm (line 4) | class LlamaRMSNorm(torch.nn.Module): method __init__ (line 5) | def __init__(self, hidden_size, eps=1e-6): method forward (line 13) | def forward(self, hidden_states: torch.Tensor): FILE: ChatTTS/model/cuda/te_llama.py function replace_decoder (line 29) | def replace_decoder(te_decoder_cls, llama_rms_norm_cls): class TELlamaDecoderLayer (line 50) | class TELlamaDecoderLayer(te.pytorch.TransformerLayer): method __init__ (line 61) | def __init__(self, config, *args, **kwargs): method forward (line 81) | def forward(self, hidden_states, *args, attention_mask, **kwargs): class TELlamaModel (line 96) | class TELlamaModel: method __new__ (line 106) | def __new__(cls, config: LlamaConfig): method from_state_dict (line 114) | def from_state_dict( function _replace_params (line 134) | def _replace_params(hf_state_dict, te_state_dict, config): FILE: ChatTTS/model/dvae.py class ConvNeXtBlock (line 14) | class ConvNeXtBlock(nn.Module): method __init__ (line 15) | def __init__( method forward (line 46) | def forward(self, x: torch.Tensor, cond=None) -> torch.Tensor: class GFSQ (line 69) | class GFSQ(nn.Module): method __init__ (line 71) | def __init__( method _embed (line 87) | def _embed(self, x: torch.Tensor): method __call__ (line 99) | def __call__(self, x: torch.Tensor) -> torch.Tensor: method forward (line 102) | def forward(self, x: torch.Tensor) -> torch.Tensor: class DVAEDecoder (line 131) | class DVAEDecoder(nn.Module): method __init__ (line 132) | def __init__( method forward (line 163) | def forward(self, x: torch.Tensor, conditioning=None) -> torch.Tensor: class MelSpectrogramFeatures (line 175) | class MelSpectrogramFeatures(torch.nn.Module): method __init__ (line 176) | def __init__( method __call__ (line 199) | def __call__(self, audio: torch.Tensor) -> torch.Tensor: method forward (line 202) | def forward(self, audio: torch.Tensor) -> torch.Tensor: class DVAE (line 209) | class DVAE(nn.Module): method __init__ (line 210) | def __init__( method __repr__ (line 245) | def __repr__(self) -> str: method __call__ (line 250) | def __call__( method load_pretrained (line 256) | def load_pretrained(self, filename: str, device: torch.device): method forward (line 262) | def forward( method sample_audio (line 300) | def sample_audio(self, wav: Union[np.ndarray, torch.Tensor]) -> torch.... FILE: ChatTTS/model/embed.py class Embed (line 8) | class Embed(nn.Module): method __init__ (line 9) | def __init__( method load_pretrained (line 38) | def load_pretrained(self, filename: str, device: torch.device): method __call__ (line 43) | def __call__( method forward (line 52) | def forward(self, input_ids: torch.Tensor, text_mask: torch.Tensor) ->... FILE: ChatTTS/model/gpt.py class GPT (line 21) | class GPT(nn.Module): method __init__ (line 22) | def __init__( method load_pretrained (line 62) | def load_pretrained( class Context (line 106) | class Context: method __init__ (line 107) | def __init__(self): method set (line 110) | def set(self, v: bool): method get (line 113) | def get(self) -> bool: method _build_llama_config (line 116) | def _build_llama_config( method prepare (line 134) | def prepare(self, compile=False): class _GenerationInputs (line 145) | class _GenerationInputs: method to (line 153) | def to(self, device: torch.device, dtype: torch.dtype): method _prepare_generation_inputs (line 164) | def _prepare_generation_inputs( class GenerationOutputs (line 280) | class GenerationOutputs: method destroy (line 285) | def destroy(self): method _prepare_generation_outputs (line 291) | def _prepare_generation_outputs( method generate (line 319) | def generate( FILE: ChatTTS/model/processors.py class CustomRepetitionPenaltyLogitsProcessorRepeat (line 6) | class CustomRepetitionPenaltyLogitsProcessorRepeat: method __init__ (line 8) | def __init__(self, penalty: float, max_input_ids: int, past_window: int): method __call__ (line 18) | def __call__( function gen_logits (line 38) | def gen_logits( FILE: ChatTTS/model/speaker.py class Speaker (line 10) | class Speaker: method __init__ (line 11) | def __init__(self, dim: int, spk_cfg: str, device=torch.device("cpu"))... method sample_random (line 18) | def sample_random(self) -> str: method apply (line 22) | def apply( method decorate_code_prompts (line 56) | def decorate_code_prompts( method decorate_text_prompts (line 86) | def decorate_text_prompts(text: List[str], prompt: str) -> List[str]: method encode_prompt (line 91) | def encode_prompt(prompt: torch.Tensor) -> str: method decode_prompt (line 108) | def decode_prompt(prompt: str) -> torch.Tensor: method _sample_random (line 123) | def _sample_random(self) -> torch.Tensor: method _encode (line 133) | def _encode(spk_emb: torch.Tensor) -> str: method _decode (line 146) | def _decode(spk_emb: str) -> np.ndarray: FILE: ChatTTS/model/tokenizer.py class Tokenizer (line 16) | class Tokenizer: method __init__ (line 17) | def __init__( method encode (line 36) | def encode( method decode (line 129) | def decode( FILE: ChatTTS/model/velocity/block_manager.py class BlockAllocator (line 14) | class BlockAllocator: method __init__ (line 22) | def __init__( method allocate (line 40) | def allocate(self) -> PhysicalTokenBlock: method free (line 47) | def free(self, block: PhysicalTokenBlock) -> None: method get_num_free_blocks (line 54) | def get_num_free_blocks(self) -> int: class AllocStatus (line 58) | class AllocStatus(enum.Enum): class BlockSpaceManager (line 73) | class BlockSpaceManager: method __init__ (line 76) | def __init__( method can_allocate (line 102) | def can_allocate(self, seq_group: SequenceGroup) -> AllocStatus: method allocate (line 119) | def allocate(self, seq_group: SequenceGroup) -> None: method can_append_slot (line 142) | def can_append_slot(self, seq_group: SequenceGroup) -> bool: method append_slot (line 149) | def append_slot(self, seq: Sequence) -> Optional[Tuple[int, int]]: method fork (line 184) | def fork(self, parent_seq: Sequence, child_seq: Sequence) -> None: method _get_physical_blocks (line 192) | def _get_physical_blocks( method can_swap_in (line 204) | def can_swap_in(self, seq_group: SequenceGroup) -> bool: method swap_in (line 214) | def swap_in(self, seq_group: SequenceGroup) -> Dict[int, int]: method can_swap_out (line 239) | def can_swap_out(self, seq_group: SequenceGroup) -> bool: method swap_out (line 243) | def swap_out(self, seq_group: SequenceGroup) -> Dict[int, int]: method _free_block_table (line 268) | def _free_block_table(self, block_table: BlockTable) -> None: method free (line 275) | def free(self, seq: Sequence) -> None: method reset (line 283) | def reset(self) -> None: method get_block_table (line 288) | def get_block_table(self, seq: Sequence) -> List[int]: method get_num_free_gpu_blocks (line 292) | def get_num_free_gpu_blocks(self) -> int: method get_num_free_cpu_blocks (line 295) | def get_num_free_cpu_blocks(self) -> int: FILE: ChatTTS/model/velocity/configs.py class ModelConfig (line 21) | class ModelConfig: method __init__ (line 65) | def __init__( method _verify_load_format (line 121) | def _verify_load_format(self) -> None: method _verify_tokenizer_mode (line 151) | def _verify_tokenizer_mode(self) -> None: method _verify_quantization (line 160) | def _verify_quantization(self) -> None: method _verify_cuda_graph (line 197) | def _verify_cuda_graph(self) -> None: method verify_with_parallel_config (line 204) | def verify_with_parallel_config( method get_sliding_window (line 226) | def get_sliding_window(self) -> Optional[int]: method get_vocab_size (line 229) | def get_vocab_size(self) -> int: method get_hidden_size (line 232) | def get_hidden_size(self) -> int: method get_head_size (line 235) | def get_head_size(self) -> int: method get_total_num_kv_heads (line 239) | def get_total_num_kv_heads(self) -> int: method get_num_kv_heads (line 275) | def get_num_kv_heads(self, parallel_config: "ParallelConfig") -> int: method get_num_layers (line 284) | def get_num_layers(self, parallel_config: "ParallelConfig") -> int: class CacheConfig (line 289) | class CacheConfig: method __init__ (line 299) | def __init__( method _verify_args (line 316) | def _verify_args(self) -> None: method verify_with_parallel_config (line 323) | def verify_with_parallel_config( class ParallelConfig (line 344) | class ParallelConfig: method __init__ (line 355) | def __init__( method _verify_args (line 372) | def _verify_args(self) -> None: class SchedulerConfig (line 377) | class SchedulerConfig: method __init__ (line 390) | def __init__( method _verify_args (line 408) | def _verify_args(self) -> None: function _get_and_verify_dtype (line 437) | def _get_and_verify_dtype( function _get_and_verify_max_len (line 491) | def _get_and_verify_max_len( class EngineArgs (line 551) | class EngineArgs: method __post_init__ (line 582) | def __post_init__(self): method add_cli_args (line 587) | def add_cli_args(parser: argparse.ArgumentParser) -> argparse.Argument... method from_cli_args (line 786) | def from_cli_args(cls, args: argparse.Namespace) -> "EngineArgs": method create_engine_configs (line 793) | def create_engine_configs( class AsyncEngineArgs (line 836) | class AsyncEngineArgs(EngineArgs): method add_cli_args (line 844) | def add_cli_args(parser: argparse.ArgumentParser) -> argparse.Argument... FILE: ChatTTS/model/velocity/llama.py class LlamaMLP (line 59) | class LlamaMLP(nn.Module): method __init__ (line 61) | def __init__( method forward (line 85) | def forward(self, x): class LlamaAttention (line 92) | class LlamaAttention(nn.Module): method __init__ (line 94) | def __init__( method forward (line 153) | def forward( class LlamaDecoderLayer (line 169) | class LlamaDecoderLayer(nn.Module): method __init__ (line 171) | def __init__( method forward (line 201) | def forward( class LlamaModel (line 228) | class LlamaModel(nn.Module): method __init__ (line 230) | def __init__( method forward (line 251) | def forward( method load_weights (line 272) | def load_weights( class LlamaForCausalLM (line 317) | class LlamaForCausalLM(nn.Module): method __init__ (line 319) | def __init__( method forward (line 331) | def forward( method sample (line 341) | def sample( method load_weights (line 351) | def load_weights( FILE: ChatTTS/model/velocity/llm.py class LLM (line 13) | class LLM: method __init__ (line 68) | def __init__( method get_tokenizer (line 113) | def get_tokenizer(self) -> Union[PreTrainedTokenizer, PreTrainedTokeni... method set_tokenizer (line 116) | def set_tokenizer( method generate (line 122) | def generate( method _add_request (line 182) | def _add_request( method _run_engine (line 193) | def _run_engine(self, use_tqdm: bool) -> List[RequestOutput]: FILE: ChatTTS/model/velocity/llm_engine.py class LLMEngine (line 38) | class LLMEngine: method __init__ (line 65) | def __init__( method _init_workers (line 127) | def _init_workers(self): method _init_workers_ray (line 151) | def _init_workers_ray(self, placement_group: "PlacementGroup", **ray_r... method _verify_args (line 258) | def _verify_args(self) -> None: method _init_cache (line 262) | def _init_cache(self) -> None: method from_engine_args (line 308) | def from_engine_args( method add_request (line 326) | def add_request( method abort_request (line 365) | def abort_request(self, request_id: Union[str, Iterable[str]]) -> None: method get_model_config (line 373) | def get_model_config(self) -> ModelConfig: method get_num_unfinished_requests (line 377) | def get_num_unfinished_requests(self) -> int: method has_unfinished_requests (line 381) | def has_unfinished_requests(self) -> bool: method _check_beam_search_early_stopping (line 385) | def _check_beam_search_early_stopping( method _process_sequence_group_outputs (line 429) | def _process_sequence_group_outputs( method _process_model_outputs (line 613) | def _process_model_outputs( method step (line 637) | def step(self) -> List[RequestOutput]: method _log_system_stats (line 667) | def _log_system_stats( method _decode_sequence (line 742) | def _decode_sequence(self, seq: Sequence, prms: SamplingParams) -> None: method _check_stop (line 763) | def _check_stop(self, seq: Sequence, sampling_params: SamplingParams) ... method _run_workers (line 799) | def _run_workers( FILE: ChatTTS/model/velocity/model_loader.py function _set_default_torch_dtype (line 16) | def _set_default_torch_dtype(dtype: torch.dtype): function get_model (line 24) | def get_model(model_config: ModelConfig) -> nn.Module: FILE: ChatTTS/model/velocity/model_runner.py class ModelRunner (line 38) | class ModelRunner: method __init__ (line 40) | def __init__( method load_model (line 80) | def load_model(self) -> None: method set_block_size (line 95) | def set_block_size(self, block_size: int) -> None: method _prepare_prompt (line 105) | def _prepare_prompt( method _prepare_decode (line 179) | def _prepare_decode( method _prepare_sample (line 279) | def _prepare_sample( method prepare_input_tensors (line 353) | def prepare_input_tensors( method execute_model (line 460) | def execute_model( method profile_run (line 599) | def profile_run(self) -> None: method capture_model (line 633) | def capture_model(self, kv_caches: List[KVCache]) -> None: class CUDAGraphRunner (line 692) | class CUDAGraphRunner: method __init__ (line 694) | def __init__(self, model: nn.Module): method capture (line 700) | def capture( method forward (line 743) | def forward( method __call__ (line 772) | def __call__(self, *args, **kwargs): function _pad_to_max (line 776) | def _pad_to_max(x: List[int], max_len: int, pad: int) -> List[int]: function _make_tensor_with_pad (line 783) | def _make_tensor_with_pad( function _get_graph_batch_size (line 806) | def _get_graph_batch_size(batch_size: int) -> int: function _async_h2d (line 815) | def _async_h2d(data: list, dtype, pin_memory): FILE: ChatTTS/model/velocity/output.py class CompletionOutput (line 12) | class CompletionOutput: method __init__ (line 26) | def __init__( method finished (line 44) | def finished(self) -> bool: method __repr__ (line 47) | def __repr__(self) -> str: class RequestOutput (line 59) | class RequestOutput: method __init__ (line 71) | def __init__( method from_seq_group (line 88) | def from_seq_group(cls, seq_group: SequenceGroup) -> "RequestOutput": method __repr__ (line 136) | def __repr__(self) -> str: FILE: ChatTTS/model/velocity/sampler.py class Sampler (line 8) | class Sampler: method __init__ (line 9) | def __init__(self, post_model: Embed, num_audio_tokens: int, num_vq: i... method sample (line 15) | def sample( FILE: ChatTTS/model/velocity/sampling_params.py class SamplingType (line 12) | class SamplingType(IntEnum): class SamplingParams (line 24) | class SamplingParams: method __init__ (line 94) | def __init__( method _verify_args (line 180) | def _verify_args(self) -> None: method _verify_beam_search (line 222) | def _verify_beam_search(self) -> None: method _verify_non_beam_search (line 240) | def _verify_non_beam_search(self) -> None: method _verify_greedy_sampling (line 255) | def _verify_greedy_sampling(self) -> None: method sampling_type (line 262) | def sampling_type(self) -> SamplingType: method __repr__ (line 269) | def __repr__(self) -> str: FILE: ChatTTS/model/velocity/scheduler.py class PreemptionMode (line 20) | class PreemptionMode(enum.Enum): class SchedulerOutputs (line 34) | class SchedulerOutputs: method __init__ (line 36) | def __init__( method is_empty (line 56) | def is_empty(self) -> bool: class Scheduler (line 66) | class Scheduler: method __init__ (line 68) | def __init__( method add_seq_group (line 99) | def add_seq_group(self, seq_group: SequenceGroup) -> None: method abort_seq_group (line 103) | def abort_seq_group(self, request_id: Union[str, Iterable[str]]) -> None: method has_unfinished_seqs (line 124) | def has_unfinished_seqs(self) -> bool: method get_num_unfinished_seq_groups (line 127) | def get_num_unfinished_seq_groups(self) -> int: method _schedule (line 130) | def _schedule(self) -> SchedulerOutputs: method schedule (line 295) | def schedule(self) -> Tuple[List[SequenceGroupMetadata], SchedulerOutp... method fork_seq (line 321) | def fork_seq(self, parent_seq: Sequence, child_seq: Sequence) -> None: method free_seq (line 324) | def free_seq(self, seq: Sequence) -> None: method free_finished_seq_groups (line 327) | def free_finished_seq_groups(self) -> None: method _allocate (line 332) | def _allocate(self, seq_group: SequenceGroup) -> None: method _append_slot (line 337) | def _append_slot( method _preempt (line 351) | def _preempt( method _preempt_by_recompute (line 380) | def _preempt_by_recompute( method _preempt_by_swap (line 393) | def _preempt_by_swap( method _swap_in (line 401) | def _swap_in( method _swap_out (line 411) | def _swap_out( FILE: ChatTTS/model/velocity/sequence.py class SequenceStatus (line 14) | class SequenceStatus(enum.Enum): method is_finished (line 26) | def is_finished(status: "SequenceStatus") -> bool: method get_finished_reason (line 35) | def get_finished_reason(status: "SequenceStatus") -> Union[str, None]: class SequenceData (line 52) | class SequenceData: method __init__ (line 65) | def __init__( method append_token_id (line 75) | def append_token_id(self, token_id: int, logprob: float) -> None: method append_hidden_states (line 84) | def append_hidden_states(self, hidden_states: torch.Tensor) -> None: method get_len (line 90) | def get_len(self) -> int: method get_prompt_len (line 93) | def get_prompt_len(self) -> int: method get_output_len (line 96) | def get_output_len(self) -> int: method get_token_ids (line 99) | def get_token_ids(self) -> List[int]: method get_last_token_id (line 102) | def get_last_token_id(self) -> int: method __repr__ (line 107) | def __repr__(self) -> str: class Sequence (line 118) | class Sequence: method __init__ (line 129) | def __init__( method _append_logical_block (line 155) | def _append_logical_block(self) -> None: method _append_tokens_to_blocks (line 162) | def _append_tokens_to_blocks(self, token_ids: List[int]) -> None: method append_token_id (line 177) | def append_token_id( method get_len (line 191) | def get_len(self) -> int: method get_prompt_len (line 194) | def get_prompt_len(self) -> int: method get_output_len (line 197) | def get_output_len(self) -> int: method get_token_ids (line 200) | def get_token_ids(self) -> List[int]: method get_last_token_id (line 203) | def get_last_token_id(self) -> int: method get_output_token_ids (line 206) | def get_output_token_ids(self) -> List[int]: method get_cumulative_logprob (line 209) | def get_cumulative_logprob(self) -> float: method get_beam_search_score (line 212) | def get_beam_search_score( method is_finished (line 232) | def is_finished(self) -> bool: method fork (line 235) | def fork(self, new_seq_id: int) -> "Sequence": method __repr__ (line 240) | def __repr__(self) -> str: class SequenceGroup (line 248) | class SequenceGroup: method __init__ (line 258) | def __init__( method prompt (line 272) | def prompt(self) -> str: method prompt_token_ids (line 278) | def prompt_token_ids(self) -> List[int]: method get_max_num_running_seqs (line 283) | def get_max_num_running_seqs(self) -> int: method get_seqs (line 300) | def get_seqs( method get_unfinished_seqs (line 309) | def get_unfinished_seqs(self) -> List[Sequence]: method get_finished_seqs (line 312) | def get_finished_seqs(self) -> List[Sequence]: method num_seqs (line 315) | def num_seqs(self, status: Optional[SequenceStatus] = None) -> int: method num_unfinished_seqs (line 318) | def num_unfinished_seqs(self) -> int: method num_finished_seqs (line 321) | def num_finished_seqs(self) -> int: method find (line 324) | def find(self, seq_id: int) -> Sequence: method add (line 329) | def add(self, seq: Sequence) -> None: method remove (line 334) | def remove(self, seq_id: int) -> None: method is_finished (line 339) | def is_finished(self) -> bool: method __repr__ (line 342) | def __repr__(self) -> str: class SequenceGroupMetadata (line 350) | class SequenceGroupMetadata: method __init__ (line 363) | def __init__( class SequenceOutput (line 378) | class SequenceOutput: method __init__ (line 389) | def __init__( method __repr__ (line 403) | def __repr__(self) -> str: method __eq__ (line 412) | def __eq__(self, other: object) -> bool: class SequenceGroupOutput (line 422) | class SequenceGroupOutput: method __init__ (line 425) | def __init__( method __repr__ (line 433) | def __repr__(self) -> str: method __eq__ (line 439) | def __eq__(self, other: object) -> bool: FILE: ChatTTS/model/velocity/worker.py class Worker (line 19) | class Worker: method __init__ (line 27) | def __init__( method init_model (line 64) | def init_model(self) -> None: method load_model (line 88) | def load_model(self): method profile_num_available_blocks (line 92) | def profile_num_available_blocks( method init_cache_engine (line 125) | def init_cache_engine(self, cache_config: CacheConfig) -> None: method warm_up_model (line 134) | def warm_up_model(self) -> None: method cache_swap (line 141) | def cache_swap( method execute_model (line 168) | def execute_model( function _init_distributed_environment (line 207) | def _init_distributed_environment( function _check_if_gpu_supports_dtype (line 241) | def _check_if_gpu_supports_dtype(torch_dtype: torch.dtype): FILE: ChatTTS/norm.py function _find_index (line 14) | def _find_index(table: np.ndarray, val: np.uint16): function _fast_replace (line 22) | def _fast_replace( function _split_tags (line 38) | def _split_tags(text: str) -> Tuple[List[str], List[str]]: function _combine_tags (line 61) | def _combine_tags(texts: List[str], tags: List[str]) -> str: class Normalizer (line 71) | class Normalizer: method __init__ (line 72) | def __init__(self, map_file_path: str, logger=logging.getLogger(__name... method __call__ (line 163) | def __call__( method register (line 203) | def register(self, name: str, normalizer: Callable[[str], str]) -> bool: method unregister (line 218) | def unregister(self, name: str): method destroy (line 222) | def destroy(self): method _load_homophones_map (line 226) | def _load_homophones_map(self, map_file_path: str) -> np.ndarray: method _count_invalid_characters (line 235) | def _count_invalid_characters(self, s: str): method _apply_half2full_map (line 240) | def _apply_half2full_map(self, text: str) -> str: method _apply_character_map (line 243) | def _apply_character_map(self, text: str) -> str: method _detect_language (line 246) | def _detect_language(self, sentence: str) -> Literal["zh", "en"]: FILE: ChatTTS/utils/dl.py function sha256 (line 12) | def sha256(fileno: int) -> str: function check_model (line 19) | def check_model( function check_folder (line 46) | def check_folder( function check_all_assets (line 66) | def check_all_assets(base_dir: Path, sha256_map: Dict[str, str], update=... function download_and_extract_tar_gz (line 114) | def download_and_extract_tar_gz( function download_and_extract_zip (line 130) | def download_and_extract_zip( function download_all_assets (line 146) | def download_all_assets(tmpdir: str, homedir: str, version="0.2.11"): FILE: ChatTTS/utils/gpu.py function select_device (line 13) | def select_device(min_memory=2047, experimental=False): function _is_torch_npu_available (line 59) | def _is_torch_npu_available(): FILE: ChatTTS/utils/io.py function load_safetensors (line 20) | def load_safetensors(filename: str): function get_latest_modified_file (line 28) | def get_latest_modified_file(directory): function del_all (line 41) | def del_all(d: Union[dict, list]): FILE: ChatTTS/utils/log.py class Logger (line 5) | class Logger: method __init__ (line 6) | def __init__(self, logger=logging.getLogger(Path(__file__).parent.name)): method set_logger (line 9) | def set_logger(self, logger: logging.Logger): method get_logger (line 12) | def get_logger(self) -> logging.Logger: FILE: examples/api/main.py function startup_event (line 37) | async def startup_event(): function validation_exception_handler (line 53) | async def validation_exception_handler(request, exc: RequestValidationEr... class ChatTTSParams (line 58) | class ChatTTSParams(BaseModel): function generate_voice (line 72) | async def generate_voice(params: ChatTTSParams): FILE: examples/api/openai_api.py function startup_event (line 63) | async def startup_event(): class OpenAITTSRequest (line 106) | class OpenAITTSRequest(BaseModel): method validate_request (line 129) | def validate_request(cls, request_data: Dict): function custom_exception_handler (line 140) | async def custom_exception_handler(request, exc): function generate_voice (line 150) | async def generate_voice(request_data: Dict): function health_check (line 283) | async def health_check(): FILE: examples/api/postScript.py function parse_arguments (line 15) | def parse_arguments(): function main (line 179) | def main(): FILE: examples/cmd/run.py function save_mp3_file (line 24) | def save_mp3_file(wav, index): function load_normalizer (line 32) | def load_normalizer(chat: ChatTTS.Chat): function main (line 54) | def main( FILE: examples/cmd/stream.py class ChatStreamer (line 9) | class ChatStreamer: method __init__ (line 10) | def __init__(self, base_block_size=8000): method _update_stream (line 15) | def _update_stream(history_stream_wav, new_stream_wav, thre): method _accum (line 33) | def _accum(accum_wavs, stream_wav): method batch_stream_formatted (line 42) | def batch_stream_formatted(stream_wav, output_format="PCM16_byte"): method formatted (line 51) | def formatted(data, output_format="PCM16_byte"): method checkvoice (line 60) | def checkvoice(data): method _subgen (line 68) | def _subgen(data, thre=12000): method generate (line 74) | def generate(self, streamchat, output_format=None): method play (line 148) | def play(self, streamchat, wait=5): FILE: examples/onnx/exporter.py function export_gpt (line 40) | def export_gpt(): function export_decoder (line 349) | def export_decoder(): function export_vocos (line 373) | def export_vocos(): FILE: examples/onnx/gpt.py class GPT (line 11) | class GPT(nn.Module): method __init__ (line 12) | def __init__( method from_pretrained (line 75) | def from_pretrained(self, file_path: str): method _build_llama (line 80) | def _build_llama( FILE: examples/onnx/modeling_llama.py function _make_causal_mask (line 55) | def _make_causal_mask( function _expand_mask (line 86) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class LlamaRMSNorm (line 102) | class LlamaRMSNorm(nn.Module): method __init__ (line 103) | def __init__(self, hidden_size, eps=1e-6): method forward (line 111) | def forward(self, hidden_states): class LlamaRotaryEmbedding (line 119) | class LlamaRotaryEmbedding(torch.nn.Module): method __init__ (line 120) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 138) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 154) | def forward(self, x, seq_len=None): class LlamaLinearScalingRotaryEmbedding (line 165) | class LlamaLinearScalingRotaryEmbedding(LlamaRotaryEmbedding): method __init__ (line 168) | def __init__( method _set_cos_sin_cache (line 179) | def _set_cos_sin_cache(self, seq_len, device, dtype): class LlamaDynamicNTKScalingRotaryEmbedding (line 197) | class LlamaDynamicNTKScalingRotaryEmbedding(LlamaRotaryEmbedding): method __init__ (line 200) | def __init__( method _set_cos_sin_cache (line 211) | def _set_cos_sin_cache(self, seq_len, device, dtype): function rotate_half (line 239) | def rotate_half(x): function apply_rotary_pos_emb (line 246) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): class LlamaMLP (line 259) | class LlamaMLP(nn.Module): method __init__ (line 260) | def __init__(self, config): method forward (line 270) | def forward(self, x): function repeat_kv (line 298) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class LlamaAttention (line 312) | class LlamaAttention(nn.Module): method __init__ (line 315) | def __init__(self, config: LlamaConfig): method _init_rope (line 345) | def _init_rope(self): method _shape (line 368) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 375) | def forward( class LlamaDecoderLayer (line 508) | class LlamaDecoderLayer(nn.Module): method __init__ (line 509) | def __init__(self, config: LlamaConfig): method forward (line 519) | def forward( class LlamaPreTrainedModel (line 597) | class LlamaPreTrainedModel(PreTrainedModel): method _init_weights (line 604) | def _init_weights(self, module): method _set_gradient_checkpointing (line 615) | def _set_gradient_checkpointing(self, module, value=False): class LlamaModel (line 688) | class LlamaModel(LlamaPreTrainedModel): method __init__ (line 696) | def __init__(self, config: LlamaConfig): method get_input_embeddings (line 713) | def get_input_embeddings(self): method set_input_embeddings (line 716) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 720) | def _prepare_decoder_attention_mask( method forward (line 748) | def forward( class LlamaForCausalLM (line 901) | class LlamaForCausalLM(LlamaPreTrainedModel): method __init__ (line 904) | def __init__(self, config): method get_input_embeddings (line 914) | def get_input_embeddings(self): method set_input_embeddings (line 917) | def set_input_embeddings(self, value): method get_output_embeddings (line 920) | def get_output_embeddings(self): method set_output_embeddings (line 923) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 926) | def set_decoder(self, decoder): method get_decoder (line 929) | def get_decoder(self): method forward (line 936) | def forward( method prepare_inputs_for_generation (line 1041) | def prepare_inputs_for_generation( method _reorder_cache (line 1077) | def _reorder_cache(past_key_values, beam_idx): class LlamaForSequenceClassification (line 1104) | class LlamaForSequenceClassification(LlamaPreTrainedModel): method __init__ (line 1105) | def __init__(self, config): method get_input_embeddings (line 1114) | def get_input_embeddings(self): method set_input_embeddings (line 1117) | def set_input_embeddings(self, value): method forward (line 1121) | def forward( FILE: examples/web/funcs.py function generate_seed (line 50) | def generate_seed(): function on_voice_change (line 55) | def on_voice_change(vocie_selection): function on_audio_seed_change (line 59) | def on_audio_seed_change(audio_seed_input): function load_chat (line 65) | def load_chat(cust_path: Optional[str], coef: Optional[str], enable_cach... function reload_chat (line 97) | def reload_chat(coef: Optional[str]) -> str: function on_upload_sample_audio (line 120) | def on_upload_sample_audio(sample_audio_input: Optional[str]) -> str: function _set_generate_buttons (line 129) | def _set_generate_buttons(generate_button, interrupt_button, is_reset=Fa... function refine_text (line 135) | def refine_text( function generate_audio (line 166) | def generate_audio( function interrupt_generate (line 214) | def interrupt_generate(): function set_buttons_before_generate (line 221) | def set_buttons_before_generate(generate_button, interrupt_button): function set_buttons_after_generate (line 233) | def set_buttons_after_generate(generate_button, interrupt_button, audio_... FILE: examples/web/webui.py function main (line 17) | def main(): FILE: tests/#588.py function trim_tags (line 39) | def trim_tags(txt: str) -> str: FILE: tools/audio/av.py function wav2 (line 21) | def wav2(i: BytesIO, o: BufferedWriter, format: str): function load_audio (line 43) | def load_audio( FILE: tools/audio/ffmpeg.py function has_ffmpeg_installed (line 4) | def has_ffmpeg_installed() -> bool: FILE: tools/audio/np.py function float_to_int16 (line 8) | def float_to_int16(audio: np.ndarray) -> np.ndarray: FILE: tools/audio/pcm.py function _pcm_to_wav_buffer (line 8) | def _pcm_to_wav_buffer(wav: np.ndarray, sample_rate: int = 24000) -> Byt... function pcm_arr_to_mp3_view (line 35) | def pcm_arr_to_mp3_view(wav: np.ndarray, sample_rate: int = 24000) -> me... function pcm_arr_to_ogg_view (line 54) | def pcm_arr_to_ogg_view(wav: np.ndarray, sample_rate: int = 24000) -> me... function pcm_arr_to_wav_view (line 73) | def pcm_arr_to_wav_view( FILE: tools/checksum/main.go function main (line 11) | func main() { FILE: tools/checksum/tmpl.go constant jsontmpl (line 17) | jsontmpl = `{ FILE: tools/llm/llm.py class ChatOpenAI (line 55) | class ChatOpenAI: method __init__ (line 56) | def __init__(self, api_key, base_url, model): method call (line 63) | def call(self, user_question, temperature=0.3, prompt_version="kimi", ... FILE: tools/logger/log.py class Formatter (line 37) | class Formatter(logging.Formatter): method __init__ (line 38) | def __init__(self, color=platform.system().lower() != "windows"): method format (line 43) | def format(self, record: logging.LogRecord): function get_logger (line 58) | def get_logger(name: str, lv=logging.INFO, remove_exist=False, format_ro... FILE: tools/normalizer/en.py function normalizer_en_nemo_text (line 5) | def normalizer_en_nemo_text() -> Callable[[str], str]: FILE: tools/normalizer/zh.py function normalizer_zh_tn (line 4) | def normalizer_zh_tn() -> Callable[[str], str]: FILE: tools/seeder/ctx.py class TorchSeedContext (line 4) | class TorchSeedContext: method __init__ (line 5) | def __init__(self, seed): method __enter__ (line 9) | def __enter__(self): method __exit__ (line 13) | def __exit__(self, type, value, traceback):