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

fix: update sample rate #277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexanderSutul
Copy link
Contributor

Fix for this issue:
400 sample_rate_hertz (48000) in RecognitionConfig must either be omitted or match the value in the WAV header (44100).

@C-Pro
Copy link
Collaborator

C-Pro commented Apr 16, 2023

Can you also force output sample rate (resample) in ffmpeg for both video and audio?

@C-Pro
Copy link
Collaborator

C-Pro commented Apr 16, 2023

Most likely the flag is -ar 44100

Copy link
Collaborator

@egregors egregors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the conceptual problem here, a bit bigger than it seems like. When I proposed to think about degradation, I mean the followings:

  1. Let's say we have an abstract functionality: nastya-mode
  2. This functionality is a composition of smallest functions: find in the chat right messages, remove messages, ban bastard, translate audio to text, post recognized text.
  3. And we here the pretty explicit priority: catch msg -> delete -> ban -> audio-to-text
  4. A degradation of some functionality composition is saving main functions even if other parts are not working properly. In other words, when some part of the composition isn't available, we are degrading the whole functionality by excluding \ skipping broken parts. But the main func still must be done. This is the general idea.

I believe it will be good, if we make a little refactoring to support this mechanic.

So, in our particular example, nastya-mode must in any cases perform catch -> remove -> ban parts, and if it possibly – trying to convert audio to text.

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

Successfully merging this pull request may close these issues.

3 participants