Skip to content

Commit f8b8a6c

Browse files
committed
update examples
1 parent 2bba03b commit f8b8a6c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

examples/rt/async/file/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def handle_final_transcript(msg):
1212
print(f"Final: {msg['metadata']['transcript']}")
1313

1414
# Transcribe audio file
15-
with open("../../../example.wav", "rb") as audio_file:
15+
with open("./examples/example.wav", "rb") as audio_file:
1616
await client.transcribe(audio_file)
1717

1818
# Run the async function

sdk/rt/speechmatics/rt/_async_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def __init__(
7575
conn_config: Optional[ConnectionConfig] = None,
7676
) -> None:
7777
self._logger = get_logger("speechmatics.rt.async_client")
78-
self._seq_no = 0
7978

8079
(
8180
self._session,

sdk/rt/speechmatics/rt/_base_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def __init__(self, transport: Transport) -> None:
4040
self._recv_task: Optional[asyncio.Task[None]] = None
4141
self._closed_evt = asyncio.Event()
4242
self._eos_sent = False
43+
self._seq_no = 0
4344

4445
self._logger = get_logger("speechmatics.rt.base_client")
4546

@@ -119,6 +120,7 @@ async def send_audio(self, payload: bytes) -> None:
119120

120121
try:
121122
await self._transport.send_message(payload)
123+
self._seq_no += 1
122124
except Exception:
123125
self._closed_evt.set()
124126
raise

0 commit comments

Comments
 (0)