Skip to content

5. Test Peripherals

Vignesh Rao edited this page Jun 2, 2024 · 3 revisions

Camera

from jarvis.modules.camera import camera

if __name__ == '__main__':
    cam_object = camera.Camera()
    print(cam_object.get_index())  # Get index id of each camera
    print(cam_object.list_cameras())  # List all connected cameras

Text to Speech

from jarvis.modules.speaker import speak

if __name__ == '__main__':
    speak_object = speak.Speaker()
    speak_object.run()
    print(list(speak_object.get_all_voices()))

Speech to Text

import asyncio

from jarvis.modules.microphone import recognizer

if __name__ == '__main__':
    asyncio.run(recognizer.main())
Clone this wiki locally