examples: update camera_* with video_*

This commit is contained in:
Aleix Conchillo Flaqué
2025-04-23 13:39:50 -07:00
parent 420912dd4b
commit e79a002e5a
36 changed files with 98 additions and 101 deletions

View File

@@ -29,9 +29,9 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
transport = SmallWebRTCTransport(
webrtc_connection=webrtc_connection,
params=TransportParams(
camera_out_enabled=True,
camera_out_width=1024,
camera_out_height=1024,
video_out_enabled=True,
video_out_width=1024,
video_out_height=1024,
),
)

View File

@@ -33,9 +33,7 @@ async def main():
transport = TkLocalTransport(
tk_root,
TkTransportParams(
camera_out_enabled=True, camera_out_width=1024, camera_out_height=1024
),
TkTransportParams(video_out_enabled=True, video_out_width=1024, video_out_height=1024),
)
imagegen = FalImageGenService(

View File

@@ -28,9 +28,9 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
transport = SmallWebRTCTransport(
webrtc_connection=webrtc_connection,
params=TransportParams(
camera_out_enabled=True,
camera_out_width=1024,
camera_out_height=1024,
video_out_enabled=True,
video_out_width=1024,
video_out_height=1024,
),
)

View File

@@ -77,9 +77,9 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
webrtc_connection=webrtc_connection,
params=TransportParams(
audio_out_enabled=True,
camera_out_enabled=True,
camera_out_width=1024,
camera_out_height=1024,
video_out_enabled=True,
video_out_width=1024,
video_out_height=1024,
),
)

View File

@@ -153,9 +153,9 @@ async def main():
tk_root,
TkTransportParams(
audio_out_enabled=True,
camera_out_enabled=True,
camera_out_width=1024,
camera_out_height=1024,
video_out_enabled=True,
video_out_width=1024,
video_out_height=1024,
),
)

View File

@@ -75,9 +75,9 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_out_enabled=True,
camera_out_width=1024,
camera_out_height=1024,
video_out_enabled=True,
video_out_width=1024,
video_out_height=1024,
vad_analyzer=SileroVADAnalyzer(),
),
)

View File

@@ -39,7 +39,6 @@ class MirrorProcessor(FrameProcessor):
)
)
elif isinstance(frame, InputImageRawFrame):
print(f"Received image frame: {frame.size} {frame.format}")
await self.push_frame(
OutputImageRawFrame(image=frame.image, size=frame.size, format=frame.format)
)
@@ -55,11 +54,11 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True,
camera_out_enabled=True,
camera_out_is_live=True,
camera_out_width=1280,
camera_out_height=720,
video_in_enabled=True,
video_out_enabled=True,
video_out_is_live=True,
video_out_width=1280,
video_out_height=720,
),
)

View File

@@ -57,11 +57,11 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True,
camera_out_enabled=True,
camera_out_is_live=True,
camera_out_width=1280,
camera_out_height=720,
video_in_enabled=True,
video_out_enabled=True,
video_out_is_live=True,
video_out_width=1280,
video_out_height=720,
),
)
@@ -72,10 +72,10 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
tk_root,
TkTransportParams(
audio_out_enabled=True,
camera_out_enabled=True,
camera_out_is_live=True,
camera_out_width=1280,
camera_out_height=720,
video_out_enabled=True,
video_out_is_live=True,
video_out_width=1280,
video_out_height=720,
),
)

View File

@@ -57,7 +57,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True,
video_in_enabled=True,
vad_analyzer=SileroVADAnalyzer(),
),
)

View File

@@ -57,7 +57,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True,
video_in_enabled=True,
vad_analyzer=SileroVADAnalyzer(),
),
)

View File

@@ -57,7 +57,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True,
video_in_enabled=True,
vad_analyzer=SileroVADAnalyzer(),
),
)

View File

@@ -57,7 +57,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True,
video_in_enabled=True,
vad_analyzer=SileroVADAnalyzer(),
),
)

View File

@@ -68,7 +68,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True, # Make sure camera input is enabled
video_in_enabled=True,
vad_analyzer=SileroVADAnalyzer(),
),
)

View File

@@ -68,7 +68,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True, # Make sure camera input is enabled
video_in_enabled=True,
vad_analyzer=SileroVADAnalyzer(),
),
)

View File

@@ -70,7 +70,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True, # Make sure camera input is enabled
video_in_enabled=True,
vad_analyzer=SileroVADAnalyzer(),
),
)

View File

@@ -40,10 +40,10 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
webrtc_connection=webrtc_connection,
params=TransportParams(
audio_in_enabled=True,
camera_out_enabled=True,
camera_out_is_live=True,
camera_out_width=1280,
camera_out_height=720,
video_out_enabled=True,
video_out_is_live=True,
video_out_width=1280,
video_out_height=720,
),
)

View File

@@ -26,10 +26,10 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
webrtc_connection=webrtc_connection,
params=TransportParams(
audio_in_enabled=True,
camera_out_enabled=True,
camera_out_is_live=True,
camera_out_width=1280,
camera_out_height=720,
video_out_enabled=True,
video_out_is_live=True,
video_out_width=1280,
video_out_height=720,
),
)

View File

@@ -232,7 +232,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=True,
video_in_enabled=True,
vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=0.8)),
),
)

View File

@@ -33,7 +33,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_in_enabled=False,
video_in_enabled=False,
# set stop_secs to something roughly similar to the internal setting
# of the Multimodal Live api, just to align events.
vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=0.5)),

View File

@@ -34,9 +34,9 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection):
params=TransportParams(
audio_in_enabled=True,
audio_out_enabled=True,
camera_out_enabled=True,
camera_out_width=512,
camera_out_height=512,
video_out_enabled=True,
video_out_width=512,
video_out_height=512,
vad_analyzer=SileroVADAnalyzer(),
),
)