marvin: audio.speak: unexpected keyword argument 'openai_api_key'
First check
- I added a descriptive title to this issue.
- I used the GitHub search to try to find a similar issue and didn’t find one.
- I searched the Marvin documentation for this issue.
Bug summary
trying either example on the docs here: https://www.askmarvin.ai/docs/audio/speech
leads to a traceback:
332 async def generate_speech(
333 self,
334 input: str,
335 file: Optional[Path] = None,
336 **kwargs: Any,
337 ) -> Optional["HttpxBinaryResponseContent"]:
--> 338 response = await self.client.audio.speech.create(
339 input=input, **settings.openai.audio.speech.model_dump() | kwargs
340 )
341 if file:
342 response.stream_to_file(file)
TypeError: AsyncSpeech.create() got an unexpected keyword argument 'openai_api_key'
Reproduction
import marvin
audio = marvin.speak("I sure like being inside this fancy computer!")
Error
TypeError: AsyncSpeech.create() got an unexpected keyword argument 'openai_api_key'
Versions
Version: 2.3.0
Python version: 3.11.8
OS/Arch: darwin/arm64
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 3 months ago
- Comments: 15 (9 by maintainers)
thanks for the report and context @lostmygithubaccount - v2.3.1 is out with the fix
so if I go back to
openai==1.13.4
, I get an error:ImportError: cannot import name 'AssistantEventHandler' from 'openai'
if I go above
openai==1.14.0
I get the above error