Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion examples/speech_to_speech/english_alternate_agent.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Optional
from simuleval.agents.states import AgentStates
from simuleval.utils import entrypoint
from simuleval.data.segments import SpeechSegment
from simuleval.agents import SpeechToSpeechAgent
Expand Down Expand Up @@ -50,7 +52,10 @@ def __init__(self, args):
def add_args(parser):
parser.add_argument("--wait-seconds", default=1, type=int)

def policy(self):
def policy(self, states: Optional[AgentStates] = None):
if states is None:
states = states
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be states = self.states


length_in_seconds = round(
len(self.states.source) / self.states.source_sample_rate
)
Expand Down