AudioFrequencyConverter silently turns floating-point WAV input into silence
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- numpy, python
調査の方向性
pyrit/converter/audio_frequency_converter.py の wavfile.write の直前にある cast から始め、提供された float32 WAV の例を使って convert_async 経由で問題を再現します。zero-shift 変換によってすべてゼロの出力が生成されなくなったこと、および浮動小数点波形が保持されるか、PCM に正しくスケーリングされることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
AudioFrequencyConverter reads floating-point WAV data successfully, but casts the shifted samples directly to int16 without scaling. A valid floating-point signal whose samples have magnitude below 1 is therefore written as all-zero audio. Conversion returns successfully, so the caller receives a silent artifact rather than an error. Even shift_value=0 loses the signal.
The cast is in pyrit/converter/audio_frequency_converter.py, immediately before wavfile.write. Existing success tests exercise int16 data. This differs from #2356, which fixed stereo broadcasting.
Steps/Code to Reproduce
Run from an environment with PyRIT installed:
import asyncio
import tempfile
from pathlib import Path
import numpy as np
from scipy.io import wavfile
from pyrit.converter import AudioFrequencyConverter
from pyrit.memory import CentralMemory, SQLiteMemory
async def main_async():
with tempfile.TemporaryDirectory() as directory:
memory = SQLiteMemory(db_path=':memory:')
memory.results_path = directory
CentralMemory.set_memory_instance(memory)
try:
source = Path(directory) / 'float.wav'
samples = np.array([0.0, 0.5, -0.5, 0.25], dtype=np.float32)
wavfile.write(source, 8000, samples)
result = await AudioFrequencyConverter(shift_value=0).convert_async(prompt=str(source))
rate, output = wavfile.read(result.output_text)
print('frequency:', output.dtype, output.tolist())
finally:
memory.dispose_engine()
asyncio.run(main_async())
Expected Results
A zero frequency shift preserves the input waveform and amplitude. Floating-point samples should either retain their representation or be correctly scaled if converted to PCM; silently truncating them is incorrect.
Actual Results
frequency: int16 [0, 0, 0, 0]
The input is float32 [0.0, 0.5, -0.5, 0.25].
Versions
Linux, Python 3.12.3, PyRIT 1.2.0.dev0 at 8934a3c4, NumPy 2.5.3, SciPy 1.18.1. Reproduced locally through the public convert_async methods with real WAV files; no model or external service is used.
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 924
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 253
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG PuzzledConverter cannot select words carrying non-ASCII letters, so the mask falls on articles instead対応中かも @adimalkar が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
microsoft/PyRIT#3022 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
BUG: PlagiarismScorer accepts invalid n-gram size and blank reference text対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
PackageHallucinationScorer (Python) misses `from pkg.sub import x` and indented imports対応中かも @barry166 が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/PyRIT#2948 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
BUG Configuration keeps runtime-status errors after polling recovers対応中かも @rupayon123 が 14 日前に担当しました。 オープンBug: triage GUI help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
microsoft/PyRIT#2868 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
BUG PlagiarismScorer tokenizer strips combining marks and skips normalization, so a verbatim copy can score 0.0 and different words can score 1.0対応中かも @inchang-ing が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
Performance: deprecated DeviceEntry.config_entries access blocks the event loop for tens of secondsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
tuya/tuya_cloud_ha_bridge#14 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
semantica-agi/semantica#1968 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
agent: ready area: submission priority: high type: docs
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dkritarth/scopewatch#213 ·
メンテナーはふだん 1 日以内に返信
-
Broken link in RELEASE.md対応中かも @Jah-yee が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
sphinx-contrib/httpdomain#143 ·
メンテナーはふだん 1 日以内に返信