Commit Graph

5 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
Gennings, Matt b083594e2e Updated narrator.py and requirements.txt to support .env file for environment variables 2024-01-09 11:33:48 -06:00
Gabor Cselle f6ccf6f780 Actually set Elevenlabs API key from environment variable 2023-11-17 12:30:59 -08:00
Gabor Cselle b2b76702b3 Parametrize voice ID via another environment variable. 2023-11-17 10:50:12 -08:00
Charlie Holtz f2359959dd update gitignore, change judge to narrator 2023-11-15 10:43:29 -05:00