-
import asyncio
from g4f.client import AsyncClient
import g4f.Provider
import g4f.debug; g4f.debug.logging = True
async def main():
client = AsyncClient(provider=g4f.Provider.PollinationsAI)
response = await client.chat.completions.create(
model="openai-audio",
messages=[{"role": "user", "content": "Привет как дела"}],
audio={"voice": "alloy", "format": "mp3"},
)
response.choices[0].message.save("alloy.mp3")
asyncio.run(main()) answer
|
Beta Was this translation helpful? Give feedback.
Answered by
hlohaus
Apr 3, 2025
Replies: 1 comment
-
Hey @playjymer, make the "./generated_images" directory first, okay? |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
playjymer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @playjymer, make the "./generated_images" directory first, okay?