Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidDataError #13

Open
sirloinofbeef opened this issue Jun 11, 2024 · 3 comments
Open

InvalidDataError #13

sirloinofbeef opened this issue Jun 11, 2024 · 3 comments

Comments

@sirloinofbeef
Copy link

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
Copy link
Owner

sfortis commented Jun 17, 2024

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
Copy link

ronnieSVK commented Jun 22, 2024

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 !

@sfortis
Copy link
Owner

sfortis commented Jul 17, 2024

Hey @ronnieSVK, a little bit late, but it seems that the API didn't respond with valid audio. You need to set a payment method for OpenAI endpoints; these are not free!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants