|
@@ -15,12 +15,16 @@ from fairseq2.data.text import TextTokenizer
|
|
from fairseq2.models.wav2vec2 import Wav2Vec2EncoderConfig
|
|
from fairseq2.models.wav2vec2 import Wav2Vec2EncoderConfig
|
|
from fairseq2.nn.padding import get_seqs_and_padding_mask
|
|
from fairseq2.nn.padding import get_seqs_and_padding_mask
|
|
from seamless_communication.models.unity.model import UnitYModel
|
|
from seamless_communication.models.unity.model import UnitYModel
|
|
-from simuleval.agents import AgentStates, SpeechToSpeechAgent
|
|
|
|
|
|
+from simuleval.agents import SpeechToSpeechAgent
|
|
from simuleval.agents.actions import Action, ReadAction, WriteAction
|
|
from simuleval.agents.actions import Action, ReadAction, WriteAction
|
|
from simuleval.data.segments import SpeechSegment
|
|
from simuleval.data.segments import SpeechSegment
|
|
|
|
+from seamless_communication.streaming.agents.common import (
|
|
|
|
+ AgentStates,
|
|
|
|
+ NoUpdateTargetMixin,
|
|
|
|
+)
|
|
|
|
|
|
|
|
|
|
-class OfflineWav2VecBertEncoderAgent(SpeechToSpeechAgent):
|
|
|
|
|
|
+class OfflineWav2VecBertEncoderAgent(SpeechToSpeechAgent, NoUpdateTargetMixin):
|
|
"""
|
|
"""
|
|
Incremental encoding of an wav2vec encoder output
|
|
Incremental encoding of an wav2vec encoder output
|
|
It update the whole encoder states every time when there is a new incoming segment.
|
|
It update the whole encoder states every time when there is a new incoming segment.
|