nextcloud / nextcloud/assistant

Polish AudioToAudioTranslateProvider which throws if no STT provider is available

Open
#624 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement priority medium
Dominant language
JavaScript
Stars
88
Forks
43
Avg merge
18h 49m
Merged PRs (30d)
3

Description

Right now the AudioToAudioTranslateProvider class is registered as a taskprocessing provider no matter what.
Inside this class, we throw in

  • getOptionalInputShape
  • getOptionalInputShapeEnumValues
  • getOptionalInputShapeDefaults

if no STT (core:text2speech) provider is found (because audio translation depends on STT).

This produces a lot of level 3 logs.

We could improve this by either:

  • Finding a way to only register AudioToAudioTranslateProvider if STT (and the other task types we depend on) are found. Not sure it's possible to check this in the Application::register context.
  • Find a way to silently fail, meaning the taskprocessing manager would not produce some logs in this case.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with AudioToAudioTranslateProvider, its getOptionalInputShape methods, and the Application::register context. Trace how taskprocessing providers are registered and how missing STT providers produce level 3 logs. Done means audio translation no longer throws or generates those logs when the required STT provider is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.