MCPcopy Create free account

hub / github.com/SparkAudio/Spark-TTS / functions

Functions234 in github.com/SparkAudio/Spark-TTS

↓ 7 callersFunctionexists
(val)
sparktts/modules/speaker/perceiver_encoder.py:29
↓ 6 callersMethodget_padding
(kernel_size: int, dilation: int = 1)
sparktts/modules/blocks/vocos.py:253
↓ 5 callersMethod__init__
(self, in_dim=0, **kwargs)
sparktts/modules/speaker/pooling_layers.py:32
↓ 4 callersFunctionWNConv1d
(*args, **kwargs)
sparktts/modules/blocks/layers.py:24
↓ 4 callersMethod__init__
(self, channels, se_bottleneck_dim=128)
sparktts/modules/speaker/ecapa_tdnn.py:117
↓ 4 callersMethod__init__
(self, dropout=0.0, causal=False, use_flash=False)
sparktts/modules/speaker/perceiver_encoder.py:53
↓ 4 callersMethod__init__
( self, dim: int, kernel_size: int = 3, dilation: Tuple[int, int, int] = (1, 3
sparktts/modules/blocks/vocos.py:129
↓ 4 callersFunctiondefault
(val, d)
sparktts/modules/speaker/perceiver_encoder.py:189
↓ 4 callersFunctionload_config
Loads a configuration file and optionally merges it with a base configuration. Args: config_path (Path): Path to the configuration file.
sparktts/utils/file.py:116
↓ 3 callersMethoddetokenize
Detokenizes the semantic and global tokens into a waveform. Args: semantic_tokens (tensor): Semantic tokens.
sparktts/models/bicodec.py:172
↓ 3 callersFunctionexists
(v)
sparktts/modules/fsq/finite_scalar_quantization.py:22
↓ 3 callersMethodextract_wav2vec2_features
extract wav2vec2 features
sparktts/models/audio_tokenizer.py:85
↓ 3 callersMethodget_codes_from_indices
(self, indices)
sparktts/modules/fsq/residual_fsq.py:112
↓ 3 callersMethodget_output_from_indices
(self, indices)
sparktts/modules/fsq/residual_fsq.py:153
↓ 3 callersMethodload_from_checkpoint
Loads the model from a checkpoint. Args: model_dir (Path): Path to the model directory containing checkpoint and config.
sparktts/models/bicodec.py:70
↓ 3 callersMethodtoken2wav
(self, generated_token_ids, global_token_ids)
runtime/triton_trtllm/model_repo/spark_tts/1/model.py:283
↓ 3 callersMethodtokenize
Tokenizes the input audio into semantic and global tokens. Args: batch (dict): The input audio features and reference wa
sparktts/models/bicodec.py:152
↓ 2 callersFunctionECAPA_TDNN_GLOB_c512
(feat_dim, embed_dim, pooling_func="ASTP", emb_bn=False)
sparktts/modules/speaker/ecapa_tdnn.py:242
↓ 2 callersFunctionWNConv1d
(*args, **kwargs)
sparktts/modules/vq/factorized_vector_quantize.py:28
↓ 2 callersMethod_indices_to_codes
(self, indices)
sparktts/modules/fsq/finite_scalar_quantization.py:147
↓ 2 callersMethoddecode_code
(self, embed_id)
sparktts/modules/vq/factorized_vector_quantize.py:166
↓ 2 callersMethoddecode_latents
(self, latents)
sparktts/modules/vq/factorized_vector_quantize.py:169
↓ 2 callersFunctiondefault
(*args)
sparktts/modules/fsq/finite_scalar_quantization.py:26
↓ 2 callersMethodembed_code
(self, embed_id)
sparktts/modules/vq/factorized_vector_quantize.py:163
↓ 2 callersFunctionexists
(val)
sparktts/modules/fsq/residual_fsq.py:16
↓ 2 callersFunctionget_maybe_sync_seed
(device, max_size=10_000)
sparktts/modules/fsq/residual_fsq.py:39
↓ 2 callersMethodget_out_dim
(self)
sparktts/modules/speaker/pooling_layers.py:42
↓ 2 callersMethodinference
Performs inference to generate speech from text, incorporating prompt audio and/or text. Args: text (str): The text inpu
cli/SparkTTS.py:158
↓ 2 callersFunctionload_audio
(wav_path, target_sample_rate=16000)
runtime/triton_trtllm/client_grpc.py:262
↓ 2 callersFunctionmaybe
(fn)
sparktts/modules/fsq/finite_scalar_quantization.py:33
↓ 2 callersFunctionprepare_request_input_output
Prepares inputs for Triton inference (offline or streaming).
runtime/triton_trtllm/client_grpc.py:276
↓ 2 callersMethodquantize
Quantizes z, returns quantized zhat, same shape as z.
sparktts/modules/fsq/finite_scalar_quantization.py:133
↓ 2 callersMethodremove_weight_norm
Removes weight normalization from all layers.
sparktts/models/bicodec.py:213
↓ 2 callersFunctionrun_tts
Perform TTS inference and save the generated audio.
webui.py:51
↓ 2 callersMethodskip_downsampler
(x, downsample_scale)
sparktts/modules/blocks/samper.py:76
↓ 2 callersFunctionsplit
Split a string using delimiter. Supports escaping. Args: string (str): The string to split. delimiter (str): The delimiter to spl
runtime/triton_trtllm/scripts/fill_template.py:6
↓ 2 callersMethodtokenize
tokenize the audio
sparktts/models/audio_tokenizer.py:119
↓ 1 callersFunctionFeedForward
(dim, mult=4, causal_conv=False)
sparktts/modules/speaker/perceiver_encoder.py:238
↓ 1 callersFunctionSequential
(*mods)
sparktts/modules/speaker/perceiver_encoder.py:181
↓ 1 callersFunctionWNConvTranspose1d
(*args, **kwargs)
sparktts/modules/blocks/layers.py:28
↓ 1 callersMethod__init__
( self, *, levels: List[int], num_quantizers, dim=None, is_cha
sparktts/modules/fsq/residual_fsq.py:51
↓ 1 callersMethod__init__
( self, input_dim: int = 16, output_dim: int = 8, kernel_size: int = 2,
sparktts/modules/encoder_decoder/wave_generator.py:30
↓ 1 callersMethod__init__
(self, channels)
sparktts/modules/blocks/layers.py:43
↓ 1 callersMethod_initialize_inference
Initializes the tokenizer, model, and audio tokenizer for inference.
cli/SparkTTS.py:46
↓ 1 callersMethod_initialize_model
Load and initialize the BiCodec model and Wav2Vec2 feature extractor.
sparktts/models/audio_tokenizer.py:44
↓ 1 callersMethod_scale_and_shift
(self, zhat_normalized)
sparktts/modules/fsq/finite_scalar_quantization.py:139
↓ 1 callersMethod_scale_and_shift_inverse
(self, zhat)
sparktts/modules/fsq/finite_scalar_quantization.py:143
↓ 1 callersMethodage
Turn age token.
sparktts/utils/token_parser.py:78
↓ 1 callersFunctionargs_to_build_options
(args)
runtime/triton_trtllm/scripts/convert_checkpoint.py:224
↓ 1 callersFunctionargs_to_quant_config
return config dict with quantization info based on the command line args
runtime/triton_trtllm/scripts/convert_checkpoint.py:160
↓ 1 callersFunctionaudio_volume_normalize
Normalize the volume of an audio signal. Parameters: audio (numpy array): Input audio signal array. coeff (float): Target co
sparktts/utils/audio.py:33
↓ 1 callersMethodbound
Bound `z`, an array of shape (..., d).
sparktts/modules/fsq/finite_scalar_quantization.py:126
↓ 1 callersFunctionbuild_ui
(model_dir, device=0)
webui.py:94
↓ 1 callersMethodcodes_to_indices
Converts a `code` to an index in the codebook.
sparktts/modules/fsq/finite_scalar_quantization.py:152
↓ 1 callersFunctionconvert_and_save_hf
(args)
runtime/triton_trtllm/scripts/convert_checkpoint.py:233
↓ 1 callersFunctiondefault
(val, d)
sparktts/modules/fsq/residual_fsq.py:24
↓ 1 callersFunctiondetect_speech_boundaries
Detect the start and end points of speech in an audio signal using RMS energy. Args: wav: Input audio signal array with values in [-1
sparktts/utils/audio.py:186
↓ 1 callersMethoddetokenize
detokenize the input indices to d-vector
sparktts/modules/speaker/speaker_encoder.py:107
↓ 1 callersMethoddetokenize
detokenize the tokens to waveform Args: global_tokens: global tokens. shape: (batch_size, global_dim) semantic_tokens
sparktts/models/audio_tokenizer.py:132
↓ 1 callersFunctionema_inplace
(moving_avg, new, decay)
sparktts/modules/vq/factorized_vector_quantize.py:32
↓ 1 callersMethodemotion
(emotion: str)
sparktts/utils/token_parser.py:151
↓ 1 callersFunctionexecute
(workers, func, args)
runtime/triton_trtllm/scripts/convert_checkpoint.py:287
↓ 1 callersMethodflash_attn
(self, q, k, v, mask=None)
sparktts/modules/speaker/perceiver_encoder.py:98
↓ 1 callersMethodforward
(self, x)
sparktts/modules/speaker/perceiver_encoder.py:233
↓ 1 callersMethodforward_audio_tokenizer
Forward pass through the audio tokenizer component. Args: wav: Input waveform tensor wav_len: Waveform length
runtime/triton_trtllm/model_repo/spark_tts/1/model.py:223
↓ 1 callersMethodforward_llm
Prepares the response from the language model based on the provided inputs. Creates a `pb_utils.InferenceRequest` object with passed
runtime/triton_trtllm/model_repo/spark_tts/1/model.py:139
↓ 1 callersMethodforward_vocoder
Forward pass through the vocoder component. Args: global_token_ids: Global token IDs tensor pred_semantic_ids
runtime/triton_trtllm/model_repo/spark_tts/1/model.py:252
↓ 1 callersMethodgender
Turn gender token.
sparktts/utils/token_parser.py:84
↓ 1 callersFunctionget_args
()
runtime/triton_trtllm/client_http.py:32
↓ 1 callersFunctionget_args
()
runtime/triton_trtllm/client_grpc.py:145
↓ 1 callersMethodget_first_chunk_latency
(self)
runtime/triton_trtllm/client_grpc.py:74
↓ 1 callersMethodget_mask
(self, n, device)
sparktts/modules/speaker/perceiver_encoder.py:90
↓ 1 callersMethodget_ref_clip
Get reference audio clip for speaker embedding.
sparktts/models/audio_tokenizer.py:57
↓ 1 callersMethodget_ref_clip
Extract reference audio clip for speaker embedding. Args: wav: Input waveform array Returns:
runtime/triton_trtllm/model_repo/audio_tokenizer/1/model.py:59
↓ 1 callersMethodindices_to_level_indices
Converts indices to indices at each level, perhaps needed for a transformer with factorized embeddings
sparktts/modules/fsq/finite_scalar_quantization.py:158
↓ 1 callersMethodinit_mel_transformer
Initializes the MelSpectrogram transformer based on the provided configuration. Args: config (dict): Configuration param
sparktts/models/bicodec.py:191
↓ 1 callersFunctioninitialize_model
Load the model once at the beginning.
webui.py:29
↓ 1 callersFunctionis_distributed
()
sparktts/modules/fsq/residual_fsq.py:35
↓ 1 callersFunctionload_audio
r"""Load audio file with target sampling rate and lsength Args: adfile (Path): path to audio file. sampling_rate (int, optional):
sparktts/utils/audio.py:76
↓ 1 callersFunctionload_manifests
(manifest_path)
runtime/triton_trtllm/client_grpc.py:565
↓ 1 callersMethodloudness_level
Turn special token of loudness level.
sparktts/utils/token_parser.py:125
↓ 1 callersMethodloudness_value
Turn special toak of loudness value [0, 30]
sparktts/utils/token_parser.py:117
↓ 1 callersFunctionmain
()
runtime/triton_trtllm/client_grpc.py:608
↓ 1 callersFunctionmain
(file_path, substitutions, in_place)
runtime/triton_trtllm/scripts/fill_template.py:34
↓ 1 callersFunctionmain
()
runtime/triton_trtllm/scripts/convert_checkpoint.py:306
↓ 1 callersMethodmel_level
Turn special token of mel level.
sparktts/utils/token_parser.py:97
↓ 1 callersMethodmel_value
Turn special token of mel scale pitch.
sparktts/utils/token_parser.py:90
↓ 1 callersFunctiononce
(fn)
sparktts/modules/speaker/perceiver_encoder.py:33
↓ 1 callersFunctionpack_one
(t, pattern)
sparktts/modules/fsq/finite_scalar_quantization.py:43
↓ 1 callersFunctionparse_args
Parse command-line arguments.
cli/inference.py:28
↓ 1 callersFunctionparse_arguments
Parse command-line arguments such as model directory and device ID.
webui.py:224
↓ 1 callersFunctionparse_arguments
()
runtime/triton_trtllm/scripts/convert_checkpoint.py:18
↓ 1 callersFunctionprepare_request
( waveform, reference_text, target_text, sample_rate=16000, padding_duration: int = None,
runtime/triton_trtllm/client_http.py:83
↓ 1 callersMethodprocess_audio
load auido and get reference audio from wav path
sparktts/models/audio_tokenizer.py:72
↓ 1 callersFunctionprocess_prompt
Process input for voice cloning. Args: text: The text input to be converted to speech. prompt_text: Transcript of the prompt
runtime/triton_trtllm/model_repo/spark_tts/1/model.py:41
↓ 1 callersMethodprocess_prompt
Process input for voice cloning. Args: text (str): The text input to be converted to speech. prompt_speech_p
cli/SparkTTS.py:53
↓ 1 callersMethodprocess_prompt_control
Process input for voice creation. Args: gender (str): female | male. pitch (str): very_low | low | moderate
cli/SparkTTS.py:110
↓ 1 callersFunctionrandom_select_audio_segment
get an audio segment given the length Args: audio (np.ndarray): length (int): audio length = sampling_rate * duration
sparktts/utils/audio.py:122
↓ 1 callersMethodrecord_start_time
(self)
runtime/triton_trtllm/client_grpc.py:71
↓ 1 callersMethodrepeat_upsampler
(x, upsample_scale)
sparktts/modules/blocks/samper.py:72
next →1–100 of 234, ranked by callers