FEAT: Add IPA transcription converter#2264
Merged
romanlutz merged 1 commit intoJul 24, 2026
Merged
Conversation
Add an LLM-backed converter that transcribes auto-detected source languages into broad IPA, with optional dialect guidance and injection-resistant prompt framing. Include exports, tests, and executed converter documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5298c46-792b-48d5-a119-c2c67af3ef47
jsong468
reviewed
Jul 23, 2026
jsong468
approved these changes
Jul 23, 2026
jsong468
left a comment
Contributor
There was a problem hiding this comment.
LGTM but wonder if you considered using a library like phonemizer instead of LLM?
Contributor
Author
I very much considered packages but concluded that they either
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PyRIT does not currently provide a way to transform prompts into pronunciation-based IPA text, which can be useful for testing obfuscated and multilingual inputs. This adds an LLM-backed
IPAConverterthat transcribes auto-detected source-language spans into broad International Phonetic Alphabet output without adding a pronunciation lexicon dependency.The converter uses dedicated system and user templates to preserve the source meaning and structure, resolve pronunciations from context, transcribe names and technical identifiers, and treat embedded instructions as inert source text. It supports code-switched input and optional dialect guidance, and includes all behavior-changing prompt and dialect configuration in its identifier. IPA quality remains model-dependent, particularly for short or ambiguous input.
Tests and Documentation
Added focused unit coverage for target and dialect validation, automatic language detection guidance, prompt framing, response normalization, and identifier behavior. Updated the converter exports and modality reference, then executed the text-to-text converter notebook with JupyText so the committed notebook contains the real IPA example output.
The repository pre-commit suite passes, including Ruff, notebook linting, documentation validation, and type checking.