1
Fork 0
mirror of https://github.com/RGBCube/GDUS synced 2025-07-27 21:17:45 +00:00
This commit is contained in:
RGBCube 2024-01-03 15:50:58 +03:00
parent 3c3d660bf6
commit aec4e27bb6
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -10,10 +10,10 @@ leds = [
(19, True),
]
for led in leds:
for led in leds[1::]:
gpio.setmode(gpio.BCM)
gpio.setup(led[0], gpio.OUT)
gpio.output(LED_PIN, int(led[1]))
gpio.output(led[0], int(led[1]))
app = FastAPI()
@ -39,7 +39,7 @@ async def toggle(number: int) -> str:
@app.get("/speak")
async def speak(text: str) -> str:
ret = os.system(f'gtts-cli "{text}" --output text.mp3; pw-play text.mp3')
ret = os.system(f'gtts-cli "{text}" --lang tr --output text.mp3; pw-play text.mp3')
return f"TEXT {'OK' if ret == 0 else 'FAIL'}, TEXT: {text}";

View file

@ -8,5 +8,6 @@ authors = [ "RGBCube" ]
python = "^3.8"
fastapi = "0.105.0"
gtts = "2.5.0"
"RPi.GPIO" = "0.7.1"
uvicorn = "0.24.0.post1"