SYMBOL INDEX (671 symbols across 65 files) FILE: app.py function randN (line 62) | def randN(N)->int: function build_nerfreal (line 68) | def build_nerfreal(sessionid:int)->BaseReal: function offer (line 85) | async def offer(request): function human (line 144) | async def human(request): function interrupt_talk (line 173) | async def interrupt_talk(request): function humanaudio (line 195) | async def humanaudio(request): function set_audiotype (line 219) | async def set_audiotype(request): function record (line 241) | async def record(request): function is_speaking (line 266) | async def is_speaking(request): function on_shutdown (line 278) | async def on_shutdown(app): function post (line 284) | async def post(url,data): function run (line 292) | async def run(push_url,sessionid): function run_server (line 425) | def run_server(runner): FILE: baseasr.py class BaseASR (line 28) | class BaseASR: method __init__ (line 29) | def __init__(self, opt, parent:BaseReal = None): method flush_talk (line 49) | def flush_talk(self): method put_audio_frame (line 52) | def put_audio_frame(self,audio_chunk,datainfo:dict): #16khz 20ms pcm method get_audio_frame (line 56) | def get_audio_frame(self): method get_audio_out (line 73) | def get_audio_out(self): method warm_up (line 76) | def warm_up(self): method run_step (line 84) | def run_step(self): method get_next_feat (line 87) | def get_next_feat(self,block,timeout): FILE: basereal.py function read_imgs (line 45) | def read_imgs(img_list): function play_audio (line 53) | def play_audio(quit_event,queue): class BaseReal (line 70) | class BaseReal: method __init__ (line 71) | def __init__(self, opt): method put_msg_txt (line 111) | def put_msg_txt(self,msg,datainfo:dict={}): method put_audio_frame (line 114) | def put_audio_frame(self,audio_chunk,datainfo:dict={}): #16khz 20ms pcm method put_audio_file (line 117) | def put_audio_file(self,filebyte,datainfo:dict={}): method __create_bytes_stream (line 127) | def __create_bytes_stream(self,byte_stream): method flush_talk (line 143) | def flush_talk(self): method is_speaking (line 147) | def is_speaking(self)->bool: method __loadcustom (line 150) | def __loadcustom(self): method init_customindex (line 161) | def init_customindex(self): method notify (line 168) | def notify(self,eventpoint): method start_recording (line 171) | def start_recording(self): method record_video_data (line 210) | def record_video_data(self,image): method record_audio_data (line 217) | def record_audio_data(self,frame): method stop_recording (line 261) | def stop_recording(self): method mirror_index (line 274) | def mirror_index(self,size, index): method get_audio_stream (line 283) | def get_audio_stream(self,audiotype): method set_custom_state (line 291) | def set_custom_state(self,audiotype, reinit=True): method process_frames (line 300) | def process_frames(self,quit_event,loop=None,audio_track=None,video_tr... FILE: hubertasr.py class HubertASR (line 8) | class HubertASR(BaseASR): method __init__ (line 10) | def __init__(self, opt, parent, audio_processor:Audio2Feature,audio_fe... method run_step (line 18) | def run_step(self): FILE: lightreal.py function load_model (line 62) | def load_model(opt): function load_avatar (line 66) | def load_avatar(avatar_id): function warm_up (line 89) | def warm_up(batch_size,avatar,modelres): function read_imgs (line 96) | def read_imgs(img_list): function get_audio_features (line 104) | def get_audio_features(features, index): function read_lms (line 123) | def read_lms(lms_list): function __mirror_index (line 138) | def __mirror_index(size, index): function inference (line 148) | def inference(quit_event, batch_size, face_list_cycle, audio_feat_queue,... class LightReal (line 225) | class LightReal(BaseReal): method __init__ (line 227) | def __init__(self, opt, model, avatar): method paste_back_frame (line 251) | def paste_back_frame(self,pred_frame,idx:int): method render (line 265) | def render(self,quit_event,loop=None,audio_track=None,video_track=None): FILE: lipasr.py class LipASR (line 29) | class LipASR(BaseASR): method run_step (line 31) | def run_step(self): FILE: lipreal.py function _load (line 50) | def _load(checkpoint_path): function load_model (line 58) | def load_model(path): function load_avatar (line 71) | def load_avatar(avatar_id): function warm_up (line 90) | def warm_up(batch_size,model,modelres): function read_imgs (line 97) | def read_imgs(img_list): function __mirror_index (line 105) | def __mirror_index(size, index): function inference (line 114) | def inference(quit_event,batch_size,face_list_cycle,audio_feat_queue,aud... class LipReal (line 184) | class LipReal(BaseReal): method __init__ (line 186) | def __init__(self, opt, model, avatar): method paste_back_frame (line 209) | def paste_back_frame(self,pred_frame,idx:int): method render (line 220) | def render(self,quit_event,loop=None,audio_track=None,video_track=None): FILE: llm.py function llm_response (line 6) | def llm_response(message,nerfreal:BaseReal): FILE: museasr.py class MuseASR (line 27) | class MuseASR(BaseASR): method __init__ (line 28) | def __init__(self, opt, parent,audio_processor:Audio2Feature): method run_step (line 32) | def run_step(self): FILE: musereal.py function load_model (line 51) | def load_model(): function load_avatar (line 65) | def load_avatar(avatar_id): function warm_up (line 96) | def warm_up(batch_size,model): function read_imgs (line 114) | def read_imgs(img_list): function __mirror_index (line 122) | def __mirror_index(size, index): function inference (line 132) | def inference(quit_event,batch_size,input_latent_list_cycle,audio_feat_q... class MuseReal (line 211) | class MuseReal(BaseReal): method __init__ (line 213) | def __init__(self, opt, model, avatar): method __mirror_index (line 238) | def __mirror_index(self, index): method __warm_up (line 247) | def __warm_up(self): method paste_back_frame (line 271) | def paste_back_frame(self,pred_frame,idx:int): method render (line 283) | def render(self,quit_event,loop=None,audio_track=None,video_track=None): FILE: musetalk/genavatar.py function video2imgs (line 29) | def video2imgs(vid_path, save_path, ext='.png', cut_frame=10000000): function is_video_file (line 247) | def is_video_file(file_path): function create_dir (line 253) | def create_dir(dir_path): function create_musetalk_human (line 261) | def create_musetalk_human(file, avatar_id): FILE: musetalk/myutil.py function get_image_blending (line 5) | def get_image_blending(image,face,face_box,mask_array,crop_box): FILE: musetalk/utils/audio_processor.py class AudioProcessor (line 11) | class AudioProcessor: method __init__ (line 12) | def __init__(self, feature_extractor_path="openai/whisper-tiny/"): method get_audio_feature (line 15) | def get_audio_feature(self, wav_path, start_index=0, weight_dtype=None): method get_whisper_chunk (line 37) | def get_whisper_chunk( FILE: musetalk/utils/blending.py function get_crop_box (line 7) | def get_crop_box(box, expand): function face_seg (line 16) | def face_seg(image, mode="raw", fp=None): function get_image (line 35) | def get_image(image, face, face_box, upper_boundary_ratio=0.5, expand=1.... function get_image_blending (line 96) | def get_image_blending(image, face, face_box, mask_array, crop_box): function get_image_prepare_material (line 112) | def get_image_prepare_material(image, face_box, upper_boundary_ratio=0.5... FILE: musetalk/utils/face_detection/api.py class LandmarksType (line 17) | class LandmarksType(Enum): class NetworkSize (line 30) | class NetworkSize(Enum): method __new__ (line 36) | def __new__(cls, value): method __int__ (line 41) | def __int__(self): class FaceAlignment (line 46) | class FaceAlignment: method __init__ (line 47) | def __init__(self, landmarks_type, network_size=NetworkSize.LARGE, method get_detections_for_batch (line 71) | def get_detections_for_batch(self, images): class YOLOv8_face (line 89) | class YOLOv8_face: method __init__ (line 90) | def __init__(self, path = 'face_detection/weights/yolov8n-face.onnx', ... method make_anchors (line 106) | def make_anchors(self, feats_hw, grid_cell_offset=0.5): method softmax (line 118) | def softmax(self, x, axis=1): method resize_image (line 125) | def resize_image(self, srcimg, keep_ratio=True): method detect (line 145) | def detect(self, srcimg): method post_process (line 161) | def post_process(self, preds, scale_h, scale_w, padh, padw): method distance2bbox (line 217) | def distance2bbox(self, points, distance, max_shape=None): method draw_detections (line 229) | def draw_detections(self, image, boxes, scores, kpts): FILE: musetalk/utils/face_detection/detection/core.py class FaceDetector (line 9) | class FaceDetector(object): method __init__ (line 18) | def __init__(self, device, verbose): method detect_from_image (line 32) | def detect_from_image(self, tensor_or_path): method detect_from_directory (line 54) | def detect_from_directory(self, path, extensions=['.jpg', '.png'], rec... method reference_scale (line 104) | def reference_scale(self): method reference_x_shift (line 108) | def reference_x_shift(self): method reference_y_shift (line 112) | def reference_y_shift(self): method tensor_or_path_to_ndarray (line 116) | def tensor_or_path_to_ndarray(tensor_or_path, rgb=True): FILE: musetalk/utils/face_detection/detection/sfd/bbox.py function IOU (line 17) | def IOU(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2): function bboxlog (line 30) | def bboxlog(x1, y1, x2, y2, axc, ayc, aww, ahh): function bboxloginv (line 37) | def bboxloginv(dx, dy, dw, dh, axc, ayc, aww, ahh): function nms (line 44) | def nms(dets, thresh): function encode (line 67) | def encode(matched, priors, variances): function decode (line 91) | def decode(loc, priors, variances): function batch_decode (line 111) | def batch_decode(loc, priors, variances): FILE: musetalk/utils/face_detection/detection/sfd/detect.py function detect (line 19) | def detect(net, img, device): function batch_detect (line 58) | def batch_detect(net, imgs, device): function flip_detect (line 98) | def flip_detect(net, img, device): function pts_to_bb (line 111) | def pts_to_bb(pts): FILE: musetalk/utils/face_detection/detection/sfd/net_s3fd.py class L2Norm (line 6) | class L2Norm(nn.Module): method __init__ (line 7) | def __init__(self, n_channels, scale=1.0): method forward (line 16) | def forward(self, x): class s3fd (line 22) | class s3fd(nn.Module): method __init__ (line 23) | def __init__(self): method forward (line 70) | def forward(self, x): FILE: musetalk/utils/face_detection/detection/sfd/sfd_detector.py class SFDDetector (line 16) | class SFDDetector(FaceDetector): method __init__ (line 17) | def __init__(self, device, path_to_detector=os.path.join(os.path.dirna... method detect_from_image (line 31) | def detect_from_image(self, tensor_or_path): method detect_from_batch (line 41) | def detect_from_batch(self, images): method reference_scale (line 50) | def reference_scale(self): method reference_x_shift (line 54) | def reference_x_shift(self): method reference_y_shift (line 58) | def reference_y_shift(self): FILE: musetalk/utils/face_detection/models.py function conv3x3 (line 7) | def conv3x3(in_planes, out_planes, strd=1, padding=1, bias=False): class ConvBlock (line 13) | class ConvBlock(nn.Module): method __init__ (line 14) | def __init__(self, in_planes, out_planes): method forward (line 33) | def forward(self, x): class Bottleneck (line 58) | class Bottleneck(nn.Module): method __init__ (line 62) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 75) | def forward(self, x): class HourGlass (line 98) | class HourGlass(nn.Module): method __init__ (line 99) | def __init__(self, num_modules, depth, num_features): method _generate_network (line 107) | def _generate_network(self, level): method _forward (line 119) | def _forward(self, level, inp): method forward (line 141) | def forward(self, x): class FAN (line 145) | class FAN(nn.Module): method __init__ (line 147) | def __init__(self, num_modules=1): method forward (line 174) | def forward(self, x): class ResNetDepth (line 204) | class ResNetDepth(nn.Module): method __init__ (line 206) | def __init__(self, block=Bottleneck, layers=[3, 8, 36, 3], num_classes... method _make_layer (line 229) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 246) | def forward(self, x): FILE: musetalk/utils/face_detection/utils.py function _gaussian (line 11) | def _gaussian( function draw_gaussian (line 37) | def draw_gaussian(image, point, sigma): function transform (line 56) | def transform(point, center, scale, resolution, invert=False): function crop (line 92) | def crop(image, center, scale, resolution=256.0): function get_preds_fromhm (line 132) | def get_preds_fromhm(hm, center=None, scale=None): function get_preds_fromhm_batch (line 172) | def get_preds_fromhm_batch(hm, centers=None, scales=None): function shuffle_lr (line 212) | def shuffle_lr(parts, pairs=None): function flip (line 237) | def flip(tensor, is_label=False): function appdata_dir (line 259) | def appdata_dir(appname=None, roaming=False): FILE: musetalk/utils/face_parsing/__init__.py class FaceParsing (line 10) | class FaceParsing(): method __init__ (line 11) | def __init__(self, left_cheek_width=80, right_cheek_width=80): method _create_cheek_mask (line 51) | def _create_cheek_mask(self, left_cheek_width=80, right_cheek_width=80): method model_init (line 59) | def model_init(self, method image_preprocess (line 71) | def image_preprocess(self): method __call__ (line 77) | def __call__(self, image, size=(512, 512), mode="raw"): FILE: musetalk/utils/face_parsing/model.py class ConvBNReLU (line 14) | class ConvBNReLU(nn.Module): method __init__ (line 15) | def __init__(self, in_chan, out_chan, ks=3, stride=1, padding=1, *args... method forward (line 26) | def forward(self, x): method init_weight (line 31) | def init_weight(self): class BiSeNetOutput (line 37) | class BiSeNetOutput(nn.Module): method __init__ (line 38) | def __init__(self, in_chan, mid_chan, n_classes, *args, **kwargs): method forward (line 44) | def forward(self, x): method init_weight (line 49) | def init_weight(self): method get_params (line 55) | def get_params(self): class AttentionRefinementModule (line 67) | class AttentionRefinementModule(nn.Module): method __init__ (line 68) | def __init__(self, in_chan, out_chan, *args, **kwargs): method forward (line 76) | def forward(self, x): method init_weight (line 85) | def init_weight(self): class ContextPath (line 92) | class ContextPath(nn.Module): method __init__ (line 93) | def __init__(self, resnet_path, *args, **kwargs): method forward (line 104) | def forward(self, x): method init_weight (line 127) | def init_weight(self): method get_params (line 133) | def get_params(self): class SpatialPath (line 146) | class SpatialPath(nn.Module): method __init__ (line 147) | def __init__(self, *args, **kwargs): method forward (line 155) | def forward(self, x): method init_weight (line 162) | def init_weight(self): method get_params (line 168) | def get_params(self): class FeatureFusionModule (line 180) | class FeatureFusionModule(nn.Module): method __init__ (line 181) | def __init__(self, in_chan, out_chan, *args, **kwargs): method forward (line 200) | def forward(self, fsp, fcp): method init_weight (line 212) | def init_weight(self): method get_params (line 218) | def get_params(self): class BiSeNet (line 230) | class BiSeNet(nn.Module): method __init__ (line 231) | def __init__(self, resnet_path='models/resnet18-5c106cde.pth', n_class... method forward (line 241) | def forward(self, x): method init_weight (line 256) | def init_weight(self): method get_params (line 262) | def get_params(self): FILE: musetalk/utils/face_parsing/resnet.py function conv3x3 (line 14) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 20) | class BasicBlock(nn.Module): method __init__ (line 21) | def __init__(self, in_chan, out_chan, stride=1): method forward (line 36) | def forward(self, x): function create_layer_basic (line 51) | def create_layer_basic(in_chan, out_chan, bnum, stride=1): class Resnet18 (line 58) | class Resnet18(nn.Module): method __init__ (line 59) | def __init__(self, model_path): method forward (line 71) | def forward(self, x): method init_weight (line 82) | def init_weight(self, model_path): method get_params (line 90) | def get_params(self): FILE: musetalk/utils/preprocessing.py function resize_landmark (line 28) | def resize_landmark(landmark, w, h, new_w, new_h): function read_imgs (line 35) | def read_imgs(img_list): function get_bbox_range (line 43) | def get_bbox_range(img_list,upperbondrange =0): function get_landmark_and_bbox (line 84) | def get_landmark_and_bbox(img_list,upperbondrange =0): FILE: musetalk/utils/training_utils.py class Net (line 25) | class Net(nn.Module): method __init__ (line 26) | def __init__( method forward (line 33) | def forward( function initialize_models_and_optimizers (line 48) | def initialize_models_and_optimizers(cfg, accelerator, weight_dtype): function initialize_dataloaders (line 144) | def initialize_dataloaders(cfg): function initialize_loss_functions (line 201) | def initialize_loss_functions(cfg, accelerator, scheduler_max_steps): function initialize_syncnet (line 251) | def initialize_syncnet(cfg, accelerator, weight_dtype): function initialize_vgg (line 272) | def initialize_vgg(cfg, accelerator): function validation (line 284) | def validation( FILE: musetalk/utils/utils.py function load_all_model (line 15) | def load_all_model( function get_file_type (line 33) | def get_file_type(video_path): function get_video_fps (line 43) | def get_video_fps(video_path): function datagen (line 49) | def datagen( function cast_training_params (line 76) | def cast_training_params( function rand_log_normal (line 88) | def rand_log_normal( function get_mouth_region (line 102) | def get_mouth_region(frames, image_pred, pixel_values_face_mask): function get_image_pred (line 140) | def get_image_pred(pixel_values, function process_audio_features (line 177) | def process_audio_features(cfg, batch, wav2vec, bsz, num_frames, weight_... function save_checkpoint (line 206) | def save_checkpoint(model, save_dir, ckpt_num, name="appearance_net", to... function save_models (line 234) | def save_models(accelerator, net, save_dir, global_step, cfg, logger=None): function delete_additional_ckpt (line 245) | def delete_additional_ckpt(base_path, num_keep): function seed_everything (line 260) | def seed_everything(seed): function process_and_save_images (line 270) | def process_and_save_images( FILE: musetalk/whisper/audio2feature.py class Audio2Feature (line 14) | class Audio2Feature(): method __init__ (line 15) | def __init__(self, method get_sliced_feature (line 25) | def get_sliced_feature(self, method get_sliced_feature_sparse (line 56) | def get_sliced_feature_sparse(self,feature_array, vid_idx, audio_feat_... method feature2chunks (line 91) | def feature2chunks(self,feature_array,fps,batch_size,audio_feat_length... method audio2feat (line 106) | def audio2feat(self, wav_data): #, weight_dtype=None FILE: musetalk/whisper/whisper/__init__.py function _download (line 33) | def _download(url: str, root: str, in_memory: bool) -> Union[bytes, str]: function available_models (line 66) | def available_models() -> List[str]: function load_model (line 71) | def load_model(name: str, device: Optional[Union[str, torch.device]] = N... FILE: musetalk/whisper/whisper/audio.py function load_audio (line 22) | def load_audio(file: str, sr: int = SAMPLE_RATE): function pad_or_trim (line 52) | def pad_or_trim(array, length: int = N_SAMPLES, *, axis: int = -1): function mel_filters (line 77) | def mel_filters(device, n_mels: int = N_MELS) -> torch.Tensor: function log_mel_spectrogram (line 92) | def log_mel_spectrogram(audio: Union[str, np.ndarray, torch.Tensor], n_m... FILE: musetalk/whisper/whisper/decoding.py function detect_language (line 19) | def detect_language(model: "Whisper", mel: Tensor, tokenizer: Tokenizer ... class DecodingOptions (line 72) | class DecodingOptions: class DecodingResult (line 104) | class DecodingResult: class Inference (line 118) | class Inference: method logits (line 119) | def logits(self, tokens: Tensor, audio_features: Tensor) -> Tensor: method rearrange_kv_cache (line 123) | def rearrange_kv_cache(self, source_indices) -> None: method cleanup_caching (line 127) | def cleanup_caching(self) -> None: class PyTorchInference (line 132) | class PyTorchInference(Inference): method __init__ (line 133) | def __init__(self, model: "Whisper", initial_token_length: int): method logits (line 139) | def logits(self, tokens: Tensor, audio_features: Tensor, include_embed... method cleanup_caching (line 151) | def cleanup_caching(self): method rearrange_kv_cache (line 158) | def rearrange_kv_cache(self, source_indices): class SequenceRanker (line 164) | class SequenceRanker: method rank (line 165) | def rank(self, tokens: List[List[Tensor]], sum_logprobs: List[List[flo... class MaximumLikelihoodRanker (line 173) | class MaximumLikelihoodRanker(SequenceRanker): method __init__ (line 179) | def __init__(self, length_penalty: Optional[float]): method rank (line 182) | def rank(self, tokens: List[List[Tensor]], sum_logprobs: List[List[flo... class TokenDecoder (line 199) | class TokenDecoder: method reset (line 200) | def reset(self): method update (line 203) | def update(self, tokens: Tensor, logits: Tensor, sum_logprobs: Tensor)... method finalize (line 228) | def finalize( class GreedyDecoder (line 253) | class GreedyDecoder(TokenDecoder): method __init__ (line 254) | def __init__(self, temperature: float, eot: int): method update (line 258) | def update(self, tokens: Tensor, logits: Tensor, sum_logprobs: Tensor)... method finalize (line 275) | def finalize(self, tokens: Tensor, sum_logprobs: Tensor): class BeamSearchDecoder (line 281) | class BeamSearchDecoder(TokenDecoder): method __init__ (line 282) | def __init__(self, beam_size: int, eot: int, inference: Inference, pat... method reset (line 292) | def reset(self): method update (line 295) | def update(self, tokens: Tensor, logits: Tensor, sum_logprobs: Tensor)... method finalize (line 351) | def finalize(self, preceding_tokens: Tensor, sum_logprobs: Tensor): class LogitFilter (line 371) | class LogitFilter: method apply (line 372) | def apply(self, logits: Tensor, tokens: Tensor) -> None: class SuppressBlank (line 387) | class SuppressBlank(LogitFilter): method __init__ (line 388) | def __init__(self, tokenizer: Tokenizer, sample_begin: int): method apply (line 392) | def apply(self, logits: Tensor, tokens: Tensor): class SuppressTokens (line 397) | class SuppressTokens(LogitFilter): method __init__ (line 398) | def __init__(self, suppress_tokens: Sequence[int]): method apply (line 401) | def apply(self, logits: Tensor, tokens: Tensor): class ApplyTimestampRules (line 405) | class ApplyTimestampRules(LogitFilter): method __init__ (line 406) | def __init__( method apply (line 413) | def apply(self, logits: Tensor, tokens: Tensor): class DecodingTask (line 444) | class DecodingTask: method __init__ (line 450) | def __init__(self, model: "Whisper", options: DecodingOptions): method _verify_options (line 499) | def _verify_options(self, options: DecodingOptions) -> DecodingOptions: method _get_initial_tokens (line 512) | def _get_initial_tokens(self) -> Tuple[int]: method _get_suppress_tokens (line 534) | def _get_suppress_tokens(self) -> Tuple[int]: method _get_audio_features (line 557) | def _get_audio_features(self, mel: Tensor, include_embeddings: bool = ... method _detect_language (line 579) | def _detect_language(self, audio_features: Tensor, tokens: Tensor): method _main_loop (line 591) | def _main_loop(self, audio_features: Tensor, tokens: Tensor): method run (line 631) | def run(self, mel: Tensor) -> List[DecodingResult]: function decode (line 700) | def decode(model: "Whisper", mel: Tensor, options: DecodingOptions = Dec... FILE: musetalk/whisper/whisper/model.py class ModelDimensions (line 16) | class ModelDimensions: class LayerNorm (line 29) | class LayerNorm(nn.LayerNorm): method forward (line 30) | def forward(self, x: Tensor) -> Tensor: class Linear (line 34) | class Linear(nn.Linear): method forward (line 35) | def forward(self, x: Tensor) -> Tensor: class Conv1d (line 41) | class Conv1d(nn.Conv1d): method _conv_forward (line 42) | def _conv_forward(self, x: Tensor, weight: Tensor, bias: Optional[Tens... function sinusoids (line 48) | def sinusoids(length, channels, max_timescale=10000): class MultiHeadAttention (line 57) | class MultiHeadAttention(nn.Module): method __init__ (line 58) | def __init__(self, n_state: int, n_head: int): method forward (line 66) | def forward( method qkv_attention (line 88) | def qkv_attention(self, q: Tensor, k: Tensor, v: Tensor, mask: Optiona... class ResidualAttentionBlock (line 103) | class ResidualAttentionBlock(nn.Module): method __init__ (line 104) | def __init__(self, n_state: int, n_head: int, cross_attention: bool = ... method forward (line 117) | def forward( class AudioEncoder (line 131) | class AudioEncoder(nn.Module): method __init__ (line 132) | def __init__(self, n_mels: int, n_ctx: int, n_state: int, n_head: int,... method forward (line 143) | def forward(self, x: Tensor, include_embeddings: bool = False): class TextDecoder (line 174) | class TextDecoder(nn.Module): method __init__ (line 175) | def __init__(self, n_vocab: int, n_ctx: int, n_state: int, n_head: int... method forward (line 189) | def forward(self, x: Tensor, xa: Tensor, kv_cache: Optional[dict] = No... class Whisper (line 220) | class Whisper(nn.Module): method __init__ (line 221) | def __init__(self, dims: ModelDimensions): method embed_audio (line 239) | def embed_audio(self, mel: torch.Tensor): method logits (line 242) | def logits(self, tokens: torch.Tensor, audio_features: torch.Tensor): method forward (line 245) | def forward(self, mel: torch.Tensor, tokens: torch.Tensor) -> Dict[str... method device (line 249) | def device(self): method is_multilingual (line 253) | def is_multilingual(self): method install_kv_cache_hooks (line 256) | def install_kv_cache_hooks(self, cache: Optional[dict] = None): FILE: musetalk/whisper/whisper/normalizers/basic.py function remove_symbols_and_diacritics (line 27) | def remove_symbols_and_diacritics(s: str, keep=""): function remove_symbols (line 46) | def remove_symbols(s: str): class BasicTextNormalizer (line 55) | class BasicTextNormalizer: method __init__ (line 56) | def __init__(self, remove_diacritics: bool = False, split_letters: boo... method __call__ (line 60) | def __call__(self, s: str): FILE: musetalk/whisper/whisper/normalizers/english.py class EnglishNumberNormalizer (line 12) | class EnglishNumberNormalizer: method __init__ (line 23) | def __init__(self): method process_words (line 160) | def process_words(self, words: List[str]) -> Iterator[str]: method preprocess (line 381) | def preprocess(self, s: str): method postprocess (line 410) | def postprocess(self, s: str): method __call__ (line 435) | def __call__(self, s: str): class EnglishSpellingNormalizer (line 443) | class EnglishSpellingNormalizer: method __init__ (line 450) | def __init__(self): method __call__ (line 454) | def __call__(self, s: str): class EnglishTextNormalizer (line 458) | class EnglishTextNormalizer: method __init__ (line 459) | def __init__(self): method __call__ (line 519) | def __call__(self, s: str): FILE: musetalk/whisper/whisper/tokenizer.py class Tokenizer (line 130) | class Tokenizer: method encode (line 137) | def encode(self, text, **kwargs): method decode (line 140) | def decode(self, token_ids: Union[int, List[int], np.ndarray, torch.Te... method decode_with_timestamps (line 143) | def decode_with_timestamps(self, tokens) -> str: method eot (line 161) | def eot(self) -> int: method sot (line 166) | def sot(self) -> int: method sot_lm (line 171) | def sot_lm(self) -> int: method sot_prev (line 176) | def sot_prev(self) -> int: method no_speech (line 181) | def no_speech(self) -> int: method no_timestamps (line 186) | def no_timestamps(self) -> int: method timestamp_begin (line 191) | def timestamp_begin(self) -> int: method language_token (line 196) | def language_token(self) -> int: method all_language_tokens (line 215) | def all_language_tokens(self) -> Tuple[int]: method all_language_codes (line 227) | def all_language_codes(self) -> Tuple[str]: method sot_sequence_including_notimestamps (line 232) | def sot_sequence_including_notimestamps(self) -> Tuple[int]: method non_speech_tokens (line 237) | def non_speech_tokens(self) -> Tuple[int]: method _get_single_token_id (line 267) | def _get_single_token_id(self, text) -> int: function build_tokenizer (line 274) | def build_tokenizer(name: str = "gpt2"): function get_tokenizer (line 295) | def get_tokenizer( FILE: musetalk/whisper/whisper/transcribe.py function transcribe (line 19) | def transcribe( function cli (line 133) | def cli(): FILE: musetalk/whisper/whisper/utils.py function exact_div (line 5) | def exact_div(x, y): function str2bool (line 10) | def str2bool(string): function optional_int (line 18) | def optional_int(string): function optional_float (line 22) | def optional_float(string): function compression_ratio (line 26) | def compression_ratio(text) -> float: function format_timestamp (line 30) | def format_timestamp(seconds: float, always_include_hours: bool = False,... function write_txt (line 47) | def write_txt(transcript: Iterator[dict], file: TextIO): function write_vtt (line 52) | def write_vtt(transcript: Iterator[dict], file: TextIO): function write_srt (line 63) | def write_srt(transcript: Iterator[dict], file: TextIO): FILE: ttsreal.py class State (line 50) | class State(Enum): class BaseTTS (line 54) | class BaseTTS: method __init__ (line 55) | def __init__(self, opt, parent:BaseReal): method flush_talk (line 67) | def flush_talk(self): method put_msg_txt (line 71) | def put_msg_txt(self,msg:str,datainfo:dict={}): method render (line 75) | def render(self,quit_event): method process_tts (line 79) | def process_tts(self,quit_event): method txt_to_audio (line 89) | def txt_to_audio(self,msg:tuple[str, dict]): class EdgeTTS (line 94) | class EdgeTTS(BaseTTS): method txt_to_audio (line 95) | def txt_to_audio(self,msg:tuple[str, dict]): method __create_bytes_stream (line 125) | def __create_bytes_stream(self,byte_stream): method __main (line 141) | async def __main(self,voicename: str, text: str): class FishTTS (line 160) | class FishTTS(BaseTTS): method txt_to_audio (line 161) | def txt_to_audio(self,msg:tuple[str, dict]): method fish_speech (line 174) | def fish_speech(self, text, reffile, reftext,language, server_url) -> ... method stream_tts (line 213) | def stream_tts(self,audio_stream,msg:tuple[str, dict]): class SovitsTTS (line 238) | class SovitsTTS(BaseTTS): method txt_to_audio (line 239) | def txt_to_audio(self,msg:tuple[str, dict]): method gpt_sovits (line 252) | def gpt_sovits(self, text, reffile, reftext,language, server_url) -> I... method __create_bytes_stream (line 296) | def __create_bytes_stream(self,byte_stream): method stream_tts (line 312) | def stream_tts(self,audio_stream,msg:tuple[str, dict]): class CosyVoiceTTS (line 337) | class CosyVoiceTTS(BaseTTS): method txt_to_audio (line 338) | def txt_to_audio(self,msg:tuple[str, dict]): method cosy_voice (line 351) | def cosy_voice(self, text, reffile, reftext,language, server_url) -> I... method stream_tts (line 380) | def stream_tts(self,audio_stream,msg:tuple[str, dict]): class TencentTTS (line 410) | class TencentTTS(BaseTTS): method __init__ (line 411) | def __init__(self, opt, parent): method __gen_signature (line 422) | def __gen_signature(self, params): method __gen_params (line 434) | def __gen_params(self, session_id, text): method txt_to_audio (line 453) | def txt_to_audio(self,msg:tuple[str, dict]): method tencent_voice (line 466) | def tencent_voice(self, text, reffile, reftext,language, server_url) -... method stream_tts (line 503) | def stream_tts(self,audio_stream,msg:tuple[str, dict]): class DoubaoTTS (line 533) | class DoubaoTTS(BaseTTS): method __init__ (line 534) | def __init__(self, opt, parent): method doubao_voice (line 568) | async def doubao_voice(self, text): # -> Iterator[bytes]: method txt_to_audio (line 626) | def txt_to_audio(self, msg:tuple[str, dict]): method stream_tts (line 635) | async def stream_tts(self, audio_stream, msg:tuple[str, dict]): class IndexTTS2 (line 663) | class IndexTTS2(BaseTTS): method __init__ (line 664) | def __init__(self, opt, parent): method txt_to_audio (line 684) | def txt_to_audio(self, msg): method split_text (line 713) | def split_text(self, text): method indextts2_generate (line 747) | def indextts2_generate(self, text): method file_to_stream (line 796) | def file_to_stream(self, audio_file, msg, is_first=False, is_last=False): class XTTS (line 852) | class XTTS(BaseTTS): method __init__ (line 853) | def __init__(self, opt, parent): method txt_to_audio (line 857) | def txt_to_audio(self,msg:tuple[str, dict]): method get_speaker (line 870) | def get_speaker(self,ref_audio,server_url): method xtts (line 875) | def xtts(self,text, speaker, language, server_url, stream_chunk_size) ... method stream_tts (line 905) | def stream_tts(self,audio_stream,msg:tuple[str, dict]): class AzureTTS (line 933) | class AzureTTS(BaseTTS): method __init__ (line 935) | def __init__(self, opt, parent): method txt_to_audio (line 950) | def txt_to_audio(self,msg:tuple[str, dict]): method _on_synthesizing (line 967) | def _on_synthesizing(self, evt: speechsdk.SpeechSynthesisEventArgs): FILE: ultralight/audio2feature.py class Audio2Feature (line 6) | class Audio2Feature(): method __init__ (line 7) | def __init__(self): method get_hubert_from_16k_speech (line 14) | def get_hubert_from_16k_speech(self, speech): method get_sliced_feature (line 51) | def get_sliced_feature(self, method feature2chunks (line 82) | def feature2chunks(self,feature_array,fps,batch_size,audio_feat_length... FILE: ultralight/face_detect_utils/base_module.py function Conv_Block (line 12) | def Conv_Block(in_channel, out_channel, kernel_size, stride, padding, gr... class InvertedResidual (line 20) | class InvertedResidual(Module): method __init__ (line 21) | def __init__(self, in_channel, out_channel, stride, use_res_connect, e... method forward (line 36) | def forward(self, x): class GhostModule (line 43) | class GhostModule(Module): method __init__ (line 44) | def __init__(self, in_channel, out_channel, is_linear=False): method forward (line 53) | def forward(self, x): class GhostBottleneck (line 60) | class GhostBottleneck(Module): method __init__ (line 61) | def __init__(self, in_channel, hidden_channel, out_channel, stride): method forward (line 83) | def forward(self, x): class GhostOneModule (line 87) | class GhostOneModule(Module): method __init__ (line 88) | def __init__(self, in_channel, out_channel, is_linear=False, inference... method forward (line 117) | def forward(self, x): class GhostOneBottleneck (line 124) | class GhostOneBottleneck(Module): method __init__ (line 125) | def __init__(self, in_channel, hidden_channel, out_channel, stride, in... method forward (line 150) | def forward(self, x): class SEBlock (line 154) | class SEBlock(nn.Module): method __init__ (line 161) | def __init__(self, method forward (line 181) | def forward(self, inputs: torch.Tensor) -> torch.Tensor: class MobileOneBlock (line 193) | class MobileOneBlock(nn.Module): method __init__ (line 203) | def __init__(self, method forward (line 275) | def forward(self, x: torch.Tensor) -> torch.Tensor: method reparameterize (line 299) | def reparameterize(self): method _get_kernel_bias (line 329) | def _get_kernel_bias(self) -> Tuple[torch.Tensor, torch.Tensor]: method _fuse_bn_tensor (line 363) | def _fuse_bn_tensor(self, branch) -> Tuple[torch.Tensor, torch.Tensor]: method _conv_bn (line 402) | def _conv_bn(self, FILE: ultralight/face_detect_utils/detect_face.py class SCRFD (line 6) | class SCRFD(): method __init__ (line 7) | def __init__(self, onnxmodel, confThreshold=0.5, nmsThreshold=0.5): method resize_image (line 17) | def resize_image(self, srcimg): method distance2bbox (line 35) | def distance2bbox(self, points, distance, max_shape=None): method distance2kps (line 46) | def distance2kps(self, points, distance, max_shape=None): method detect (line 57) | def detect(self, srcimg): FILE: ultralight/face_detect_utils/get_landmark.py function face_det (line 14) | def face_det(img, model): class Landmark (line 70) | class Landmark: method __init__ (line 71) | def __init__(self): method detect (line 83) | def detect(self, img_path): FILE: ultralight/face_detect_utils/pfld_mobileone.py class PFLD_GhostOne (line 12) | class PFLD_GhostOne(Module): method __init__ (line 13) | def __init__(self, width_factor=0.5, input_size=192, landmark_number=1... method forward (line 99) | def forward(self, x): class PFLD_GhostOne_WithSTN (line 136) | class PFLD_GhostOne_WithSTN(Module): method __init__ (line 137) | def __init__(self, width_factor=0.5, input_size=112, landmark_number=1... method forward (line 216) | def forward(self, x): class AuxiliaryNet (line 252) | class AuxiliaryNet(Module): method __init__ (line 253) | def __init__(self, width_factor=1): method forward (line 266) | def forward(self, out1, out2, out3, out4): function check_onnx (line 306) | def check_onnx(torch_out, torch_in): FILE: ultralight/genavatar-bak.py function osmakedirs (line 16) | def osmakedirs(path_list): FILE: ultralight/genavatar.py function osmakedirs (line 17) | def osmakedirs(path_list): function video2imgs (line 29) | def video2imgs(vid_path, save_path, ext = '.png',cut_frame = 10000000): function read_imgs (line 44) | def read_imgs(img_list): FILE: ultralight/unet.py class InvertedResidual (line 7) | class InvertedResidual(nn.Module): method __init__ (line 8) | def __init__(self, inp, oup, stride, use_res_connect, expand_ratio=6): method forward (line 32) | def forward(self, x): class DoubleConvDW (line 38) | class DoubleConvDW(nn.Module): method __init__ (line 40) | def __init__(self, in_channels, out_channels, stride=2): method forward (line 48) | def forward(self, x): class InConvDw (line 51) | class InConvDw(nn.Module): method __init__ (line 52) | def __init__(self, in_channels, out_channels): method forward (line 57) | def forward(self, x): class Down (line 60) | class Down(nn.Module): method __init__ (line 62) | def __init__(self, in_channels, out_channels): method forward (line 69) | def forward(self, x): class Up (line 72) | class Up(nn.Module): method __init__ (line 74) | def __init__(self, in_channels, out_channels): method forward (line 79) | def forward(self, x1, x2): class OutConv (line 89) | class OutConv(nn.Module): method __init__ (line 90) | def __init__(self, in_channels, out_channels): method forward (line 93) | def forward(self, x): class AudioConvWenet (line 96) | class AudioConvWenet(nn.Module): method __init__ (line 97) | def __init__(self): method forward (line 116) | def forward(self, x): class AudioConvHubert (line 132) | class AudioConvHubert(nn.Module): method __init__ (line 133) | def __init__(self): method forward (line 152) | def forward(self, x): class Model (line 168) | class Model(nn.Module): method __init__ (line 169) | def __init__(self,n_channels=6, mode='wenet'): method forward (line 198) | def forward(self, x, audio_feat): function reparameterize_model (line 226) | def reparameterize_model(model: torch.nn.Module) -> torch.nn.Module: function check_onnx (line 240) | def check_onnx(torch_out, torch_in, audio): FILE: wav2lip/audio.py function load_wav (line 9) | def load_wav(path, sr): function save_wav (line 12) | def save_wav(wav, path, sr): function save_wavenet_wav (line 17) | def save_wavenet_wav(wav, path, sr): function preemphasis (line 20) | def preemphasis(wav, k, preemphasize=True): function inv_preemphasis (line 25) | def inv_preemphasis(wav, k, inv_preemphasize=True): function get_hop_size (line 30) | def get_hop_size(): function linearspectrogram (line 37) | def linearspectrogram(wav): function melspectrogram (line 45) | def melspectrogram(wav): function _lws_processor (line 53) | def _lws_processor(): function _stft (line 57) | def _stft(y): function num_frames (line 65) | def num_frames(length, fsize, fshift): function pad_lr (line 76) | def pad_lr(x, fsize, fshift): function librosa_pad_lr (line 86) | def librosa_pad_lr(x, fsize, fshift): function _linear_to_mel (line 92) | def _linear_to_mel(spectogram): function _build_mel_basis (line 98) | def _build_mel_basis(): function _amp_to_db (line 103) | def _amp_to_db(x): function _db_to_amp (line 107) | def _db_to_amp(x): function _normalize (line 110) | def _normalize(S): function _denormalize (line 124) | def _denormalize(D): FILE: wav2lip/face_detection/api.py class LandmarksType (line 17) | class LandmarksType(Enum): class NetworkSize (line 30) | class NetworkSize(Enum): method __new__ (line 36) | def __new__(cls, value): method __int__ (line 41) | def __int__(self): class FaceAlignment (line 46) | class FaceAlignment: method __init__ (line 47) | def __init__(self, landmarks_type, network_size=NetworkSize.LARGE, method get_detections_for_batch (line 64) | def get_detections_for_batch(self, images): FILE: wav2lip/face_detection/detection/core.py class FaceDetector (line 9) | class FaceDetector(object): method __init__ (line 18) | def __init__(self, device, verbose): method detect_from_image (line 32) | def detect_from_image(self, tensor_or_path): method detect_from_directory (line 54) | def detect_from_directory(self, path, extensions=['.jpg', '.png'], rec... method reference_scale (line 104) | def reference_scale(self): method reference_x_shift (line 108) | def reference_x_shift(self): method reference_y_shift (line 112) | def reference_y_shift(self): method tensor_or_path_to_ndarray (line 116) | def tensor_or_path_to_ndarray(tensor_or_path, rgb=True): FILE: wav2lip/face_detection/detection/sfd/bbox.py function IOU (line 17) | def IOU(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2): function bboxlog (line 30) | def bboxlog(x1, y1, x2, y2, axc, ayc, aww, ahh): function bboxloginv (line 37) | def bboxloginv(dx, dy, dw, dh, axc, ayc, aww, ahh): function nms (line 44) | def nms(dets, thresh): function encode (line 67) | def encode(matched, priors, variances): function decode (line 91) | def decode(loc, priors, variances): function batch_decode (line 111) | def batch_decode(loc, priors, variances): FILE: wav2lip/face_detection/detection/sfd/detect.py function detect (line 19) | def detect(net, img, device): function batch_detect (line 58) | def batch_detect(net, imgs, device): function flip_detect (line 96) | def flip_detect(net, img, device): function pts_to_bb (line 109) | def pts_to_bb(pts): FILE: wav2lip/face_detection/detection/sfd/net_s3fd.py class L2Norm (line 6) | class L2Norm(nn.Module): method __init__ (line 7) | def __init__(self, n_channels, scale=1.0): method forward (line 16) | def forward(self, x): class s3fd (line 22) | class s3fd(nn.Module): method __init__ (line 23) | def __init__(self): method forward (line 70) | def forward(self, x): FILE: wav2lip/face_detection/detection/sfd/sfd_detector.py class SFDDetector (line 16) | class SFDDetector(FaceDetector): method __init__ (line 17) | def __init__(self, device, path_to_detector=os.path.join(os.path.dirna... method detect_from_image (line 31) | def detect_from_image(self, tensor_or_path): method detect_from_batch (line 41) | def detect_from_batch(self, images): method reference_scale (line 50) | def reference_scale(self): method reference_x_shift (line 54) | def reference_x_shift(self): method reference_y_shift (line 58) | def reference_y_shift(self): FILE: wav2lip/face_detection/models.py function conv3x3 (line 7) | def conv3x3(in_planes, out_planes, strd=1, padding=1, bias=False): class ConvBlock (line 13) | class ConvBlock(nn.Module): method __init__ (line 14) | def __init__(self, in_planes, out_planes): method forward (line 33) | def forward(self, x): class Bottleneck (line 58) | class Bottleneck(nn.Module): method __init__ (line 62) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 75) | def forward(self, x): class HourGlass (line 98) | class HourGlass(nn.Module): method __init__ (line 99) | def __init__(self, num_modules, depth, num_features): method _generate_network (line 107) | def _generate_network(self, level): method _forward (line 119) | def _forward(self, level, inp): method forward (line 141) | def forward(self, x): class FAN (line 145) | class FAN(nn.Module): method __init__ (line 147) | def __init__(self, num_modules=1): method forward (line 174) | def forward(self, x): class ResNetDepth (line 204) | class ResNetDepth(nn.Module): method __init__ (line 206) | def __init__(self, block=Bottleneck, layers=[3, 8, 36, 3], num_classes... method _make_layer (line 229) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 246) | def forward(self, x): FILE: wav2lip/face_detection/utils.py function _gaussian (line 11) | def _gaussian( function draw_gaussian (line 37) | def draw_gaussian(image, point, sigma): function transform (line 56) | def transform(point, center, scale, resolution, invert=False): function crop (line 92) | def crop(image, center, scale, resolution=256.0): function get_preds_fromhm (line 132) | def get_preds_fromhm(hm, center=None, scale=None): function get_preds_fromhm_batch (line 172) | def get_preds_fromhm_batch(hm, centers=None, scales=None): function shuffle_lr (line 212) | def shuffle_lr(parts, pairs=None): function flip (line 237) | def flip(tensor, is_label=False): function appdata_dir (line 259) | def appdata_dir(appname=None, roaming=False): FILE: wav2lip/genavatar.py function osmakedirs (line 27) | def osmakedirs(path_list): function video2imgs (line 31) | def video2imgs(vid_path, save_path, ext = '.png',cut_frame = 10000000): function read_imgs (line 45) | def read_imgs(img_list): function get_smoothened_boxes (line 53) | def get_smoothened_boxes(boxes, T): function face_detect (line 62) | def face_detect(images): FILE: wav2lip/hparams.py function get_image_list (line 4) | def get_image_list(data_root, split): class HParams (line 15) | class HParams: method __init__ (line 16) | def __init__(self, **kwargs): method __getattr__ (line 22) | def __getattr__(self, key): method set_hparam (line 27) | def set_hparam(self, key, value): function hparams_debug_string (line 98) | def hparams_debug_string(): FILE: web/asr/main.js function addresschange (line 61) | function addresschange() function play_file (line 186) | function play_file() function start_file_send (line 194) | function start_file_send() function on_recoder_mode_change (line 221) | function on_recoder_mode_change() function getHotwords (line 260) | function getHotwords(){ function getAsrMode (line 289) | function getAsrMode(){ function handleWithTimestamp (line 310) | function handleWithTimestamp(tmptext,tmptime) function is_speaking (line 348) | async function is_speaking() { function waitSpeakingEnd (line 363) | async function waitSpeakingEnd() { function getJsonMessage (line 384) | function getJsonMessage( jsonMsg ) { function getConnState (line 435) | function getConnState( connState ) { function record (line 466) | function record() function start (line 482) | function start() { function stop (line 513) | function stop() { function clear (line 582) | function clear() { function recProcess (line 593) | function recProcess( buffer, powerLevel, bufferDuration, bufferSampleRat... function getUseITN (line 617) | function getUseITN() { FILE: web/asr/recorder-core.js function initFn (line 598) | function initFn(set){ FILE: web/asr/wsconnecter.js function WebSocketConnectMethod (line 7) | function WebSocketConnectMethod( config ) { //定义socket连接方法类 FILE: web/client.js function negotiate (line 3) | function negotiate() { function start (line 45) | function start() { function stop (line 70) | function stop() { FILE: web/srs.sdk.js function SrsError (line 10) | function SrsError(name, message) { function SrsRtcPublisherAsync (line 20) | function SrsRtcPublisherAsync() { function SrsRtcPlayerAsync (line 275) | function SrsRtcPlayerAsync() { function SrsRtcWhipWhepAsync (line 515) | function SrsRtcWhipWhepAsync() { function SrsRtcFormatSenders (line 671) | function SrsRtcFormatSenders(senders, kind) { FILE: web/whep.js function negotiate (line 3) | function negotiate() { function start (line 43) | function start() { function stop (line 68) | function stop() { FILE: webrtc.py class PlayerStreamTrack (line 48) | class PlayerStreamTrack(MediaStreamTrack): method __init__ (line 53) | def __init__(self, player, kind): method next_timestamp (line 68) | async def next_timestamp(self) -> Tuple[int, fractions.Fraction]: method recv (line 110) | async def recv(self) -> Union[Frame, Packet]: method stop (line 148) | def stop(self): function player_worker_thread (line 158) | def player_worker_thread( class HumanPlayer (line 167) | class HumanPlayer: method __init__ (line 169) | def __init__( method notify (line 185) | def notify(self,eventpoint): method audio (line 190) | def audio(self) -> MediaStreamTrack: method video (line 197) | def video(self) -> MediaStreamTrack: method _start (line 203) | def _start(self, track: PlayerStreamTrack) -> None: method _stop (line 221) | def _stop(self, track: PlayerStreamTrack) -> None: method __log_debug (line 234) | def __log_debug(self, msg: str, *args) -> None: