Commit Graph

7 Commits

Author SHA1 Message Date
Matthew Gennings b3e600377c feat: Update narrator.py and capture.py to reflect ElevenLabs API updates
This commit addresses changes made to update the ElevenLabs API version as per pull request #51 (Update narrator.py to reflect API updates #51 - https://github.com/cbh123/narrator/pull/51). The following changes have been made:

narrator.py:
- Updated the ElevenLabs client instantiation to the new API format.
- Removed the deprecated `set_api_key` and `get_api_key` methods and replaced them with the `ElevenLabs` class instantiation.
- Modified the `play_audio` function to handle the audio generator properly by collecting the audio data into a bytes-like object before writing it to a file and playing it.
- Added detailed docstrings and comments for better understanding and maintenance of the code.
- Ensured that the OpenAI client uses the correct API key and updated the image analysis to handle responses accurately.

capture.py:
- Ensured the frames folder is created if it doesn't exist.
- Updated the webcam initialization check and added a wait time for the camera to adjust light levels.
- Adjusted the image resizing logic to improve performance before saving the frame.
- Added detailed print statements and comments for clarity and debugging purposes.

These changes ensure compatibility with the latest ElevenLabs API and improve the overall robustness and readability of the code.
2024-07-22 16:43:07 -05:00
Matt Mazur f3c4337fc2 Create frames directory if it doesn't exist 2023-11-15 13:54:16 -05:00
Matt Mazur c75f298353 Revert "Create frames folder if it doesn't exist"
This reverts commit 61e458e95b.
2023-11-15 13:53:39 -05:00
Matt Mazur 61e458e95b Create frames folder if it doesn't exist 2023-11-15 13:46:10 -05:00
Charlie Holtz fd52ba8bcc cleanup 2023-11-07 12:41:34 -05:00
Charlie Holtz 1dd40a7499 updates to quality 2023-11-07 10:50:50 -05:00
Charlie Holtz 091f066859 first commit 2023-11-07 10:27:35 -05:00