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

TTS & Audio cut after 2 second #4

Open
pdor90 opened this issue Oct 8, 2020 · 13 comments
Open

TTS & Audio cut after 2 second #4

pdor90 opened this issue Oct 8, 2020 · 13 comments

Comments

@pdor90
Copy link

pdor90 commented Oct 8, 2020

good evening everyone. I have been using vlc for a few days on my raspi 4 (1GB) with 64bit hassio booted from ssd, and I switched from mopidy to vlc since on the 64bit version it does not work, I set everything without problems, I use the 3.5 audio jack as regards the exit.
here is the problem, at the time of playing the files, both TTS and WAV or MP3 after two seconds the audio mutes and playback is not completed, it is a known problem or a problem with my configuration, after 3/4 seconds the problem disappears, tested with a song

thank you so much

@lufton
Copy link

lufton commented Oct 18, 2020

I have similar issue.
HassOs x64 over RPi 4. If I send TTS audio through VLC telnet integration it plays couple seconds, then lags, then sometimes in a few seconds finishes the announcing the message.
However if I play mp3 song from local share folder it plays fine with no problem.

@Maco65
Copy link

Maco65 commented Nov 6, 2020

I have the same problem. It seems like VLC players get some lagging or delaying/stopping playing file.
I am using RPi 4B with HassOS 4.15 with Home Assistant 0.117.4
I am playing simple (350kB) local files from \share folder. After restart of the add-on it plays fine for 1-2 times and then (playing the same mp3 file) it starts to be problematic.
I did several RESTARTs and REBULIDs - no change :(
Here is the log just after starting the Add-on:

[00a70c10] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[00a70c10] main interface error: no suitable interface module
[b6f05f80] main libvlc error: interface "dbus,none" initialization failed
[00a7ab00] main interface error: no suitable interface module
[b6f05f80] main libvlc error: interface "globalhotkeys,none" initialization failed
[00a54d70] main playlist: playlist is empty
[00a70d40] [telnet] lua interface: Listening on host "telnet://:4212".
00a6c250] [http] lua interface: Lua HTTP interface

and the log after playing the mp3 files: [00a56930] alsa audio output error: cannot estimate delay: I/O error

EDIT: Actually the problem exists even during "first time" playback after restart of HA. It seems to be random with 8-9 bad plays and 1-2 correct (no distortion and full play of entire sound).
Any help will be appreciated.

@Maco65
Copy link

Maco65 commented Nov 6, 2020

Also noticed the following in the Logs:

Logger: homeassistant.helpers.entity
Source: components/vlc_telnet/media_player.py:113
First occurred: 11:30:15 (2 occurrences)
Last logged: 11:30:25
Update for media_player.lvlc fails

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/vlc_telnet/media_player.py", line 113, in update
    status = self._vlc.status()
  File "/usr/local/lib/python3.8/site-packages/python_telnet_vlc/vlctelnet.py", line 150, in status
    status_output = self.run_command('status')
  File "/usr/local/lib/python3.8/site-packages/python_telnet_vlc/vlctelnet.py", line 59, in run_command
    command_output = self.tn.read_until(b'> ').decode('ascii').split('\r\n')[:-1]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 44: ordinal not in range(128)

@tebeso
Copy link

tebeso commented Jan 6, 2021

same problem.

@gitmichieletto
Copy link

gitmichieletto commented Jan 31, 2021

similar situation here
using Rpi3, Hassio OS 5.10 with TTS
mp3 file in cache are perfect if played from the config/tts directory
playback TRUNCATES first 2 seconds, and adds a short blank at about 3rd second, then goes smooth - all playbacks have same behaviour (music or tts)
I think the root cause is the same of ok first 2 seconds, then stop

@md-ray
Copy link

md-ray commented Feb 21, 2021

Same problem here

I got alsa audio error as well

[00000055994e9e80] [http] lua interface: Lua HTTP interface [00000055994c5d80] alsa audio output error: cannot estimate delay: I/O error [00000055994c5d80] alsa audio output error: cannot estimate delay: I/O error [00000055994c5d80] alsa audio output error: cannot estimate delay: I/O error

When I to search, I found some info in here https://www.linuxquestions.org/questions/slackware-14/vlc-staticy-sound-new-install-of-current-4175553082/
I don't know whether it's related or not

@nimroddolev
Copy link

I have the same issue as well on my RPi4 setup. I have tried multiple speakers connected to the headphone jack and the issue persists.

@Maco65
Copy link

Maco65 commented Dec 7, 2021

I have moved from "local VLC" to VLC (it look like more "official" one) and when I tested it now it runs fine on mp3 files (no lagging) but I think I have noticed this issue even after move to current VLC. There is nothing suspicious in the logs now.

@fincz
Copy link

fincz commented Dec 26, 2021

Hello, I have exactly the same issue with vlc-telnet integration, sometimes it plays the tts or np3 in www folder just Fine but mosty the sound is interupted. Any solution yet? Maybe another integration working good with the host's 3.5mm jack? Or did any1 solved tis issue? Thank you!

@gitmichieletto
Copy link

I have solved the problem using the Modipy addon from Poeschl user - never failed once in 1 year of use

@fincz
Copy link

fincz commented Dec 27, 2021 via email

@gitmichieletto
Copy link

i configured this (192.168.1.xxx IP of raspi running hassio):

media_player:

  • platform: mpd
    name: audio_raspi4
    host: 192.168.1.xxx

I mainly use it to play google TTS or local mp3 files

@Poci
Copy link

Poci commented Apr 16, 2023

Same problem here. Raspberry pi 4, latest versions of everything and tts sound is choppy. Speakers connected by 3.5 mm jack.

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

9 participants