AudioToTextSubtitlesProvider: max file size value of 25 MB hardcoded

オープン 初心者向け
#477 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
backend

調査の方向性

Issue では AudioToTextSubtitlesProvider のサイズチェックが示されていますが、ファイルパスは記載されていません。このプロバイダーを見つけ、まずチェック処理と近くにあるテストを読んでください。クライアント側のサイズ処理を更新して、より大きな入力を送信できるようにし、その後、字幕生成が機能するか、API エラーが明確に報告されるかを確認してください。

索引モデルが issue の本文から書いたものです。

説明

bug
Which version of integration_openai are you using?

5.0.0

Which version of Nextcloud are you using?

35.0.3

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

not relevant

Describe the Bug

When submitting an MP3 file for Subtitle generation that is larger than 25 MB the sytem logs the following:

A TaskProcessing core:audio2text:subtitles task with id failed with the following message: Filesize of input is too large. Max is 25MB"

Of course there may be a limit in OpenAI but as this app is targeting all compatible APIs, I think this control shoudn't be there on the client side. In my opinion it is up to the server to let the client know that the file is oversized.

                $fileSize = intval($input['input']->getSize());
                // Maximum file size for OpenAI is 25MB. (https://developers.openai.com/api/docs/guides/speech-to-text)
                if ($fileSize > 25 * 1000 * 1000) {
                        throw new UserFacingProcessingException(
                                'Filesize of input is too large. Max is 25MB',
                                0,  
                                null,
                                $this->l->t('The input file size is too large. A maximum of 25MB is allowed.'),
                        );  
                } 
Expected Behavior

The file is subtitled or the server responds with a proper error message.

To Reproduce

Try to generate subtitles on a file larger than 25MB.

主要言語
PHP
スター
78
フォーク
42
平均マージ
2日 21時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextcloud/integration_openai のほかの issue

nextcloud/integration_openai の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。