AudioVolumeConverter and AudioEchoConverter corrupt unsigned 8-bit PCM silence
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- numpy, python
調査の方向性
Start with the AudioVolumeConverter and AudioEchoConverter implementations and their public convert_async entry points. Reproduce the issue with the provided unsigned.wav setup, then compare the unsigned 8-bit handling with the existing signed PCM behavior. Done means both converters return eight uint8 silence samples with value 128 while preserving signed PCM behavior.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
AudioVolumeConverter and AudioEchoConverter perform amplitude arithmetic directly on unsigned 8-bit PCM values. In this format silence is encoded as 128, not 0. Scaling or summing the uncentered values introduces a DC offset, and echo creates a discontinuity at the delay boundary even for a completely silent input.
Both converters accept the WAV and return successfully. This is distinct from the non-finite parameter validation fixes in #2613 and #2566: all parameters and input samples here are valid and finite.
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 AudioEchoConverter, AudioVolumeConverter
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) / 'unsigned.wav'
samples = np.full(8, 128, dtype=np.uint8)
wavfile.write(source, 8000, samples)
for converter in (AudioVolumeConverter(volume_factor=0.5), AudioEchoConverter(delay=0.0005, decay=0.5)):
result = await converter.convert_async(prompt=str(source))
rate, output = wavfile.read(result.output_text)
print(type(converter).__name__ + ':', output.dtype, output.tolist())
finally:
memory.dispose_engine()
asyncio.run(main_async())
Expected Results
All eight output samples remain uint8 value 128 (silence), for both volume scaling and echo. Amplitude processing must center unsigned PCM around its midpoint before applying the effect, then restore the midpoint and clip to the original range.
Actual Results
AudioVolumeConverter: uint8 [64, 64, 64, 64, 64, 64, 64, 64]
AudioEchoConverter: uint8 [128, 128, 128, 128, 192, 192, 192, 192]
The input is eight uint8 samples all equal to 128. Volume factor is 0.5; echo delay is four samples and decay is 0.5. Signed PCM should retain its existing behavior.
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
- フォーク
- 944
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 278
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
BUG PuzzledConverter cannot select words carrying non-ASCII letters, so the mask falls on articles instead対応中かも @adimalkar が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
microsoft/PyRIT#3022 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
BUG Configuration keeps runtime-status errors after polling recovers対応中かも @rupayon123 が 15 日前に担当しました。 オープンBug: triage GUI help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
microsoft/PyRIT#2868 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
EclipseFdn/open-vsx.org#14043 ·
メンテナーはふだん 1 日以内に返信
-
netbox status: needs triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
netbox-community/netbox#23376 ·
メンテナーはふだん 1 日以内に返信
-
feedback simulation workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
githubnext/gh-aw-workshop#4455 ·
メンテナーはふだん 1 日以内に返信
-
Triage 🩺
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Container scenario crashes without expected_recovery_time, kube DNS example uses retry_waitオープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
krkn-chaos/krkn#1627 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信