Skip to content

Commit e5ee964

Browse files
committed
format
1 parent e2304e0 commit e5ee964

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/local_audio/full_duplex.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ async def main() -> None:
2121
token = os.getenv("LIVEKIT_TOKEN")
2222
# check for either token or api_key and api_secret
2323
if not url or (not token and (not api_key or not api_secret)):
24-
raise RuntimeError("LIVEKIT_TOKEN or LIVEKIT_API_KEY and LIVEKIT_API_SECRET must be set in env")
24+
raise RuntimeError(
25+
"LIVEKIT_TOKEN or LIVEKIT_API_KEY and LIVEKIT_API_SECRET must be set in env"
26+
)
2527

2628
room = rtc.Room()
2729

@@ -98,14 +100,14 @@ async def monitor_mic_db():
98100
mic_stream = rtc.AudioStream(track, sample_rate=48000, num_channels=1)
99101
frame_count = 0
100102
sample_interval = 5 # Process every 5th frame to reduce load
101-
103+
102104
try:
103105
async for frame_event in mic_stream:
104106
# Skip frames to reduce processing load
105107
frame_count += 1
106108
if frame_count % sample_interval != 0:
107109
continue
108-
110+
109111
frame = frame_event.frame
110112
# Convert frame data to list of samples
111113
samples = list(frame.data)

0 commit comments

Comments
 (0)