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

Unable to detect speech. Perhaps try specifying a different stream #113

Closed
andonevris opened this issue Jan 18, 2021 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@andonevris
Copy link

andonevris commented Jan 18, 2021

Environment (please complete the following information):

  • OS: Windows 10 20H2 x86
  • python version 3.8.7 (also tested with python 2.7)
  • ffsubsync bundled with Bazarr Version: 0.9.0.7
  • Media files hosted on NAS via SMB

Describe the bug
Running sync from within bazarr on a win32 machine any attempt to sync a file exits with an error:

Traceback (most recent call last):
File "c:\program files\bazarr\bazarr\subsyncer.py", line 56, in sync
result = run(self.args)
File "c:\program files\bazarr\bazarr\../libs\ffsubsync\ffsubsync.py", line 283, in run
reference_pipe.fit(args.reference)
File "c:\program files\bazarr\bazarr\../libs\ffsubsync\sklearn_shim.py", line 214, in fit
self._final_estimator.fit(Xt, y, **fit_params)
File "c:\program files\bazarr\bazarr\../libs\ffsubsync\speech_transformers.py", line 250, in fit
raise ValueError(

ValueError: Unable to detect speech. Perhaps try specifying a different stream / track, or a different vad.

To Reproduce
Sync on any file causes above error. Have tried with AC3 DTS AAC

Expected behavior
Sync file without error

@andonevris andonevris added the bug Something isn't working label Jan 18, 2021
@smacke
Copy link
Owner

smacke commented Jan 18, 2021

Hi @andonevris, thanks for filing an issue. At first glance this seems more likely to be some issue with how Bazarr embeds ffsubsync (e.g., maybe it doesn't set PATH properly on Windows and ffsubsync can't find ffmpeg as a result).

I would recommend first trying to make sure that you can run ffmpeg from the command line (in order to verify it's on your path). If not, that's likely the issue, and you can fix by setting PATH (see e.g. here). Otherwise I'd recommend filing an issue with Bazarr if you haven't already.

Please let me know how these suggestions work for you!

@andonevris
Copy link
Author

ffmpeg is on the path and working correctly via CMD.

I'll see if the bazarr guys can shed any light.

Thanks

@smacke
Copy link
Owner

smacke commented Jan 18, 2021

@andonevris sorry I forgot to mention before: I would also recommend trying to install ffsubsync and running it manually, to further help narrow down where the issue is coming from.

pip install ffsubsync
ffs movie.mkv -i unsynced.srt -o synced.srt

If it's still broken, then we know it's an issue with ffs. If not, it could still be an issue with an older version of ffs, and we can ask @morpheus65535 to try embedding the latest version in Bazarr and seeing if that helps.

@morpheus65535
Copy link
Contributor

Looking into this. Waiting for debug log from @andonevris. I doubt that's anything else than something related to user environment. I've just tried and was able to sync dozen of subtitles with different audio codecs.

@andonevris
Copy link
Author

Your hunch about ffmpeg was right. I had an old ffmpeg.exe referenced on my PATH with higher priority than the latest one.

Deleted the old path and all working now. Thanks for the nudge in the right direction.

@smacke
Copy link
Owner

smacke commented Jan 19, 2021

Glad things worked out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants