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

sayit cannot upload announcement file #294

Open
do5tj80 opened this issue Dec 27, 2023 · 9 comments
Open

sayit cannot upload announcement file #294

do5tj80 opened this issue Dec 27, 2023 · 9 comments

Comments

@do5tj80
Copy link

do5tj80 commented Dec 27, 2023

sayit cannot upload announcement file

To Reproduce
Steps to reproduce the behavior:

  1. Go to sayit instance
  2. Select an announcement file
  3. Click on 'TEST'
  4. See error

image

Versions:

  • Adapter version: 3.0.5
  • JS-Controller version: 5.0.17
  • Node version: 18.18.2
  • Web version: 6
  • Operating system: Debian 11.8

Log:
sayit.0 | 2023-12-27 11:11:01.126 | error | Cannot write file: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object

sayit.0 | 2023-12-27 11:11:01.126 | error | Cannot play file: Error: Cannot upload file "tts.userfiles/scifi.mp3" to state: Error: ENOENT: no such file or directory, open 'tts.userfiles/scifi.mp3'

@wm20320
Copy link

wm20320 commented Jun 7, 2024

Same here with 4.0.0 and 4.0.1 - they don't work
But issues in 3.0.5, too:

`

sayit.0 2024-06-07 19:42:50.903 error Cannot play file: Error: Cannot upload file "tts.userfiles/Doorbell.mp3" to state: Error: ENOENT: no such file or directory, open 'tts.userfiles/Doorbell.mp3'
sayit.0 2024-06-07 19:42:50.898 error Cannot write file: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object
sayit.0 2024-06-07 19:42:48.896 error Cannot write file: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object
host.lue-linux 2024-06-07 19:42:39.467 warn instance system.adapter.sayit.0 terminated due to SIGABRT
host.lue-linux 2024-06-07 19:42:39.467 error Caught by controller[0]: 6: MDNSService.self.watcher.callback (/opt/iobroker/node_modules/mdns/lib/mdns_service.js:18:40)
host.lue-linux 2024-06-07 19:42:39.467 error Caught by controller[0]: 5: on_resolver_done (/opt/iobroker/node_modules/mdns/lib/resolver_sequence_tasks.js:33:11)
host.lue-linux 2024-06-07 19:42:39.467 error Caught by controller[0]: 4: next (/opt/iobroker/node_modules/mdns/lib/browser.js:109:21)
host.lue-linux 2024-06-07 19:42:39.467 error Caught by controller[0]: 3: getaddrinfo (/opt/iobroker/node_modules/mdns/lib/resolver_sequence_tasks.js:152:14)
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: 2: /opt/iobroker/node_modules/mdns/lib/resolver_sequence_tasks.js:153:7
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: 1: getaddrinfo_0_11 (/opt/iobroker/node_modules/mdns/lib/resolver_sequence_tasks.js:117:21)
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: ----- JavaScript stack trace -----
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: 6: 0x1963df6 [io.sayit.0]
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: 5: 0xf58be5 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [io.sayit.0]
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: 4: 0xf5871d [io.sayit.0]
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: 3: 0xf57eaf v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [io.sayit.0]
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: 2: 0xbe98aa [io.sayit.0]
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: 1: 0xcbc127 node::Assert(node::AssertionInfo const&) [io.sayit.0]
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: ----- Native stack trace -----
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: # Assertion failed: args[4]->IsUint32()
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: # io.sayit.0[7765]: void node::cares_wrap::{anonymous}::GetAddrInfo(const v8::FunctionCallbackInfov8::Value&) at ../src/cares_wrap.cc:1575
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: *** WARNING *** For more information see http://0pointer.de/blog/projects/avahi-compat.html
host.lue-linux 2024-06-07 19:42:39.466 error Caught by controller[0]: *** WARNING *** Please fix your application to use the native API of Avahi!
host.lue-linux 2024-06-07 19:42:39.465 error Caught by controller[0]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
host.lue-linux 2024-06-07 19:42:39.465 error Caught by controller[0]: *** WARNING *** For more information see http://0pointer.de/blog/projects/avahi-compat.html
host.lue-linux 2024-06-07 19:42:39.465 error Caught by controller[0]: *** WARNING *** Please fix your application to use the native API of Avahi!
host.lue-linux 2024-06-07 19:42:39.465 error Caught by controller[0]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
`

@GermanBluefox
Copy link
Contributor

Cannot reproduce it. Can you test it with v4.0.2?

@wm20320
Copy link

wm20320 commented Jul 11, 2024

With 4.04 it works now THX! But I'm still not able to play mp3s. Code:
Cannot play file: Error: Cannot upload file "/opt/iobroker/iobroker-data/files/sayit.0/tts.userfiles/Gong.mp3" to state: Error: ENOENT: no such file or directory, open '/opt/iobroker/iobroker-data/files/sayit.0/tts.userfiles/Gong.mp3'
And error commented in 1st post from do5tj80 here still exists.
But I'll try and test it again later.

@GermanBluefox
Copy link
Contributor

Cannot upload file

What is your code/blockly to play the file?

@wm20320
Copy link

wm20320 commented Jul 12, 2024

Issues only with mp3.

Testet with a)
sendTo("sayit.0", "say", { text: '/opt/iobroker/iobroker-data/files/sayit.0/tts.userfiles/Gong.mp3' })
b)
setState('sayit.0.tts.text' /* Text to speech */, '/opt/iobroker/iobroker-data/files/sayit.0/tts.userfiles/Gong.mp3')
c)
Set Value in "Objects" manually

a) and b) both set value in "objects" correctly

Only Text --> no problem

This Popup appears in the Adapter Settings, if I try to play a custom sound:
Cannot play: EncodingError: Failed to execute 'decodeAudioData' on 'BaseAudioContext': Unable to decode audio data

@GermanBluefox
Copy link
Contributor

sayit.0/tts.userfiles/Gong.mp3

What Type do you have?
image

@wm20320
Copy link

wm20320 commented Jul 13, 2024

Browser with vis-2.0

@GermanBluefox
Copy link
Contributor

/opt/iobroker/iobroker-data/files/sayit.0/tts.userfiles/Gong.mp3

It is not suggested to access state files from disk: /opt/iobroker/iobroker-data/files/sayit.0/tts.userfiles/Gong.mp3

But as far as I know the file name should be gong.mp3 and not Gong.mp3.

I added the possibility to play files directly from states: sayit.0/tts.userfiles/gong.mp3 in 4.1.0

@wm20320
Copy link

wm20320 commented Jul 16, 2024

Now it works! I set the path to play directly from the state. Thank you for your support and your great job!

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

No branches or pull requests

3 participants