mirror of
https://github.com/TMElyralab/MuseTalk.git
synced 2026-02-05 18:09:19 +08:00
<enhance>: modified inference codes
1. Can set bbox_shift in configs/inference/test.yaml 2. Do not need to pip install whisper now
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import os
|
||||
#import whisper
|
||||
from whisper import load_model
|
||||
#import whisper.whispher as whiisper
|
||||
from .whisper import load_model
|
||||
import soundfile as sf
|
||||
import numpy as np
|
||||
import time
|
||||
@@ -9,11 +7,12 @@ import sys
|
||||
sys.path.append("..")
|
||||
|
||||
class Audio2Feature():
|
||||
def __init__(self, whisper_model_type="tiny",model_path="./checkpoints/wisper_tiny.pt"):
|
||||
def __init__(self,
|
||||
whisper_model_type="tiny",
|
||||
model_path="./models/whisper/tiny.pt"):
|
||||
self.whisper_model_type = whisper_model_type
|
||||
self.model = load_model(model_path) #
|
||||
|
||||
|
||||
def get_sliced_feature(self,feature_array, vid_idx, audio_feat_length= [2,2],fps = 25):
|
||||
"""
|
||||
Get sliced features based on a given index
|
||||
|
||||
Reference in New Issue
Block a user