-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: WhisperTranscriber
for v2
#4723
Conversation
logger = logging.getLogger(__name__) | ||
|
||
|
||
OPENAI_TIMEOUT = float(os.environ.get("HAYSTACK_OPENAI_TIMEOUT_SEC", 30)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never used.
transcriptions.append(transcription) | ||
return transcriptions | ||
|
||
@retry(retry=retry_if_not_result(bool), wait=wait_exponential(min=1, max=10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use the request_with_retry
util method in here.
|
||
|
||
@component | ||
class WhisperTranscriber: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of splitting this into two different components? One local only and one remote, something like WhisperLocalTranscriber
and WhisperOpenAITranscriber
. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would simplify the logic quite a bit, also the testing.
If we go this way I think it would be better to open two separate PRs and ditch this one.
Related Issues
WhisperTranscriber
to v2 pipelines #4837Proposed Changes:
WhisperTranscriber
for Pipelines v2How did you test it?
Notes for the reviewer
n/a