sfortis / openai_tts

OpenAI TTS custom component for HA
GNU General Public License v3.0
41 stars 15 forks source link

InvalidDataError #13

Open sirloinofbeef opened 3 weeks ago

sirloinofbeef commented 3 weeks ago

Running HA core 2024.6.1

Installs fine, but sending requests I get the below error in the log: music_assistant.common.models.errors.InvalidDataError

The mp3 files created are 1kb in size, hence the invalid data :(

sfortis commented 3 weeks ago

I don't know how music assistant is related with this integration! This service can be used only with tts.speak

ex service: tts.speak target: entity_id: tts.openai_nova_engine data: cache: true media_player_entity_id: media_player.bedroom_speaker message: My speech has improved now!

ronnieSVK commented 2 weeks ago

Hi @sfortis ! Thank you very much for your custom component ! The DEMO looks great ! I would like to kindly ask you for some assistance, maybe im missing something. After registration i requested my API Key, made two integrations ("SD" and "HD"), but sadly ive got "Unknown Error" after executing the service, and 4 error messages in Logs.

Command : service: tts.speak data: cache: true media_player_entity_id: media_player.kitchen_homepod message: Test message target: entity_id: tts.openai_tts_hd_shimmer_hd

Errors : Logger: homeassistant.components.tts Source: components/tts/__init__.py:946 integration: Text-to-speech (TTS) ([documentation](https://www.home-assistant.io/integrations/tts), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+tts%22)) First occurred: 12:05:49 (2 occurrences) Last logged: 12:06:00 ID3 tag error: can't sync to MPEG frame

Logger: root Source: /usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/audio_source.py:265 First occurred: 12:05:50 (2 occurrences) Last logged: 12:06:01 Failed to parse metadata

Logger: homeassistant.helpers.script.websocket_api_script Source: helpers/script.py:526 First occurred: 12:05:50 (2 occurrences) Last logged: 12:06:01 websocket_api script: Error executing script. Unexpected error for call_service at pos 1: ('failed to init decoder', -1)

Logger: homeassistant.components.websocket_api.http.connection Source: components/apple_tv/media_player.py:344 integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22)) First occurred: 12:05:50 (2 occurrences) Last logged: 12:06:01 [140197586196736] Error handling message: Unknown error (unknown_error) HomeServer from 192.168.1.6 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15)

Do you have any idea, where is the issue ? Maybe it is something outside HA, where i have to change, set or pay in my OpenAI account ? I know those services are normally payed, but my experience was that with some limits (call numbers, characters, audio lenght etc...) are provided free.

Thank you very much !