mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-10 16:54:20 +01:00
run black and isort on behalf of OP
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import os
|
||||
import requests
|
||||
import logging
|
||||
import os
|
||||
|
||||
import requests
|
||||
from playsound import playsound
|
||||
|
||||
from autogpt.speech.base import VoiceBase
|
||||
|
||||
|
||||
class BrianSpeech(VoiceBase):
|
||||
"""Brian speech module for autogpt"""
|
||||
|
||||
@@ -20,7 +23,9 @@ class BrianSpeech(VoiceBase):
|
||||
Returns:
|
||||
bool: True if the request was successful, False otherwise
|
||||
"""
|
||||
tts_url = f"https://api.streamelements.com/kappa/v2/speech?voice=Brian&text={text}"
|
||||
tts_url = (
|
||||
f"https://api.streamelements.com/kappa/v2/speech?voice=Brian&text={text}"
|
||||
)
|
||||
response = requests.get(tts_url)
|
||||
|
||||
if response.status_code == 200:
|
||||
@@ -30,5 +35,9 @@ class BrianSpeech(VoiceBase):
|
||||
os.remove("speech.mp3")
|
||||
return True
|
||||
else:
|
||||
logging.error("Request failed with status code: %s, response content: %s", response.status_code, response.content)
|
||||
logging.error(
|
||||
"Request failed with status code: %s, response content: %s",
|
||||
response.status_code,
|
||||
response.content,
|
||||
)
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user