mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
Code review changes
This commit is contained in:
@@ -2,7 +2,6 @@ import os
|
||||
from playsound import playsound
|
||||
import requests
|
||||
from config import Config
|
||||
|
||||
cfg = Config()
|
||||
import gtts
|
||||
|
||||
@@ -20,7 +19,8 @@ def eleven_labs_speech(text, voice_index=0):
|
||||
tts_url = "https://api.elevenlabs.io/v1/text-to-speech/{voice_id}".format(
|
||||
voice_id=voices[voice_index])
|
||||
formatted_message = {"text": text}
|
||||
response = requests.post(tts_url, headers=tts_headers, json=formatted_message)
|
||||
response = requests.post(
|
||||
tts_url, headers=tts_headers, json=formatted_message)
|
||||
|
||||
if response.status_code == 200:
|
||||
with open("speech.mpeg", "wb") as f:
|
||||
|
||||
Reference in New Issue
Block a user