SYMBOL INDEX (273 symbols across 28 files) FILE: cli/SparkTTS.py class SparkTTS (line 27) | class SparkTTS: method __init__ (line 32) | def __init__(self, model_dir: Path, device: torch.device = torch.devic... method _initialize_inference (line 46) | def _initialize_inference(self): method process_prompt (line 53) | def process_prompt( method process_prompt_control (line 110) | def process_prompt_control( method inference (line 158) | def inference( FILE: cli/inference.py function parse_args (line 28) | def parse_args(): function run_tts (line 64) | def run_tts(args): FILE: runtime/triton_trtllm/client_grpc.py class UserData (line 65) | class UserData: method __init__ (line 66) | def __init__(self): method record_start_time (line 71) | def record_start_time(self): method get_first_chunk_latency (line 74) | def get_first_chunk_latency(self): function callback (line 79) | def callback(user_data, result, error): function write_triton_stats (line 89) | def write_triton_stats(stats, summary_file): function get_args (line 145) | def get_args(): function load_audio (line 262) | def load_audio(wav_path, target_sample_rate=16000): function prepare_request_input_output (line 276) | def prepare_request_input_output( function run_sync_streaming_inference (line 332) | def run_sync_streaming_inference( function send_streaming (line 433) | async def send_streaming( function send (line 517) | async def send( function load_manifests (line 565) | def load_manifests(manifest_path): function split_data (line 586) | def split_data(data, k): function main (line 608) | async def main(): function run_main (line 823) | async def run_main(): FILE: runtime/triton_trtllm/client_http.py function get_args (line 32) | def get_args(): function prepare_request (line 83) | def prepare_request( FILE: runtime/triton_trtllm/model_repo/audio_tokenizer/1/model.py class TritonPythonModel (line 37) | class TritonPythonModel: method initialize (line 44) | def initialize(self, args): method get_ref_clip (line 59) | def get_ref_clip(self, wav: np.ndarray) -> np.ndarray: method execute (line 86) | def execute(self, requests): FILE: runtime/triton_trtllm/model_repo/spark_tts/1/model.py function process_prompt (line 41) | def process_prompt( class TritonPythonModel (line 101) | class TritonPythonModel: method initialize (line 108) | def initialize(self, args): method forward_llm (line 139) | def forward_llm(self, input_ids): method forward_audio_tokenizer (line 223) | def forward_audio_tokenizer(self, wav, wav_len): method forward_vocoder (line 252) | def forward_vocoder(self, global_token_ids: torch.Tensor, pred_semanti... method token2wav (line 283) | def token2wav(self, generated_token_ids, global_token_ids): method execute (line 305) | def execute(self, requests): FILE: runtime/triton_trtllm/model_repo/vocoder/1/model.py class TritonPythonModel (line 43) | class TritonPythonModel: method initialize (line 50) | def initialize(self, args): method execute (line 72) | def execute(self, requests): FILE: runtime/triton_trtllm/scripts/convert_checkpoint.py function parse_arguments (line 18) | def parse_arguments(): function args_to_quant_config (line 160) | def args_to_quant_config(args: argparse.Namespace) -> QuantConfig: function update_quant_config_from_hf (line 194) | def update_quant_config_from_hf(quant_config, hf_config, function args_to_build_options (line 224) | def args_to_build_options(args): function convert_and_save_hf (line 233) | def convert_and_save_hf(args): function execute (line 287) | def execute(workers, func, args): function main (line 306) | def main(): FILE: runtime/triton_trtllm/scripts/fill_template.py function split (line 6) | def split(string, delimiter): function main (line 34) | def main(file_path, substitutions, in_place): FILE: sparktts/models/audio_tokenizer.py class BiCodecTokenizer (line 29) | class BiCodecTokenizer: method __init__ (line 32) | def __init__(self, model_dir: Path, device: torch.device = None, **kwa... method _initialize_model (line 44) | def _initialize_model(self): method get_ref_clip (line 57) | def get_ref_clip(self, wav: np.ndarray) -> np.ndarray: method process_audio (line 72) | def process_audio(self, wav_path: Path) -> Tuple[np.ndarray, torch.Ten... method extract_wav2vec2_features (line 85) | def extract_wav2vec2_features(self, wavs: torch.Tensor) -> torch.Tensor: method tokenize_batch (line 101) | def tokenize_batch(self, batch: Dict[str, Any]) -> torch.Tensor: method tokenize (line 119) | def tokenize(self, audio_path: str) -> Tuple[torch.Tensor, torch.Tensor]: method detokenize (line 132) | def detokenize( FILE: sparktts/models/bicodec.py class BiCodec (line 31) | class BiCodec(nn.Module): method __init__ (line 37) | def __init__( method load_from_checkpoint (line 70) | def load_from_checkpoint(cls, model_dir: Path, **kwargs) -> "BiCodec": method forward (line 113) | def forward(self, batch: Dict[str, Any]) -> Dict[str, Any]: method tokenize (line 152) | def tokenize(self, batch: Dict[str, Any]): method detokenize (line 172) | def detokenize(self, semantic_tokens, global_tokens): method init_mel_transformer (line 191) | def init_mel_transformer(self, config: Dict[str, Any]): method remove_weight_norm (line 213) | def remove_weight_norm(self): FILE: sparktts/modules/blocks/layers.py function WNConv1d (line 24) | def WNConv1d(*args, **kwargs): function WNConvTranspose1d (line 28) | def WNConvTranspose1d(*args, **kwargs): function snake (line 34) | def snake(x, alpha): class Snake1d (line 42) | class Snake1d(nn.Module): method __init__ (line 43) | def __init__(self, channels): method forward (line 47) | def forward(self, x): class ResidualUnit (line 51) | class ResidualUnit(nn.Module): method __init__ (line 52) | def __init__(self, dim: int = 16, dilation: int = 1): method forward (line 62) | def forward(self, x): function init_weights (line 70) | def init_weights(m): FILE: sparktts/modules/blocks/samper.py class SamplingBlock (line 22) | class SamplingBlock(nn.Module): method __init__ (line 25) | def __init__( method repeat_upsampler (line 72) | def repeat_upsampler(x, upsample_scale): method skip_downsampler (line 76) | def skip_downsampler(x, downsample_scale): method forward (line 79) | def forward(self, x): FILE: sparktts/modules/blocks/vocos.py class ConvNeXtBlock (line 26) | class ConvNeXtBlock(nn.Module): method __init__ (line 38) | def __init__( method forward (line 65) | def forward( class AdaLayerNorm (line 87) | class AdaLayerNorm(nn.Module): method __init__ (line 96) | def __init__(self, condition_dim: int, embedding_dim: int, eps: float ... method forward (line 105) | def forward(self, x: torch.Tensor, cond_embedding: torch.Tensor) -> to... class ResBlock1 (line 113) | class ResBlock1(nn.Module): method __init__ (line 129) | def __init__( method forward (line 235) | def forward(self, x: torch.Tensor) -> torch.Tensor: method remove_weight_norm (line 246) | def remove_weight_norm(self): method get_padding (line 253) | def get_padding(kernel_size: int, dilation: int = 1) -> int: class Backbone (line 257) | class Backbone(nn.Module): method forward (line 260) | def forward(self, x: torch.Tensor, **kwargs) -> torch.Tensor: class VocosBackbone (line 273) | class VocosBackbone(Backbone): method __init__ (line 287) | def __init__( method _init_weights (line 319) | def _init_weights(self, m): method forward (line 324) | def forward(self, x: torch.Tensor, condition: torch.Tensor = None) -> ... class VocosResNetBackbone (line 338) | class VocosResNetBackbone(Backbone): method __init__ (line 349) | def __init__( method forward (line 369) | def forward(self, x: torch.Tensor, **kwargs) -> torch.Tensor: FILE: sparktts/modules/encoder_decoder/feat_decoder.py class Decoder (line 26) | class Decoder(nn.Module): method __init__ (line 34) | def __init__( method forward (line 78) | def forward(self, x: torch.Tensor, c: torch.Tensor = None): FILE: sparktts/modules/encoder_decoder/feat_encoder.py class Encoder (line 26) | class Encoder(nn.Module): method __init__ (line 29) | def __init__( method forward (line 76) | def forward(self, x: torch.Tensor, *args): FILE: sparktts/modules/encoder_decoder/wave_generator.py class DecoderBlock (line 29) | class DecoderBlock(nn.Module): method __init__ (line 30) | def __init__( method forward (line 52) | def forward(self, x): class WaveGenerator (line 56) | class WaveGenerator(nn.Module): method __init__ (line 57) | def __init__( method forward (line 87) | def forward(self, x): FILE: sparktts/modules/fsq/finite_scalar_quantization.py function exists (line 22) | def exists(v): function default (line 26) | def default(*args): function maybe (line 33) | def maybe(fn): function pack_one (line 43) | def pack_one(t, pattern): function unpack_one (line 47) | def unpack_one(t, ps, pattern): function round_ste (line 54) | def round_ste(z: Tensor) -> Tensor: class FSQ (line 63) | class FSQ(Module): method __init__ (line 64) | def __init__( method bound (line 126) | def bound(self, z, eps: float = 1e-3): method quantize (line 133) | def quantize(self, z): method _scale_and_shift (line 139) | def _scale_and_shift(self, zhat_normalized): method _scale_and_shift_inverse (line 143) | def _scale_and_shift_inverse(self, zhat): method _indices_to_codes (line 147) | def _indices_to_codes(self, indices): method codes_to_indices (line 152) | def codes_to_indices(self, zhat): method indices_to_level_indices (line 158) | def indices_to_level_indices(self, indices): method indices_to_codes (line 164) | def indices_to_codes(self, indices): method forward (line 182) | def forward(self, z): FILE: sparktts/modules/fsq/residual_fsq.py function exists (line 16) | def exists(val): function first (line 20) | def first(l): function default (line 24) | def default(val, d): function round_up_multiple (line 28) | def round_up_multiple(num, mult): function is_distributed (line 35) | def is_distributed(): function get_maybe_sync_seed (line 39) | def get_maybe_sync_seed(device, max_size=10_000): class ResidualFSQ (line 48) | class ResidualFSQ(Module): method __init__ (line 51) | def __init__( method codebooks (line 107) | def codebooks(self): method get_codes_from_indices (line 112) | def get_codes_from_indices(self, indices): method get_output_from_indices (line 153) | def get_output_from_indices(self, indices): method forward (line 158) | def forward(self, x, return_all_codes=False, rand_quantize_dropout_fix... class GroupedResidualFSQ (line 269) | class GroupedResidualFSQ(Module): method __init__ (line 270) | def __init__(self, *, dim, groups=1, accept_image_fmap=False, **kwargs): method codebooks (line 287) | def codebooks(self): method split_dim (line 291) | def split_dim(self): method get_codes_from_indices (line 294) | def get_codes_from_indices(self, indices): method get_output_from_indices (line 301) | def get_output_from_indices(self, indices): method forward (line 308) | def forward(self, x, return_all_codes=False): FILE: sparktts/modules/speaker/ecapa_tdnn.py class Res2Conv1dReluBn (line 28) | class Res2Conv1dReluBn(nn.Module): method __init__ (line 33) | def __init__( method forward (line 67) | def forward(self, x): class Conv1dReluBn (line 89) | class Conv1dReluBn(nn.Module): method __init__ (line 91) | def __init__( method forward (line 107) | def forward(self, x): class SE_Connect (line 115) | class SE_Connect(nn.Module): method __init__ (line 117) | def __init__(self, channels, se_bottleneck_dim=128): method forward (line 122) | def forward(self, x): class SE_Res2Block (line 135) | class SE_Res2Block(nn.Module): method __init__ (line 137) | def __init__(self, channels, kernel_size, stride, padding, dilation, s... method forward (line 148) | def forward(self, x): class ECAPA_TDNN (line 152) | class ECAPA_TDNN(nn.Module): method __init__ (line 154) | def __init__( method forward (line 191) | def forward(self, x, return_latent=False): function ECAPA_TDNN_c1024 (line 211) | def ECAPA_TDNN_c1024(feat_dim, embed_dim, pooling_func="ASTP", emb_bn=Fa... function ECAPA_TDNN_GLOB_c1024 (line 221) | def ECAPA_TDNN_GLOB_c1024(feat_dim, embed_dim, pooling_func="ASTP", emb_... function ECAPA_TDNN_c512 (line 232) | def ECAPA_TDNN_c512(feat_dim, embed_dim, pooling_func="ASTP", emb_bn=Fal... function ECAPA_TDNN_GLOB_c512 (line 242) | def ECAPA_TDNN_GLOB_c512(feat_dim, embed_dim, pooling_func="ASTP", emb_b... FILE: sparktts/modules/speaker/perceiver_encoder.py function exists (line 29) | def exists(val): function once (line 33) | def once(fn): class Attend (line 52) | class Attend(nn.Module): method __init__ (line 53) | def __init__(self, dropout=0.0, causal=False, use_flash=False): method get_mask (line 90) | def get_mask(self, n, device): method flash_attn (line 98) | def flash_attn(self, q, k, v, mask=None): method forward (line 135) | def forward(self, q, k, v, mask=None): function Sequential (line 181) | def Sequential(*mods): function exists (line 185) | def exists(x): function default (line 189) | def default(val, d): class RMSNorm (line 195) | class RMSNorm(nn.Module): method __init__ (line 196) | def __init__(self, dim, scale=True, dim_cond=None): method forward (line 204) | def forward(self, x, cond=None): class CausalConv1d (line 217) | class CausalConv1d(nn.Conv1d): method __init__ (line 218) | def __init__(self, *args, **kwargs): method forward (line 227) | def forward(self, x): class GEGLU (line 232) | class GEGLU(nn.Module): method forward (line 233) | def forward(self, x): function FeedForward (line 238) | def FeedForward(dim, mult=4, causal_conv=False): class Attention (line 254) | class Attention(nn.Module): method __init__ (line 255) | def __init__( method forward (line 280) | def forward(self, x, context=None, mask=None): class PerceiverResampler (line 297) | class PerceiverResampler(nn.Module): method __init__ (line 298) | def __init__( method forward (line 339) | def forward(self, x, mask=None): FILE: sparktts/modules/speaker/pooling_layers.py class TAP (line 27) | class TAP(nn.Module): method __init__ (line 32) | def __init__(self, in_dim=0, **kwargs): method forward (line 36) | def forward(self, x): method get_out_dim (line 42) | def get_out_dim(self): class TSDP (line 47) | class TSDP(nn.Module): method __init__ (line 52) | def __init__(self, in_dim=0, **kwargs): method forward (line 56) | def forward(self, x): method get_out_dim (line 62) | def get_out_dim(self): class TSTP (line 67) | class TSTP(nn.Module): method __init__ (line 74) | def __init__(self, in_dim=0, **kwargs): method forward (line 78) | def forward(self, x): method get_out_dim (line 87) | def get_out_dim(self): class ASTP (line 92) | class ASTP(nn.Module): method __init__ (line 97) | def __init__(self, method forward (line 119) | def forward(self, x): method get_out_dim (line 146) | def get_out_dim(self): class MHASTP (line 151) | class MHASTP(torch.nn.Module): method __init__ (line 158) | def __init__(self, method forward (line 193) | def forward(self, input): method get_out_dim (line 220) | def get_out_dim(self): class MQMHASTP (line 225) | class MQMHASTP(torch.nn.Module): method __init__ (line 247) | def __init__(self, method forward (line 266) | def forward(self, input): method get_out_dim (line 283) | def get_out_dim(self): FILE: sparktts/modules/speaker/speaker_encoder.py class SpeakerEncoder (line 29) | class SpeakerEncoder(nn.Module): method __init__ (line 44) | def __init__( method get_codes_from_indices (line 71) | def get_codes_from_indices(self, indices: torch.Tensor) -> torch.Tensor: method get_indices (line 75) | def get_indices(self, mels: torch.Tensor) -> torch.Tensor: method forward (line 81) | def forward(self, mels: torch.Tensor) -> Tuple[torch.Tensor, torch.Ten... method tokenize (line 100) | def tokenize(self, mels: torch.Tensor) -> torch.Tensor: method detokenize (line 107) | def detokenize(self, indices: torch.Tensor) -> torch.Tensor: FILE: sparktts/modules/vq/factorized_vector_quantize.py function WNConv1d (line 28) | def WNConv1d(*args, **kwargs): function ema_inplace (line 32) | def ema_inplace(moving_avg, new, decay): class FactorizedVectorQuantize (line 36) | class FactorizedVectorQuantize(nn.Module): method __init__ (line 37) | def __init__( method forward (line 70) | def forward(self, z: torch.Tensor) -> Dict[str, Any]: method vq2emb (line 142) | def vq2emb(self, vq, out_proj=True): method tokenize (line 148) | def tokenize(self, z: torch.Tensor) -> torch.Tensor: method detokenize (line 154) | def detokenize(self, indices): method get_emb (line 160) | def get_emb(self): method embed_code (line 163) | def embed_code(self, embed_id): method decode_code (line 166) | def decode_code(self, embed_id): method decode_latents (line 169) | def decode_latents(self, latents): FILE: sparktts/utils/audio.py function audio_volume_normalize (line 33) | def audio_volume_normalize(audio: np.ndarray, coeff: float = 0.2) -> np.... function load_audio (line 76) | def load_audio( function random_select_audio_segment (line 122) | def random_select_audio_segment(audio: np.ndarray, length: int) -> np.nd... function audio_highpass_filter (line 137) | def audio_highpass_filter(audio, sample_rate, highpass_cutoff_freq): function stft (line 152) | def stft( function detect_speech_boundaries (line 186) | def detect_speech_boundaries( function remove_silence_on_both_ends (line 228) | def remove_silence_on_both_ends( function hertz_to_mel (line 258) | def hertz_to_mel(pitch: float) -> float: FILE: sparktts/utils/file.py function resolve_symbolic_link (line 34) | def resolve_symbolic_link(symbolic_link_path: Path) -> Path: function write_jsonl (line 50) | def write_jsonl(metadata: List[dict], file_path: Path) -> None: function read_jsonl (line 69) | def read_jsonl(file_path: Path) -> List[dict]: function read_json_as_jsonl (line 94) | def read_json_as_jsonl(file_path: Path) -> List[dict]: function decode_unicode_strings (line 106) | def decode_unicode_strings(meta: Dict[str, Any]) -> Dict[str, Any]: function load_config (line 116) | def load_config(config_path: Path) -> DictConfig: function jsonl_to_csv (line 134) | def jsonl_to_csv(jsonl_file_path: str, csv_file_path: str) -> None: function save_metadata (line 169) | def save_metadata(data, filename, headers=None): function read_metadata (line 192) | def read_metadata(filename, headers=None): FILE: sparktts/utils/token_parser.py class TokenParser (line 66) | class TokenParser: method __init__ (line 69) | def __init__(self): method __init__ (line 74) | def __init__(self): method age (line 78) | def age(age: str) -> str: method gender (line 84) | def gender(gender: str) -> str: method mel_value (line 90) | def mel_value(mel: int): method mel_level (line 97) | def mel_level(level: str): method pitch_var_value (line 103) | def pitch_var_value(pitch_std: int): method pitch_var_level (line 111) | def pitch_var_level(level: str): method loudness_value (line 117) | def loudness_value(loudness: int): method loudness_level (line 125) | def loudness_level(level: str): method speed_value (line 131) | def speed_value(speed: int): method speed_level (line 138) | def speed_level(level: str): method task (line 144) | def task(task: str) -> str: method emotion (line 151) | def emotion(emotion: str): FILE: webui.py function initialize_model (line 29) | def initialize_model(model_dir="pretrained_models/Spark-TTS-0.5B", devic... function run_tts (line 51) | def run_tts( function build_ui (line 94) | def build_ui(model_dir, device=0): function parse_arguments (line 224) | def parse_arguments():