mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
convert omega dict to dict
This commit is contained in:
parent
87ae7a485b
commit
a62ef27d71
@ -1088,6 +1088,8 @@ class SenseVoiceQuantizedEncoderPitch(nn.Module):
|
||||
def build_quantizer(self, vq_config):
|
||||
if vq_config is None:
|
||||
return None
|
||||
from omegaconf import OmegaConf, DictConfig
|
||||
vq_config = OmegaConf.to_container(vq_config)
|
||||
name = vq_config.pop("name", "costume_quantizer")
|
||||
if name == "costume_quantizer":
|
||||
from funasr.models.sense_voice.quantizer.costume_quantizer import CostumeQuantizer
|
||||
@ -1236,6 +1238,8 @@ class SenseVoiceQuantizedEncoder(nn.Module):
|
||||
def build_quantizer(self, vq_config):
|
||||
if vq_config is None:
|
||||
return None
|
||||
from omegaconf import OmegaConf, DictConfig
|
||||
vq_config = OmegaConf.to_container(vq_config)
|
||||
name = vq_config.pop("name", "costume_quantizer")
|
||||
if name == "costume_quantizer":
|
||||
from funasr.models.sense_voice.quantizer.costume_quantizer import CostumeQuantizer
|
||||
|
||||
@ -2027,7 +2027,7 @@ class SenseVoiceLPitch(nn.Module):
|
||||
if self.activation_checkpoint:
|
||||
from torch.utils.checkpoint import checkpoint
|
||||
|
||||
encoder_out, encoder_out_lens = checkpoint(
|
||||
encoder_out, encoder_f0_out, encoder_out_lens = checkpoint(
|
||||
self.encode, speech, speech_lengths, use_reentrant=False
|
||||
)
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user