Public report of coqui-ai/TTS, published 25 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 25 October 2026, 03:47 UTC · Survey ID cd_945d2baa61824898a2ec4f18fadcd604

coqui-ai/TTS

Measured 25 October 2026, 03:40 UTC, at code version dbf1a08

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 37out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 8 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A medium codebase: 57,056 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Security and Compliance, 28

Findings by how serious they are

88 critical 472 serious 293 minor

13 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
25 October 2026, 03:40 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

62of 66 dimensions measured by tools. The other 4 are advisory notes from an AI model, which explain the code but don't count towards the score.
827of 853 findings point to an exact file and line, so you can open each one in the code. The other 26 concern the repository as a whole, such as missing documentation.
66dimensions across 6 lenses, read from 57,056 lines of product code in 4 projects.
Chapters

Executive summary

coqui-ai/TTS scores 37 out of 100 and is rated Weak, while four of its six lenses score higher still: Architecture at 92, rated Exemplary, Code Health at 66 and Maturity at 57, both rated Adequate, and Accessibility at 44, rated Weak. The project hasn't declared a stable release yet, so its lenses are rated against a lower bar than a released product's, while the score itself is worked out as for any repository.

The score is lower than those four because the weakest lens counts most, and here that is Security and Compliance, which scores 28 and is rated Weak. Its Supply-chain Provenance & Signing dimension scores 0 out of 10, and until that reaches 4, Security and Compliance can't be rated higher than Adequate. The first actions are to protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do and to resolve the 2 Banned license finding(s) in License Compliance, and if Security and Compliance rose to 70, the score would rise from 37 to about 46.

88 findings are critical: 75 in Static Analysis (SAST), four in Forms & labels, four in IaC & Container Security, two in License Compliance, two in Secrets (history) and one in Text alternatives.

Watchdog couldn't measure 12 dimensions in this code, among them Code Coverage, Navigability and Data Protection, so they are left out of the score. The product code is 57,056 lines, which would take an estimated 0.4 person-years, around €55,000, to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Security and Compliance 28 · counts for 46%Production Readiness 35 · counts for 25%Accessibility 44 · counts for 14%Maturity 57 · counts for 8%Code Health 66 · counts for 4%Architecture 92 · counts for 2%

If Security and Compliance rose from 28 to 70, the lowest score rated Strong, the score would rise from 37 to about 46.

Code composition: what the lines of code are
Product code 88%Tests 12%
New since the last survey: 19 findings

These 19 critical or serious findings weren't in the previous survey, on 11 October 2026.

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 1 finding

This critical or serious finding was in the previous survey, on 11 October 2026, and is gone from this one.

  • Supply-chain Provenance & Signing REDACTED
Rebuild cost: about €55,000 · Estimate
Cost to rebuild€18,000 to €92,000, for 304 to 964 hours of work, about 0.4 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 37. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 57,056 lines of product code

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 9 points · Medium effort · Access Controls
2
Resolve the 2 Banned license finding(s) in License Compliance.
Raises the score by about 4 points · Low effort · License Compliance
3
Resolve the 14 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED.
Raises the score by about 4 points · Medium effort · Supply-chain Provenance & Signing

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €55,000 to build again, about 0.4 person-years of work. Its weakest lens is Security and Compliance, at 28 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do. Of all the actions in this report, it raises the score most for the work it takes: about 9 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.3 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 3,795 lines over the last 90 days, which is about 15,391 lines a year. At that pace, the extra work comes to an estimated 0.8 to 5.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

242 modules, with 114 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 202 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 config.shared_configs2 encoder.models.base_encoder3 model4 tts.layers.bark.model5 tts.utils.languages6 tts.utils.speakers7 tts.utils.text.phonemizers.base8 utils.audio.processor9 encoder.configs.base_encoder_config10 tts.configs.shared_configs11 tts.datasets.dataset12 tts.layers.bark.model_fine13 vocoder.configs.shared_configs14 vocoder.models.base_vocoder15 tts.configs.glow_tts_config16 tts.configs.tacotron_config17 tts.models.base_tts18 vc.models.base_vc19 tts.models.align_tts20 tts.models.bark21 tts.models.base_tacotron22 tts.models.delightful_tts23 tts.models.forward_tts24 tts.models.glow_tts25 tts.models.neuralhmm_tts26 tts.models.tortoise27 tts.models.vits28 tts.models.xtts29 vc.models.freevc30 tts.configs.align_tts_config31 tts.configs.bark_config32 tts.configs.delightful_tts_config33 tts.configs.fast_pitch_config34 tts.configs.fast_speech_config35 tts.configs.fastspeech2_config36 tts.configs.speedy_speech_config37 tts.configs.tortoise_config38 tts.configs.vits_config39 tts.configs.xtts_config40 tts.layers.xtts.trainer.gpt_trainer
1 config.shared_configs
2 encoder.models.base_encoder
3 model
4 tts.layers.bark.model
5 tts.utils.languages
6 tts.utils.speakers
7 tts.utils.text.phonemizers.base
8 utils.audio.processor
9 encoder.configs.base_encoder_config2
10 tts.configs.shared_configs2
11 tts.datasets.dataset1
12 tts.layers.bark.model_fine2
13 vocoder.configs.shared_configs2
14 vocoder.models.base_vocoder1
15 tts.configs.glow_tts_config1
16 tts.configs.tacotron_config3
17 tts.models.base_tts1111
18 vc.models.base_vc1111
19 tts.models.align_tts11
20 tts.models.bark1
21 tts.models.base_tacotron11
22 tts.models.delightful_tts131
23 tts.models.forward_tts11
24 tts.models.glow_tts111
25 tts.models.neuralhmm_tts11
26 tts.models.tortoise1
27 tts.models.vits1121
28 tts.models.xtts1
29 vc.models.freevc11
30 tts.configs.align_tts_config11
31 tts.configs.bark_config1111
32 tts.configs.delightful_tts_config13
33 tts.configs.fast_pitch_config11
34 tts.configs.fast_speech_config11
35 tts.configs.fastspeech2_config11
36 tts.configs.speedy_speech_config11
37 tts.configs.tortoise_config12
38 tts.configs.vits_config12
39 tts.configs.xtts_config12
40 tts.layers.xtts.trainer.gpt_trainer1121
Uses a module listed above itPart of a loopThe module itself
1 config.shared_configs2 encoder.models.base_encoder3 model4 tts.layers.bark.model5 tts.utils.languages6 tts.utils.speakers7 tts.utils.text.phonemizers.base8 utils.audio.processor9 encoder.configs.base_encoder_config10 tts.configs.shared_configs11 tts.datasets.dataset12 tts.layers.bark.model_fine13 vocoder.configs.shared_configs14 vocoder.models.base_vocoder15 tts.configs.glow_tts_config16 tts.configs.tacotron_config17 tts.models.base_tts18 vc.models.base_vc19 tts.models.align_tts20 tts.models.bark21 tts.models.base_tacotron22 tts.models.delightful_tts23 tts.models.forward_tts24 tts.models.glow_tts25 tts.models.neuralhmm_tts26 tts.models.tortoise27 tts.models.vits28 tts.models.xtts29 vc.models.freevc30 tts.configs.align_tts_config31 tts.configs.bark_config32 tts.configs.delightful_tts_config33 tts.configs.fast_pitch_config34 tts.configs.fast_speech_config35 tts.configs.fastspeech2_config36 tts.configs.speedy_speech_config37 tts.configs.tortoise_config38 tts.configs.vits_config39 tts.configs.xtts_config40 tts.layers.xtts.trainer.gpt_trainerconfig.shared_configs1encoder.models.base_encoder2model3tts.layers.bark.model4tts.utils.languages5tts.utils.speakers6tts.utils.text.phonemizers.base7utils.audio.processor8encoder.configs.base_encoder_config9tts.configs.shared_configs10tts.datasets.dataset11tts.layers.bark.model_fine12vocoder.configs.shared_configs13vocoder.models.base_vocoder14tts.configs.glow_tts_config15tts.configs.tacotron_config16tts.models.base_tts17vc.models.base_vc18tts.models.align_tts19tts.models.bark20tts.models.base_tacotron21tts.models.delightful_tts22tts.models.forward_tts23tts.models.glow_tts24tts.models.neuralhmm_tts25tts.models.tortoise26tts.models.vits27tts.models.xtts28vc.models.freevc29tts.configs.align_tts_config30tts.configs.bark_config31tts.configs.delightful_tts_config32tts.configs.fast_pitch_config33tts.configs.fast_speech_config34tts.configs.fastspeech2_config35tts.configs.speedy_speech_config36tts.configs.tortoise_config37tts.configs.vits_config38tts.configs.xtts_config39tts.layers.xtts.trainer.gpt_trainer4022122113111111111111113111111111112111111111113111111111212121121+202 more modules (most-connected shown)

At a glance — Code Health · 66% · Adequate ·

At a glance — Architecture · 92% · Exemplary ·

At a glance — Maturity · 57% · Adequate · gated by D34, M2 ·

At a glance — Readiness · 35% · Weak · gated by D12, P3, P7 ·

At a glance — Security · 28% · Weak · gated by D29, D36, C2 ·

At a glance — Accessibility · 44% · Weak · gated by AC2, AC3 ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection97High / Critical
A03:2025 — Software Supply Chain Failures22Medium
A02:2025 — Security Misconfiguration14High / Critical
A07:2025 — Authentication Failures3High / Critical

Roadmap

First, enforce default-deny access controls by implementing a global authentication guard with explicit public opt-outs and named role permissions. Next, secure the supply chain by restricting workflow token permissions in auxiliary and data test files, while simultaneously resolving banned license issues. Finally, integrate a SAST step into CI to block security regressions and fix unpinned package installations in release and test workflows.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.+8.8 ptsMediumAccess Controls
Resolve the 2 Banned license finding(s) in License Compliance.+3.9 ptsLowLicense Compliance
Resolve the 14 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED.+4.2 ptsMediumSupply-chain Provenance & Signing
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.7 ptsLowADR Quality
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.+3.0 ptsMediumSecurity & performance tooling
Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED.+1.3 ptsLowSecrets (history)
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED.+1.3 ptsLowSecrets (history)
Resolve the 4 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED.dev.+1.3 ptsLowIaC & Container Security

File quality

Per-file score 0–10 — a quality signature. Of 148 files carrying findings, judged against the Preview bar: 10% slop · 24% mixed · 66% near-clean.

FileScoreBandWorst signal
REDACTED0.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.1SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.6SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.5MixedIaC & Container Security: High IaC: REDACTED
REDACTED3.5MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 88

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 472

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 293

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 13

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 62 of 66 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 1.0 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 66 dimensions across the health lenses
D1D2D3D4D6D9D11D12D13D14D15D16D17D19D20D21D22D26D28D29D30D31D34D35D36D43D44AC1AC2AC3AC6AC7AX10AX2AX3AX4C2M1M2M3M4P1P10P2P3P4P6P7X1X12X13X14X15X17X19X21X22X23X24X25X26X27X28X3X30X4

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 827 of 853 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17125-6be8-7c89-95c0-412771637dde.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned REDACTED, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (4): D19, D21, D22, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.2 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.2 / 10 · rule-coverage 100% · ceiling Prevented

25 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was NewGenerationMixin.generate at 80. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being fairseq.rehash_fairseq_vits_checkpoint at 21 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: TTS/tts/utils/fairseq.py (fairseq.rehash_fairseq_vits_checkpoint at 21). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

NewGenerationMixin.generate (cyclomatic 80)TTS/tts/layers/xtts/stream_generator.py:46
Synthesizer.tts (cyclomatic 48)TTS/utils/synthesizer.py:257
MultiheadAttention.forward (cyclomatic 47)TTS/vc/modules/freevc/wavlm/modules.py:424
AttentionLayers.__init__ (cyclomatic 42)TTS/tts/layers/tortoise/xtransformers.py:757
NewGenerationMixin.sample_stream (cyclomatic 39)TTS/tts/layers/xtts/stream_generator.py:644

+ 20 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with NewGenerationMixin.generate (cyclomatic 80). — Refactoring it lifts Cyclomatic Complexity from 6.2 to about 6.5/10.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity4.8 / 10Weak✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 4.8 / 10 · rule-coverage 100% · ceiling Prevented

85 method(s) exceeded the cognitive complexity threshold of 15; the worst was NewGenerationMixin.generate at 122.

NewGenerationMixin.generate (cognitive 122)TTS/tts/layers/xtts/stream_generator.py:46
Synthesizer.tts (cognitive 83)TTS/utils/synthesizer.py:257
MultiheadAttention.forward (cognitive 74)TTS/vc/modules/freevc/wavlm/modules.py:424
NewGenerationMixin.sample_stream (cognitive 68)TTS/tts/layers/xtts/stream_generator.py:644
DPM_Solver.sample (cognitive 61)TTS/tts/layers/tortoise/dpm_solver.py:1238

+ 80 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 5 bodies over 60 down to 60 or less in Cognitive Complexity — start with NewGenerationMixin.generate (cognitive 122), Synthesizer.tts (cognitive 83), MultiheadAttention.forward (cognitive 74). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 5 together lifts Cognitive Complexity from 4.8 to about 5.9/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.9 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Prevented

15 god class(es) detected.

FileTooLong: models/delightful_tts.py · ×12TTS/tts/models/delightful_tts.py
TooManyMethods: Vits · ×3TTS/tts/models/vits.py:603

What to do

  1. Resolve the 12 FileTooLong finding(s) in God Classes — start with delightful_tts.py, vits.py, xtransformers.py. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 3 TooManyMethods finding(s) in God Classes — start with vits.py, delightful_tts.py, manage.py. — One of this dimension's main actionable groups (3 warning-level).
  3. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication8.4 / 10Strong✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Verified

187 duplicated block group(s) detected. A further 13 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 1 of the 200 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (6 lines × 2) · ×15REDACTED:17
Duplicated block (9 lines × 2) · ×14REDACTED:422
Duplicated block (5 lines × 2) · ×14TTS/encoder/models/resnet.py:34
Duplicated block (11 lines × 2) · ×12TTS/encoder/models/base_encoder.py:118
Duplicated block (7 lines × 2) · ×11TTS/tts/layers/bark/inference_funcs.py:252

+ 77 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 15 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), wavenet.py (2), delightful_tts.py (2). — One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 14 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with modules.py (2), REDACTED, aligner.py. — One of this dimension's main actionable groups (14 warning-level).
  3. Resolve the 14 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with resnet.py (3), hifigan_decoder.py (2), conformer.py. — One of this dimension's main actionable groups (14 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.7 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Verified

3 of 143 classes have LCOM4 above 3.

Low cohesion: BaseTacotron (LCOM4 5) · ×3TTS/tts/models/base_tacotron.py:21

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with base_tacotron.py, acoustic_model.py, hifigan_decoder.py. — One of this dimension's main actionable groups (3 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

225 test methods: 225 unit, 0 integration, 0 BDD, 0 e2e. The Python suite contributes 225 test function(s) across 44 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 flaky across 1 measured tier(s). Python (repository root, 80 test files): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene9.8 1.3 / 10Critical✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 1.3 / 10 · rule-coverage 14% · ceiling Verified

5 outdated, 0 yanked pinned Python distributions. 6 of 44 shipped distributions were graded against pypi.org (0 not published there, 38 declared without an exact pin, which installs the newest release the declaration admits and so cannot be behind one). Only EXACT pins are graded for currency: a floor or a range already installs the newest release it admits, so reporting one would report this repository for being current. Whether a deliberate upper cap has itself gone stale is a different and weaker question, and is not asked. Whether any distribution is UNMAINTAINED is not graded — PyPI publishes no maintenance status, and release age does not stand in for one. Lockfiles are not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock), so a lock-resolved install is outside this verdict. Known CVEs in this dependency graph are D30's question.

Outdated: bokeh · ×5

What to do

  1. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Verified

2 of 178 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 44 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (134 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 20 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged.

Banned license: mutagen · ×2

What to do

  1. Resolve the 2 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (2 issue-level).
  2. Enforce License Compliance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: TTS/utils/synthesizer.py (3×48=144)

Hotspot: TTS/utils/synthesizer.pyTTS/utils/synthesizer.py:257

What to do

  1. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with synthesizer.py. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No source file's living knowledge is concentrated in a single author. Counted over 223 of the 325 production source files in this repository: 99 are under the ~2,400-byte size floor this dimension measures over, and the remaining 3 have no attributable history left to measure.

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md.

D17 · Explicit Debt9.8 / 10Stronggated by 73 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Prevented

73 deducted task-comment markers across 57056 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×68TTS/config/__init__.py:38
FixmeComment · ×5tests/tts_tests/test_tacotron_model.py:56

What to do

  1. Resolve the 68 TodoComment finding(s) in Explicit Debt — start with delightful_tts.py (6), tacotron.py (6), vits.py (4). — One of this dimension's main actionable groups (68 warning-level).
  2. Resolve the 5 FixmeComment finding(s) in Explicit Debt — start with test_tacotron_model.py (5). — One of this dimension's main actionable groups (5 warning-level).
  3. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

This repository is well documented: the root README (1537 words) gives a clear overview of what TTS is and its release history plus links to the latest releases, while also listing all the documents in an ordered outline. The architecture/Docs markdown files are comprehensive with detailed model descriptions, training recipes, and configuration documentation for Coqpit. Each document is well-structured with headings; none is clipped by the scanner despite being long. The repository's documentation is comprehensive and well-structured. The READMEs cover installation (pip, source install, Windows), usage (tts CLI, tts-server demo, Python API), training (model selection, configuration, recipes, multi-gpu DDP), finetuning, dataset formatting, and a Mary-TTS compatibility guide. Architecture/Docs markdown files provide detailed design docs for model implementation, the phonemizer pipeline, and the trainer/distribute subsystem. The outline is complete across every document.

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyWeak◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

Maturity: Documented → Verified → Prevented · effective Weak / 10 · rule-coverage 100% · ceiling Verified

4 API inconsistencies across a 400-member sample of 630 exposed types.

Redundant loading methods with overlapping signatures. `load_vc_model_by_name` and `load_tts_model_by_name` are specific variants of `load_model_by_name`. This forces users to guess which method to call based on the model type, rather than using a single unified entry point that handles dispatch internally.
Inconsistent parameter ordering and naming for file output. `tts_to_file` adds `pipe_out` and `file_path` but keeps the same positional argument order as `tts`, which is confusing. Furthermore, `tts` returns audio (implied), while `tts_to_file` writes to disk. The presence of `pipe_out` in `tts_to_file` suggests a hybrid behavior that is not present in the base `tts` method, creating a split in how output is handled.
Same pattern as TTS: redundant `_to_file` variants. `voice_conversion` and `voice_conversion_to_file` duplicate intent. The base method likely returns audio data, while the `_to_file` variant writes it. This pattern is repeated for `tts` and `tts_with_vc`.
Redundant `_to_file` variant for TTS with Voice Conversion. Same inconsistency as above.

What to do

  1. Resolve the 1 Redundant loading methods with overlapping signatures.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Inconsistent parameter ordering and naming for file output.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Same pattern as TTS finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion5.0 / 10Adequate✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 4 build units (Python) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)8.0 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

97 finding(s): 0 critical, 75 high, 13 medium, 9 low. 40 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `recipes/kokoro/tacotron2-DDC/run.sh` (line 23) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 9 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 17 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5), REDACTED, REDACTED. — One of this dimension's main actionable groups (17 issue-level).
  2. Resolve the 13 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (13 issue-level).
  3. No action in Static Analysis (SAST) — all 40 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (40 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities9.4 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 0 high, 3 medium, 0 low.

REDACTED

What to do

  1. Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security7.8 / 10Adequategated by 4 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 7.8 / 10 · rule-coverage 100% · ceiling Documented

14 finding(s): 0 critical, 4 high, 8 medium, 2 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 4 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED.dev. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 8 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (5), REDACTED.dev (3). — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 2 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness0.0 / 10Critical✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

226 of 226 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is TTS/tts/models/vits.py. Counted over 226 of the 325 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×223TTS/tts/layers/xtts/zh_num2words.py:1
Most significant orphaned file · ×3TTS/tts/models/vits.py:1
Dormant codebase

What to do

  1. Resolve the 223 Orphaned file finding(s) in Knowledge Freshness — start with shared_configs.py (4), __init__.py (4), dataset.py (3). — One of this dimension's main actionable groups (223 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with vits.py, dpm_solver.py, delightful_tts.py. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.3 / 10Stronggated by 9 serious findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: train_hifigan.py↔train_multiband_melgan.py 80%; train_fast_pitch.py↔train_speedy_speech.py 80%; train_multiband_melgan.py↔train.py 70%

Change coupling: train_hifigan.py ↔ train_multiband_melgan.py · ×6recipes/ljspeech/hifigan/train_hifigan.py:1
Change-coupling hub: train_speedy_speech.py → train_aligntts.py, train_fast_pitch.py, train_glowtts.py, train_vits.py, train_vits_tts.py, train_vits.py · ×3recipes/ljspeech/speedy_speech/train_speedy_speech.py

What to do

  1. Resolve the 6 Change coupling finding(s) in Change Coupling — start with train_hifigan.py (2), train_multiband_melgan.py, stochastic_duration_predictor.py. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with train_speedy_speech.py, train_glowtts.py, train_vits.py. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 14 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 44 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives4.3 / 10Weak✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — TTS/server/templates/index.html:61

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels3.5 / 10Weak✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×2) — TTS/server/templates/index.html:68, TTS/server/templates/index.html:72
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — TTS/server/templates/index.html:77, TTS/server/templates/index.html:86

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure3.7 / 10Weak✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — TTS/server/templates/details.html:2, TTS/server/templates/index.html:2
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×3) — TTS/server/templates/details.html:45, TTS/server/templates/details.html:70, TTS/server/templates/details.html:100

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 2 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
AX10 · Code composition9.9 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX2 · Stateful singletons10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

C2 · Access Controls0.0 / 10Critical✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • This repository serves requests — a request handler (@app.route() (REDACTED:150) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — REDACTED:150

What to do

  • Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation2.0 / 10Weak✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

  • Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
M4 · Documentation accuracy9.6 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • docs/source/finetuning.md names `train_tts.py`, but no file or folder `train_tts.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/source/finetuning.md:91
  • docs/source/implementing_a_new_model.md names `TTS/tts/layers/new_model.py`, but no file or folder `TTS/tts/layers/new_model.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/source/implementing_a_new_model.md:5
  • docs/source/implementing_a_new_model.md names `TTS/tts/model/new_model.py`, but no file or folder `TTS/tts/model/new_model.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/source/implementing_a_new_model.md:5
  • docs/source/tutorial_for_nervous_beginners.md names `train_vocoder.py`, but no file or folder `train_vocoder.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/source/tutorial_for_nervous_beginners.md:101

What to do

  • Reconcile the README with reality: docs/source/finetuning.md names `train_tts.py`, but no file or folder `train_tts.py` exists; docs/source/implementing_a_new_model.md names `TTS/tts/layers/new_model.py`, but no file or folder `TTS/tts/layers/new_model.py` exists; docs/source/implementing_a_new_model.md names `TTS/tts/model/new_model.py`, but no file or folder `TTS/tts/model/new_model.py` exists; docs/source/tutorial_for_nervous_beginners.md names `train_vocoder.py`, but no file or folder `train_vocoder.py` exists.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

What to do

  • Consider OpenTelemetry tracing/metrics (opentelemetry-sdk) and a health-check endpoint (a /health route) for operability.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 23416 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×4) — REDACTED:50, TTS/utils/manage.py:531, TTS/utils/manage.py:566, …
  • `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — REDACTED:30, REDACTED:39, REDACTED:79

What to do

  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.3 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×2) — TTS/tts/layers/xtts/tokenizer.py:534, TTS/utils/manage.py:406
  • `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — TTS/tts/layers/xtts/trainer/dataset.py:85

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging4.2 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `info` at line 121 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:121
  • `info` at line 123 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:123
  • `info` at line 137 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:137
  • `error` at line 140 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:140
  • `info` at line 95 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:95
  • `warning` at line 115 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:115
  • `info` at line 118 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:118
  • `info` at line 155 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:155
  • `warning` at line 207 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — TTS/tts/layers/bark/inference_funcs.py:207
  • `info` at line 224 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:224

What to do

  • Interpolated log message defeats structured logging

WCAG coverage — what static analysis assessed

Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 42 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health66%AdequateAcceptable, with room to improve.
Architecture92%ExemplaryStrongest area.
Maturity57%Adequate — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness35%Weak — gated by D12, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security28%Weak — gated by D29, D36, C2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility44%Weak — gated by AC2, AC3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 51 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~7417 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Aggregate roots were found in only one source directory (TTS), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.py), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D5 Coupling — Not applicable — this Python build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 2 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 13 value object(s)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: Python runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 88 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 15 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×2
  • <input> without a programmatic label TTS/server/templates/index.html:68 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label TTS/server/templates/index.html:72 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <select> without a programmatic label · ×2
  • <select> without a programmatic label TTS/server/templates/index.html:77 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label TTS/server/templates/index.html:86 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D14 · License Compliance · Banned license · ×2
  • Banned license: mutagen — `mutagen` 1.48.1 is published on PyPI under `GPL-2.0-or-later`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
  • Banned license: unidecode — `unidecode` 1.4.0 is published on PyPI under `GPL-2.0-or-later`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×1
  • <img> without a text alternative TTS/server/templates/index.html:61 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 472 finding(s)
D17 · Explicit Debt · TodoComment · ×68
  • TodoComment TTS/config/__init__.py:38 — # TODO: fix this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:126 — # TODO: set this from SpeakerManager — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/configs/vits_config.py:140 — # TODO: move it to the base config — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/vc/configs/freevc_config.py:256 — # TODO: move it to the base config — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/configs/glow_tts_config.py:171 — # DO NOT CHANGE - TODO: make this immutable once coqpit implements it. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:377 — # ToDo: add the dataset link when the dataset is released publicly — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/datasets/dataset.py:277 — # TODO: find a better fix — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/models/vits.py:277 — # TODO: find a better fix — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/models/delightful_tts.py:416 — # TODO: find a better fix — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/align_tts/mdn.py:26 — # TODO: check this sigmoid — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/bark/inference_funcs.py:390 — # TODO: bit of a hack for time alignment (sounds better) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/delightful_tts/conv_layers.py:143 — # TODO: speed up — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/delightful_tts/acoustic_model.py:462 — # TODO # pylint: disable=unused-argument — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/delightful_tts/acoustic_model.py:463 — # TODO # pylint: disable=unused-argument — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/feed_forward/decoder.py:118 — # TODO: handle multi-speaker — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/feed_forward/decoder.py:226 — # TODO: implement multi-speaker — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/tacotron/tacotron.py:73 — # TODO: Try GLU layer — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/tacotron/tacotron.py:130 — # TODO: try dilational layers instead — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/tacotron/tacotron.py:145 — # TODO: try average pooling OR larger kernel size — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/tacotron/tacotron.py:180 — # TODO: try residual scaling as in Deep Voice 3 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/tacotron/tacotron.py:181 — # TODO: try plain residual layers — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/tacotron/tacotron.py:185 — # TODO: replace GRU with convolution as in Deep Voice 3 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/tacotron/capacitron_layers.py:38 — # TODO: Test a multispeaker model! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/tortoise/diffusion.py:886 — # TODO: support multiple model outputs for this mode. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment TTS/tts/layers/tortoise/autoregressive.py:225 — # TODO: figure out relevance in fixing exported model definition: Embedding(1012, 1024) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 43 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×15
  • Duplicated block (6 lines × 2) REDACTED:17 — REDACTED:17-23 | REDACTED:56-61 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) REDACTED:29 — REDACTED:29-34 | REDACTED:67-72 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) TTS/tts/layers/bark/model.py:93 — TTS/tts/layers/bark/model.py:93-98 | TTS/tts/layers/bark/model_fine.py:51-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TTS/tts/layers/bark/model.py:91` calls `masked_fill` and `TTS/tts/layers/bark/model_fine.py:49` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) TTS/tts/layers/generic/wavenet.py:65 — TTS/tts/layers/generic/wavenet.py:65-70 | TTS/vc/modules/freevc/modules.py:120-125 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) TTS/tts/layers/overflow/common_layers.py:59 — TTS/tts/layers/overflow/common_layers.py:59-64 | TTS/tts/layers/tacotron/tacotron2.py:96-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) TTS/tts/layers/vits/stochastic_duration_predictor.py:55 — TTS/tts/layers/vits/stochastic_duration_predictor.py:55-60 | TTS/vc/modules/freevc/modules.py:93-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) TTS/tts/layers/generic/normalization.py:43 — TTS/tts/layers/generic/normalization.py:43-48 | TTS/vc/modules/freevc/modules.py:16-21 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) TTS/tts/layers/generic/wavenet.py:8 — TTS/tts/layers/generic/wavenet.py:8-13 | TTS/vc/modules/freevc/commons.py:111-116 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) TTS/tts/models/delightful_tts.py:122 — TTS/tts/models/delightful_tts.py:122-127 | TTS/tts/models/vits.py:59-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) TTS/tts/models/delightful_tts.py:453 — TTS/tts/models/delightful_tts.py:453-458 | TTS/tts/models/vits.py:295-300 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) TTS/tts/models/neuralhmm_tts.py:106 — TTS/tts/models/neuralhmm_tts.py:106-111 | TTS/tts/models/overflow.py:119-124 — before extracting anything, compare `TTS/tts/models/neuralhmm_tts.py` and `TTS/tts/models/overflow.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) TTS/vocoder/models/hifigan_generator.py:296 — TTS/vocoder/models/hifigan_generator.py:296-301 | TTS/vocoder/models/melgan_generator.py:90-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) TTS/tts/layers/tacotron/tacotron.py:371 — TTS/tts/layers/tacotron/tacotron.py:371-376 | TTS/tts/layers/tacotron/tacotron2.py:244-249 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) TTS/tts/layers/vits/networks.py:283 — TTS/tts/layers/vits/networks.py:283-288 | TTS/vc/models/freevc.py:81-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) TTS/vocoder/models/wavernn.py:307 — TTS/vocoder/models/wavernn.py:307-312 | TTS/vocoder/models/wavernn.py:362-367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D36 · Supply-chain Provenance & Signing REDACTED · ×14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×14
  • Duplicated block (9 lines × 2) REDACTED:422 — REDACTED:422-430 | REDACTED:449-457 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) TTS/tts/layers/generic/aligner.py:35 — TTS/tts/layers/generic/aligner.py:35-43 | TTS/tts/layers/generic/aligner.py:47-55 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) TTS/tts/layers/tortoise/arch_utils.py:57 — TTS/tts/layers/tortoise/arch_utils.py:57-65 | TTS/tts/layers/xtts/latent_encoder.py:49-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) TTS/tts/layers/tortoise/dpm_solver.py:1524 — TTS/tts/layers/tortoise/dpm_solver.py:1524-1532 | TTS/tts/layers/tortoise/dpm_solver.py:1536-1544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) TTS/tts/layers/xtts/dvae.py:40 — TTS/tts/layers/xtts/dvae.py:40-48 | TTS/tts/models/xtts.py:58-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/xtts/dvae.py:40` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) TTS/tts/models/vits.py:1010 — TTS/tts/models/vits.py:1010-1018 | TTS/tts/models/vits.py:1116-1124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) TTS/tts/utils/languages.py:103 — TTS/tts/utils/languages.py:103-111 | TTS/tts/utils/speakers.py:120-128 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) TTS/vc/models/freevc.py:190 — TTS/vc/models/freevc.py:190-198 | TTS/vc/models/freevc.py:220-228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) TTS/vc/modules/freevc/wavlm/modules.py:589 — TTS/vc/modules/freevc/wavlm/modules.py:589-597 | TTS/vc/modules/freevc/wavlm/modules.py:599-607 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) TTS/vc/modules/freevc/wavlm/modules.py:728 — TTS/vc/modules/freevc/wavlm/modules.py:728-736 | TTS/vc/modules/freevc/wavlm/modules.py:737-745 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/vc/modules/freevc/wavlm/modules.py:728` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) TTS/tts/layers/losses.py:652 — TTS/tts/layers/losses.py:652-660 | TTS/tts/models/delightful_tts.py:1627-1635 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) TTS/tts/layers/tacotron/tacotron.py:340 — TTS/tts/layers/tacotron/tacotron.py:340-348 | TTS/tts/layers/tacotron/tacotron2.py:233-241 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/tacotron/tacotron.py:340` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) TTS/tts/layers/tortoise/autoregressive.py:152 — TTS/tts/layers/tortoise/autoregressive.py:152-160 | TTS/tts/layers/xtts/gpt_inference.py:128-136 — before extracting anything, compare `TTS/tts/layers/tortoise/autoregressive.py` and `TTS/tts/layers/xtts/gpt_inference.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) TTS/tts/models/tortoise.py:28 — TTS/tts/models/tortoise.py:28-36 | TTS/tts/models/xtts.py:92-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×14
  • Duplicated block (5 lines × 2) TTS/encoder/models/resnet.py:34 — TTS/encoder/models/resnet.py:34-38 | TTS/tts/layers/xtts/hifigan_decoder.py:364-368 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) TTS/encoder/models/resnet.py:93 — TTS/encoder/models/resnet.py:93-97 | TTS/tts/layers/xtts/hifigan_decoder.py:453-457 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) TTS/encoder/models/resnet.py:124 — TTS/encoder/models/resnet.py:124-128 | TTS/tts/layers/xtts/hifigan_decoder.py:495-499 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) TTS/tts/layers/delightful_tts/conformer.py:436 — TTS/tts/layers/delightful_tts/conformer.py:436-440 | TTS/tts/layers/tacotron/gst_layers.py:131-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) TTS/tts/layers/tortoise/dpm_solver.py:844 — TTS/tts/layers/tortoise/dpm_solver.py:844-848 | TTS/tts/layers/tortoise/dpm_solver.py:880-884 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/tortoise/dpm_solver.py:844` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) TTS/tts/layers/tortoise/tokenizer.py:33 — TTS/tts/layers/tortoise/tokenizer.py:33-37 | TTS/tts/layers/xtts/tokenizer.py:658-662 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) TTS/tts/layers/xtts/hifigan_decoder.py:391 — TTS/tts/layers/xtts/hifigan_decoder.py:391-395 | TTS/utils/generic_utils.py:151-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) TTS/tts/models/delightful_tts.py:503 — TTS/tts/models/delightful_tts.py:503-507 | TTS/tts/models/vits.py:339-343 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TTS/tts/models/delightful_tts.py:511` calls `FloatTensor` and `TTS/tts/models/vits.py:345` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) TTS/tts/models/vits.py:149 — TTS/tts/models/vits.py:149-153 | TTS/vc/modules/freevc/mel_processing.py:75-79 — before extracting anything, compare `TTS/tts/models/vits.py` and `TTS/vc/modules/freevc/mel_processing.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) TTS/tts/layers/losses.py:822 — TTS/tts/layers/losses.py:822-826 | TTS/tts/models/delightful_tts.py:1609-1613 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) TTS/tts/layers/xtts/hifigan_decoder.py:172 — TTS/tts/layers/xtts/hifigan_decoder.py:172-176 | TTS/vocoder/models/hifigan_generator.py:151-155 — before extracting anything, compare `TTS/tts/layers/xtts/hifigan_decoder.py` and `TTS/vocoder/models/hifigan_generator.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) TTS/tts/datasets/dataset.py:522 — TTS/tts/datasets/dataset.py:522-526 | TTS/tts/datasets/dataset.py:529-533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) TTS/tts/layers/delightful_tts/encoders.py:13 — TTS/tts/layers/delightful_tts/encoders.py:13-17 | TTS/tts/models/delightful_tts.py:69-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) TTS/vc/modules/freevc/wavlm/modules.py:497 — TTS/vc/modules/freevc/wavlm/modules.py:497-501 | TTS/vc/modules/freevc/wavlm/modules.py:684-688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · FileTooLong · ×12
  • FileTooLong: models/delightful_tts.py TTS/tts/models/delightful_tts.py — FileTooLong — 1215 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 715 over it, 2.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: models/vits.py TTS/tts/models/vits.py — FileTooLong — 1192 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 692 over it, 2.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tortoise/xtransformers.py TTS/tts/layers/tortoise/xtransformers.py — FileTooLong — 918 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 418 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tortoise/dpm_solver.py TTS/tts/layers/tortoise/dpm_solver.py — FileTooLong — 859 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 359 over it, 1.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tortoise/diffusion.py TTS/tts/layers/tortoise/diffusion.py — FileTooLong — 758 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 258 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: xtts/tokenizer.py TTS/tts/layers/xtts/tokenizer.py — FileTooLong — 641 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 141 over it, 1.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: models/tortoise.py TTS/tts/models/tortoise.py — FileTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 84 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: layers/losses.py TTS/tts/layers/losses.py — FileTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 64 over it, 1.13× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: xtts/zh_num2words.py TTS/tts/layers/xtts/zh_num2words.py — FileTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 59 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: wavlm/modules.py TTS/vc/modules/freevc/wavlm/modules.py — FileTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 45 over it, 1.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 35 over it, 1.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: models/xtts.py TTS/tts/models/xtts.py — FileTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 9 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×12
  • Duplicated block (11 lines × 2) TTS/encoder/models/base_encoder.py:118 — TTS/encoder/models/base_encoder.py:118-128 | TTS/tts/layers/xtts/hifigan_decoder.py:579-589 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) TTS/tts/layers/tacotron/capacitron_layers.py:86 — TTS/tts/layers/tacotron/capacitron_layers.py:86-96 | TTS/tts/layers/tacotron/gst_layers.py:34-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) TTS/tts/layers/tortoise/arch_utils.py:206 — TTS/tts/layers/tortoise/arch_utils.py:206-216 | TTS/tts/layers/tortoise/classifier.py:28-38 — before extracting anything, compare `TTS/tts/layers/tortoise/arch_utils.py` and `TTS/tts/layers/tortoise/classifier.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) TTS/tts/layers/tortoise/autoregressive.py:58 — TTS/tts/layers/tortoise/autoregressive.py:58-68 | TTS/tts/layers/xtts/gpt_inference.py:31-41 — before extracting anything, compare `TTS/tts/layers/tortoise/autoregressive.py` and `TTS/tts/layers/xtts/gpt_inference.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) TTS/tts/layers/tortoise/autoregressive.py:443 — TTS/tts/layers/tortoise/autoregressive.py:443-453 | TTS/tts/layers/xtts/gpt.py:307-317 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) TTS/tts/layers/vits/stochastic_duration_predictor.py:31 — TTS/tts/layers/vits/stochastic_duration_predictor.py:31-41 | TTS/vc/modules/freevc/modules.py:75-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) TTS/tts/layers/xtts/hifigan_decoder.py:248 — TTS/tts/layers/xtts/hifigan_decoder.py:248-258 | TTS/vocoder/models/hifigan_generator.py:224-234 — before extracting anything, compare `TTS/tts/layers/xtts/hifigan_decoder.py` and `TTS/vocoder/models/hifigan_generator.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) TTS/tts/models/delightful_tts.py:1144 — TTS/tts/models/delightful_tts.py:1144-1154 | TTS/tts/models/vits.py:1402-1412 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) TTS/tts/models/neuralhmm_tts.py:328 — TTS/tts/models/neuralhmm_tts.py:328-338 | TTS/tts/models/overflow.py:344-354 — before extracting anything, compare `TTS/tts/models/neuralhmm_tts.py` and `TTS/tts/models/overflow.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/neuralhmm_tts.py:328` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) TTS/tts/models/neuralhmm_tts.py:351 — TTS/tts/models/neuralhmm_tts.py:351-361 | TTS/tts/models/overflow.py:367-377 — before extracting anything, compare `TTS/tts/models/neuralhmm_tts.py` and `TTS/tts/models/overflow.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) TTS/tts/utils/text/characters.py:406 — TTS/tts/utils/text/characters.py:406-416 | TTS/tts/utils/text/characters.py:480-490 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/utils/text/characters.py:406` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) TTS/tts/models/delightful_tts.py:1509 — TTS/tts/models/delightful_tts.py:1509-1519 | TTS/vocoder/models/gan.py:287-297 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×11
  • Duplicated block (7 lines × 2) TTS/tts/layers/bark/inference_funcs.py:252 — TTS/tts/layers/bark/inference_funcs.py:252-258 | TTS/tts/layers/bark/inference_funcs.py:446-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) TTS/tts/layers/bark/inference_funcs.py:260 — TTS/tts/layers/bark/inference_funcs.py:260-266 | TTS/tts/layers/bark/inference_funcs.py:454-460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) TTS/tts/layers/losses.py:642 — TTS/tts/layers/losses.py:642-648 | TTS/tts/models/delightful_tts.py:1617-1623 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) TTS/tts/layers/tortoise/autoregressive.py:173 — TTS/tts/layers/tortoise/autoregressive.py:173-179 | TTS/tts/layers/xtts/latent_encoder.py:127-133 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) TTS/tts/layers/xtts/hifigan_decoder.py:399 — TTS/tts/layers/xtts/hifigan_decoder.py:399-405 | TTS/utils/generic_utils.py:159-165 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) TTS/tts/models/delightful_tts.py:1060 — TTS/tts/models/delightful_tts.py:1060-1066 | TTS/tts/models/delightful_tts.py:1070-1076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) TTS/tts/models/forward_tts.py:787 — TTS/tts/models/forward_tts.py:787-793 | TTS/tts/models/forward_tts.py:798-804 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) TTS/tts/models/xtts.py:532 — TTS/tts/models/xtts.py:532-538 | TTS/tts/models/xtts.py:640-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) TTS/tts/utils/visual.py:37 — TTS/tts/utils/visual.py:37-43 | TTS/tts/utils/visual.py:65-71 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) TTS/tts/layers/xtts/hifigan_decoder.py:319 — TTS/tts/layers/xtts/hifigan_decoder.py:319-325 | TTS/vocoder/models/hifigan_generator.py:285-291 — before extracting anything, compare `TTS/tts/layers/xtts/hifigan_decoder.py` and `TTS/vocoder/models/hifigan_generator.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) TTS/tts/layers/bark/model.py:53 — TTS/tts/layers/bark/model.py:53-59 | TTS/tts/layers/bark/model_fine.py:33-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/bark/model.py:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×10
  • Duplicated block (8 lines × 2) TTS/encoder/models/resnet.py:10 — TTS/encoder/models/resnet.py:10-17 | TTS/tts/layers/xtts/hifigan_decoder.py:340-347 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/encoder/models/resnet.py:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) TTS/encoder/models/resnet.py:191 — TTS/encoder/models/resnet.py:191-198 | TTS/tts/layers/xtts/hifigan_decoder.py:562-569 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) TTS/tts/datasets/dataset.py:738 — TTS/tts/datasets/dataset.py:738-745 | TTS/tts/datasets/dataset.py:889-896 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) TTS/tts/layers/bark/inference_funcs.py:190 — TTS/tts/layers/bark/inference_funcs.py:190-197 | TTS/tts/layers/bark/inference_funcs.py:513-520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/bark/inference_funcs.py:190` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) TTS/tts/models/delightful_tts.py:479 — TTS/tts/models/delightful_tts.py:479-486 | TTS/tts/models/vits.py:325-332 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TTS/tts/models/vits.py:321` calls `sort`, `LongTensor`, `size` and `TTS/tts/models/delightful_tts.py:477` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) TTS/tts/models/xtts.py:521 — TTS/tts/models/xtts.py:521-528 | TTS/tts/models/xtts.py:631-638 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) TTS/tts/utils/ssim.py:286 — TTS/tts/utils/ssim.py:286-293 | TTS/tts/utils/ssim.py:338-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) TTS/vocoder/models/hifigan_discriminator.py:67 — TTS/vocoder/models/hifigan_discriminator.py:67-75 | TTS/vocoder/models/hifigan_discriminator.py:152-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) TTS/tts/models/tacotron.py:342 — TTS/tts/models/tacotron.py:342-349 | TTS/tts/models/tacotron2.py:370-377 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) TTS/tts/layers/vits/transforms.py:121 — TTS/tts/layers/vits/transforms.py:121-128 | TTS/tts/layers/vits/transforms.py:132-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×9
  • Duplicated block (13 lines × 2) TTS/encoder/models/resnet.py:133 — TTS/encoder/models/resnet.py:133-145 | TTS/tts/layers/xtts/hifigan_decoder.py:504-516 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) TTS/tts/layers/delightful_tts/encoders.py:159 — TTS/tts/layers/delightful_tts/encoders.py:159-171 | TTS/tts/layers/delightful_tts/encoders.py:211-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) TTS/tts/layers/tortoise/arch_utils.py:222 — TTS/tts/layers/tortoise/arch_utils.py:222-234 | TTS/tts/layers/tortoise/classifier.py:44-56 — before extracting anything, compare `TTS/tts/layers/tortoise/arch_utils.py` and `TTS/tts/layers/tortoise/classifier.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/tortoise/arch_utils.py:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) TTS/tts/models/align_tts.py:370 — TTS/tts/models/align_tts.py:370-382 | TTS/tts/models/glow_tts.py:443-455 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) TTS/tts/models/delightful_tts.py:1486 — TTS/tts/models/delightful_tts.py:1486-1498 | TTS/tts/models/vits.py:1653-1665 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) TTS/tts/models/xtts.py:281 — TTS/tts/models/xtts.py:281-293 | TTS/tts/models/xtts.py:300-312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) TTS/tts/configs/neuralhmm_tts_config.py:158 — TTS/tts/configs/neuralhmm_tts_config.py:158-170 | TTS/tts/configs/overflow_config.py:189-201 — before extracting anything, compare `TTS/tts/configs/neuralhmm_tts_config.py` and `TTS/tts/configs/overflow_config.py` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) TTS/tts/models/base_tts.py:366 — TTS/tts/models/base_tts.py:366-378 | TTS/vc/models/base_vc.py:354-366 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) TTS/tts/models/align_tts.py:436 — TTS/tts/models/align_tts.py:436-448 | TTS/tts/models/forward_tts.py:850-862 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `config` to `"AlignTTSConfig"` in one and `"ForwardTTSConfig"` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D31 · IaC & Container Security · Medium IaC · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×7
  • Duplicated block (10 lines × 2) TTS/encoder/models/base_encoder.py:37 — TTS/encoder/models/base_encoder.py:37-61 | TTS/tts/layers/xtts/hifigan_decoder.py:459-468 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/encoder/models/base_encoder.py:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) TTS/tts/layers/tortoise/arch_utils.py:240 — TTS/tts/layers/tortoise/arch_utils.py:240-249 | TTS/tts/layers/tortoise/classifier.py:62-71 — before extracting anything, compare `TTS/tts/layers/tortoise/arch_utils.py` and `TTS/tts/layers/tortoise/classifier.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) TTS/tts/layers/tortoise/autoregressive.py:334 — TTS/tts/layers/tortoise/autoregressive.py:334-343 | TTS/tts/layers/xtts/gpt.py:158-167 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/tortoise/autoregressive.py:334` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) TTS/tts/layers/tortoise/autoregressive.py:431 — TTS/tts/layers/tortoise/autoregressive.py:431-440 | TTS/tts/layers/xtts/gpt.py:295-304 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) TTS/tts/layers/tortoise/dpm_solver.py:918 — TTS/tts/layers/tortoise/dpm_solver.py:918-927 | TTS/tts/layers/tortoise/dpm_solver.py:975-984 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/tortoise/dpm_solver.py:918` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) TTS/tts/layers/tortoise/xtransformers.py:1201 — TTS/tts/layers/tortoise/xtransformers.py:1201-1210 | TTS/tts/layers/tortoise/xtransformers.py:1250-1259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) TTS/vocoder/models/__init__.py:42 — TTS/vocoder/models/__init__.py:42-51 | TTS/vocoder/models/__init__.py:54-63 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/vocoder/models/__init__.py:42` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TTS/vocoder/models/__init__.py:53` calls `ValueError` and `TTS/vocoder/models/__init__.py:64` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×7
  • Outbound HTTP without resilience REDACTED:50 — `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:30 — `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:39 — `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:79 — `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience TTS/utils/manage.py:531 — `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience TTS/utils/manage.py:566 — `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience TTS/utils/manage.py:600 — `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×6
  • Change coupling: train_hifigan.py ↔ train_multiband_melgan.py recipes/ljspeech/hifigan/train_hifigan.py:1 — `recipes/ljspeech/hifigan/train_hifigan.py` and `recipes/ljspeech/multiband_melgan/train_multiband_melgan.py` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `0870a4fa` Make style (#1405); `48f6bb40` Fix recipes as to the recent API changes. (#1367); `27db089d` Change TrainingArgs -> TrainerArgs — run `git show` on any of them.
  • Change coupling: train_multiband_melgan.py ↔ train.py recipes/ljspeech/multiband_melgan/train_multiband_melgan.py:1 — `recipes/ljspeech/multiband_melgan/train_multiband_melgan.py` and `recipes/ljspeech/univnet/train.py` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `0870a4fa` Make style (#1405); `48f6bb40` Fix recipes as to the recent API changes. (#1367); `27db089d` Change TrainingArgs -> TrainerArgs — run `git show` on any of them.
  • Change coupling: train_hifigan.py ↔ train.py recipes/ljspeech/hifigan/train_hifigan.py:1 — `recipes/ljspeech/hifigan/train_hifigan.py` and `recipes/ljspeech/univnet/train.py` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `0870a4fa` Make style (#1405); `48f6bb40` Fix recipes as to the recent API changes. (#1367); `27db089d` Change TrainingArgs -> TrainerArgs — run `git show` on any of them.
  • Change coupling: stochastic_duration_predictor.py ↔ base_tts.py TTS/tts/layers/vits/stochastic_duration_predictor.py:1 — `TTS/tts/layers/vits/stochastic_duration_predictor.py` and `TTS/tts/models/base_tts.py` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `1472b6df` make style; `dcb2374b` Add multilingual training support to the VITS model; `3e9ca4b9` make style — run `git show` on any of them.
  • Change coupling: synthesis.py ↔ numbers.py TTS/tts/utils/synthesis.py:1 — `TTS/tts/utils/synthesis.py` and `TTS/tts/utils/text/chinese_mandarin/numbers.py` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `9ab07f94` modify according to PR reviews (at that commit the file was still `TTS/tts/utils/chinese_mandarin/numbers.py`); `0d452532` modify according to PR reviews (at that commit the file was still `TTS/tts/utils/chinese_mandarin/numbers.py`); `e6fd118c` <add> Chinese mandarin implementation (tacotron2) (at that commit the file was still `TTS/tts/utils/chinese_mandarin/numbers.py`) — run `git show` on any of them.
  • Change coupling: train_fast_pitch.py ↔ train_vits.py recipes/ljspeech/fast_pitch/train_fast_pitch.py:1 — `recipes/ljspeech/fast_pitch/train_fast_pitch.py` and `recipes/ljspeech/vits_tts/train_vits.py` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `49bac724` Implement VitsAudioConfig (#1556); `1c3623af` Fix model manager (#1436); `ccdc2300` Add eval_split and eval_split_size in the call of load_tts_samples fo… — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×6
  • Duplicated block (15 lines × 2) TTS/encoder/models/resnet.py:76 — TTS/encoder/models/resnet.py:76-90 | TTS/tts/layers/xtts/hifigan_decoder.py:436-450 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) TTS/tts/layers/tacotron/tacotron.py:312 — TTS/tts/layers/tacotron/tacotron.py:312-326 | TTS/tts/layers/tacotron/tacotron2.py:185-199 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) TTS/tts/models/glow_tts.py:91 — TTS/tts/models/glow_tts.py:91-105 | TTS/tts/models/overflow.py:95-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/glow_tts.py:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `Decoder` names `TTS.tts.layers.glow_tts.decoder` in one and `TTS.tts.layers.overflow.decoder` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (15 lines × 2) TTS/tts/models/tacotron.py:106 — TTS/tts/models/tacotron.py:106-120 | TTS/tts/models/tacotron2.py:118-132 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/tacotron.py:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) TTS/utils/manage.py:529 — TTS/utils/manage.py:529-543 | TTS/utils/manage.py:564-578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) TTS/tts/layers/xtts/hifigan_decoder.py:106 — TTS/tts/layers/xtts/hifigan_decoder.py:106-120 | TTS/vocoder/models/hifigan_generator.py:85-99 — before extracting anything, compare `TTS/tts/layers/xtts/hifigan_decoder.py` and `TTS/vocoder/models/hifigan_generator.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D17 · Explicit Debt · FixmeComment · ×5
  • FixmeComment tests/tts_tests/test_tacotron_model.py:56 — # FIXME: missing num_speakers parameter to Tacotron ctor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/tts_tests/test_tacotron_model.py:110 — # FIXME: missing num_speakers parameter to Tacotron ctor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/tts_tests/test_tacotron_model.py:169 — # FIXME: missing num_speakers parameter to Tacotron ctor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/tts_tests/test_tacotron_model.py:221 — # FIXME: missing num_speakers parameter to Tacotron ctor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/tts_tests/test_tacotron_model.py:346 — # FIXME: missing num_speakers parameter to Tacotron ctor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:94 — REDACTED:94-106 | REDACTED:274-284 | REDACTED:632-642 | REDACTED:646-655 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:192 — REDACTED:192-203 | REDACTED:227-238 | REDACTED:259-270 | REDACTED:618-628 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) TTS/tts/layers/delightful_tts/acoustic_model.py:199 — TTS/tts/layers/delightful_tts/acoustic_model.py:199-209 | TTS/tts/models/forward_tts.py:567-577 | TTS/tts/models/glow_tts.py:163-177 | TTS/tts/models/vits.py:897-907 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) TTS/tts/models/base_tacotron.py:141 — TTS/tts/models/base_tacotron.py:141-175 | TTS/tts/models/base_tts.py:381-418 | TTS/tts/models/glow_tts.py:475-508 | TTS/vc/models/base_vc.py:369-406 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) TTS/encoder/models/resnet.py:41 — TTS/encoder/models/resnet.py:41-56 | TTS/tts/layers/xtts/hifigan_decoder.py:371-386 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (16 lines × 2) TTS/tts/models/neuralhmm_tts.py:156 — TTS/tts/models/neuralhmm_tts.py:156-171 | TTS/tts/models/overflow.py:169-184 — before extracting anything, compare `TTS/tts/models/neuralhmm_tts.py` and `TTS/tts/models/overflow.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (16 lines × 2) TTS/tts/models/tacotron.py:315 — TTS/tts/models/tacotron.py:315-330 | TTS/tts/models/tacotron2.py:343-358 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/tacotron.py:315` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (16 lines × 2) TTS/utils/synthesizer.py:414 — TTS/utils/synthesizer.py:414-429 | TTS/utils/synthesizer.py:478-493 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×4
  • Duplicated block (14–15 lines × 2) TTS/tts/layers/generic/wavenet.py:76 — TTS/tts/layers/generic/wavenet.py:76-89 | TTS/vc/modules/freevc/modules.py:126-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14–15 lines × 2) TTS/tts/layers/xtts/stream_generator.py:427 — TTS/tts/layers/xtts/stream_generator.py:427-440 | TTS/tts/layers/xtts/stream_generator.py:547-561 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/xtts/stream_generator.py:427` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) TTS/tts/layers/xtts/stream_generator.py:424 — TTS/tts/layers/xtts/stream_generator.py:424-437 | TTS/tts/layers/xtts/stream_generator.py:498-512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/xtts/stream_generator.py:424` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TTS/tts/layers/xtts/stream_generator.py:515` calls `ValueError` and `TTS/tts/layers/xtts/stream_generator.py:439` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14–15 lines × 2) TTS/tts/utils/visual.py:200 — TTS/tts/utils/visual.py:200-214 | TTS/tts/utils/visual.py:217-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TTS/tts/utils/visual.py:196` calls `subplot`, `plot`, `list` and `TTS/tts/utils/visual.py:216` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×4
  • Duplicated block (5 lines × 3) TTS/tts/models/align_tts.py:402 — TTS/tts/models/align_tts.py:402-406 | TTS/tts/models/forward_tts.py:833-837 | TTS/vocoder/models/wavernn.py:546-550 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (5 lines × 3) TTS/vocoder/models/parallel_wavegan_discriminator.py:70 — TTS/vocoder/models/parallel_wavegan_discriminator.py:70-74 | TTS/vocoder/models/parallel_wavegan_discriminator.py:173-177 | TTS/vocoder/models/parallel_wavegan_generator.py:137-142 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 3) TTS/tts/datasets/dataset.py:657 — TTS/tts/datasets/dataset.py:657-661 | TTS/tts/datasets/dataset.py:811-815 | TTS/tts/datasets/dataset.py:963-967 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 3) TTS/vocoder/layers/lvc_block.py:46 — TTS/vocoder/layers/lvc_block.py:46-50 | TTS/vocoder/layers/lvc_block.py:51-55 | TTS/vocoder/layers/lvc_block.py:56-60 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
AC3 · Page structure · Data table has no header cells · ×3
  • Data table has no header cells TTS/server/templates/details.html:45 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells TTS/server/templates/details.html:70 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells TTS/server/templates/details.html:100 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: Vits TTS/tts/models/vits.py:603 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DelightfulTTS TTS/tts/models/delightful_tts.py:630 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ModelManager TTS/utils/manage.py:30 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×3
  • Change-coupling hub: train_speedy_speech.py → train_aligntts.py, train_fast_pitch.py, train_glowtts.py, train_vits.py, train_vits_tts.py, train_vits.py recipes/ljspeech/speedy_speech/train_speedy_speech.py — `recipes/ljspeech/speedy_speech/train_speedy_speech.py` changes together with 6 other files — `recipes/ljspeech/align_tts/train_aligntts.py`, `recipes/ljspeech/fast_pitch/train_fast_pitch.py`, `recipes/ljspeech/glow_tts/train_glowtts.py`, `recipes/ljspeech/vits_tts/train_vits.py`, `recipes/multilingual/vits_tts/train_vits_tts.py`, `recipes/vctk/vits/train_vits.py` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 6.
  • Change-coupling hub: train_glowtts.py → train_aligntts.py, train_hifigan.py, train_multiband_melgan.py recipes/ljspeech/glow_tts/train_glowtts.py — `recipes/ljspeech/glow_tts/train_glowtts.py` changes together with 3 other files — `recipes/ljspeech/align_tts/train_aligntts.py`, `recipes/ljspeech/hifigan/train_hifigan.py`, `recipes/ljspeech/multiband_melgan/train_multiband_melgan.py` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: train_vits.py → train_fast_pitch.py, train_vits.py, train_vits_tts.py recipes/vctk/vits/train_vits.py — `recipes/vctk/vits/train_vits.py` changes together with 3 other files — `recipes/ljspeech/fast_pitch/train_fast_pitch.py`, `recipes/ljspeech/vits_tts/train_vits.py`, `recipes/multilingual/vits_tts/train_vits_tts.py` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) TTS/tts/layers/delightful_tts/conv_layers.py:631 — TTS/tts/layers/delightful_tts/conv_layers.py:631-650 | TTS/tts/layers/tortoise/vocoder.py:234-253 — before extracting anything, compare `TTS/tts/layers/delightful_tts/conv_layers.py` and `TTS/tts/layers/tortoise/vocoder.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) TTS/tts/models/neuralhmm_tts.py:305 — TTS/tts/models/neuralhmm_tts.py:305-324 | TTS/tts/models/overflow.py:321-340 — before extracting anything, compare `TTS/tts/models/neuralhmm_tts.py` and `TTS/tts/models/overflow.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) TTS/tts/models/tacotron.py:197 — TTS/tts/models/tacotron.py:197-216 | TTS/tts/models/tacotron2.py:217-236 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) TTS/tts/layers/xtts/stream_generator.py:444 — TTS/tts/layers/xtts/stream_generator.py:444-457 | TTS/tts/layers/xtts/stream_generator.py:615-628 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/xtts/stream_generator.py:444` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) TTS/tts/layers/xtts/hifigan_decoder.py:303 — TTS/tts/layers/xtts/hifigan_decoder.py:303-316 | TTS/vocoder/models/hifigan_generator.py:269-282 — before extracting anything, compare `TTS/tts/layers/xtts/hifigan_decoder.py` and `TTS/vocoder/models/hifigan_generator.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) TTS/tts/models/glow_tts.py:544 — TTS/tts/models/glow_tts.py:544-557 | TTS/tts/models/neuralhmm_tts.py:239-252 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `config` to `"GlowTTSConfig"` in one and `"NeuralhmmTTSConfig"` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) TTS/tts/layers/xtts/zh_num2words.py:986 — TTS/tts/layers/xtts/zh_num2words.py:986-997 | TTS/tts/layers/xtts/zh_num2words.py:1002-1013 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) TTS/vc/models/freevc.py:180 — TTS/vc/models/freevc.py:180-191 | TTS/vocoder/models/hifigan_discriminator.py:57-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/vc/models/freevc.py:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) TTS/tts/layers/delightful_tts/energy_adaptor.py:63 — TTS/tts/layers/delightful_tts/energy_adaptor.py:63-74 | TTS/tts/layers/delightful_tts/pitch_adaptor.py:62-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D6 · Cohesion (LCOM4) · Low cohesion · ×3
  • Low cohesion: BaseTacotron (LCOM4 5) TTS/tts/models/base_tacotron.py:21 — BaseTacotron's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AcousticModel (LCOM4 4) TTS/tts/layers/delightful_tts/acoustic_model.py:24 — AcousticModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ResNetSpeakerEncoder (LCOM4 4) TTS/tts/layers/xtts/hifigan_decoder.py:421 — ResNetSpeakerEncoder's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark TTS/server/templates/details.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark TTS/server/templates/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) TTS/tts/models/align_tts.py:366 — TTS/tts/models/align_tts.py:366-382 | TTS/tts/models/delightful_tts.py:1041-1097 | TTS/tts/models/forward_tts.py:769-813 | TTS/tts/models/glow_tts.py:429-455 | TTS/tts/models/tacotron.py:352-378 | TTS/tts/models/tacotron2.py:380-401 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) TTS/tts/models/delightful_tts.py:162 — TTS/tts/models/delightful_tts.py:162-195 | TTS/tts/models/delightful_tts.py:244-293 | TTS/tts/models/vits.py:97-138 | TTS/tts/models/vits.py:161-208 | TTS/vc/modules/freevc/mel_processing.py:41-71 | TTS/vc/modules/freevc/mel_processing.py:87-125 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) TTS/tts/configs/delightful_tts_config.py:155 — TTS/tts/configs/delightful_tts_config.py:155-170 | TTS/tts/configs/fast_pitch_config.py:168-183 | TTS/tts/configs/fast_speech_config.py:162-177 | TTS/tts/configs/fastspeech2_config.py:183-198 | TTS/tts/configs/speedy_speech_config.py:179-194 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) TTS/tts/models/delightful_tts.py:302 — TTS/tts/models/delightful_tts.py:302-317 | TTS/tts/models/vits.py:233-253 | TTS/tts/utils/data.py:61-79 | TTS/tts/utils/languages.py:116-125 | TTS/tts/utils/speakers.py:214-222 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×2
  • Duplicated block (36 lines × 2) TTS/encoder/models/resnet.py:154 — TTS/encoder/models/resnet.py:154-189 | TTS/tts/layers/xtts/hifigan_decoder.py:525-560 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (36 lines × 2) TTS/tts/models/base_tts.py:243 — TTS/tts/models/base_tts.py:243-278 | TTS/vc/models/base_vc.py:231-266 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×2
  • Duplicated block (30 lines × 2) TTS/tts/models/base_tts.py:381 — TTS/tts/models/base_tts.py:381-410 | TTS/vc/models/base_vc.py:369-398 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (30 lines × 2) TTS/tts/utils/visual.py:94 — TTS/tts/utils/visual.py:94-123 | TTS/tts/utils/visual.py:127-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) TTS/tts/layers/delightful_tts/conv_layers.py:602 — TTS/tts/layers/delightful_tts/conv_layers.py:602-628 | TTS/tts/layers/tortoise/vocoder.py:205-231 — before extracting anything, compare `TTS/tts/layers/delightful_tts/conv_layers.py` and `TTS/tts/layers/tortoise/vocoder.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (27 lines × 2) TTS/tts/layers/delightful_tts/kernel_predictor.py:94 — TTS/tts/layers/delightful_tts/kernel_predictor.py:94-120 | TTS/tts/layers/tortoise/vocoder.py:101-127 — before extracting anything, compare `TTS/tts/layers/delightful_tts/kernel_predictor.py` and `TTS/tts/layers/tortoise/vocoder.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×2
  • Duplicated block (26 lines × 2) TTS/tts/models/neuralhmm_tts.py:200 — TTS/tts/models/neuralhmm_tts.py:200-225 | TTS/tts/models/overflow.py:213-238 — before extracting anything, compare `TTS/tts/models/neuralhmm_tts.py` and `TTS/tts/models/overflow.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (26 lines × 2) TTS/tts/models/tacotron.py:288 — TTS/tts/models/tacotron.py:288-313 | TTS/tts/models/tacotron2.py:316-341 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/tacotron.py:288` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) TTS/tts/layers/vits/networks.py:148 — TTS/tts/layers/vits/networks.py:148-166 | TTS/vc/modules/freevc/modules.py:369-387 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) TTS/vc/modules/freevc/mel_processing.py:52 — TTS/vc/modules/freevc/mel_processing.py:52-70 | TTS/vc/modules/freevc/mel_processing.py:102-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) TTS/tts/layers/delightful_tts/acoustic_model.py:199 — TTS/tts/layers/delightful_tts/acoustic_model.py:199-209 | TTS/tts/models/forward_tts.py:567-577 | TTS/tts/models/glow_tts.py:167-177 | TTS/tts/models/vits.py:897-907 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 4) TTS/tts/models/align_tts.py:368 — TTS/tts/models/align_tts.py:368-378 | TTS/tts/models/delightful_tts.py:1046-1056 | TTS/tts/models/forward_tts.py:772-782 | TTS/tts/models/tacotron2.py:384-394 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TTS/tts/models/tacotron2.py:397` calls `plot_alignment`, `cpu`, `numpy` and `TTS/tts/models/align_tts.py:381` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) REDACTED:422 — REDACTED:422-429 | REDACTED:449-456 | REDACTED:489-496 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) TTS/tts/models/align_tts.py:343 — TTS/tts/models/align_tts.py:343-350 | TTS/tts/models/tacotron.py:290-297 | TTS/tts/models/tacotron2.py:318-325 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `batch` to `dict` in one and `Dict` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) TTS/tts/layers/bark/inference_funcs.py:37 — TTS/tts/layers/bark/inference_funcs.py:37-44 | TTS/tts/layers/tortoise/audio_utils.py:106-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) TTS/tts/layers/delightful_tts/acoustic_model.py:178 — TTS/tts/layers/delightful_tts/acoustic_model.py:178-185 | TTS/tts/models/vits.py:875-881 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) REDACTED:94 — REDACTED:94-102 | REDACTED:274-280 | REDACTED:632-638 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) TTS/tts/layers/delightful_tts/conformer.py:426 — TTS/tts/layers/delightful_tts/conformer.py:426-432 | TTS/tts/layers/delightful_tts/networks.py:97-103 | TTS/tts/layers/tacotron/gst_layers.py:121-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
X3 · Exception handling · Swallowed exception (empty catch) · ×2
  • Swallowed exception (empty catch) TTS/tts/layers/xtts/tokenizer.py:534 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) TTS/utils/manage.py:406 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 2 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
C2 · Access Controls · No authorization · ×1
  • No authorization REDACTED:150 — This repository serves requests — a request handler (@app.route() (REDACTED:150) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
D1 · Cyclomatic Complexity · NewGenerationMixin.generate (cyclomatic 80) · ×1
  • NewGenerationMixin.generate (cyclomatic 80) TTS/tts/layers/xtts/stream_generator.py:46 — NewGenerationMixin.generate has cyclomatic complexity 80 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · Synthesizer.tts (cyclomatic 48) · ×1
  • Synthesizer.tts (cyclomatic 48) TTS/utils/synthesizer.py:257 — Synthesizer.tts has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiheadAttention.forward (cyclomatic 47) · ×1
  • MultiheadAttention.forward (cyclomatic 47) TTS/vc/modules/freevc/wavlm/modules.py:424 — MultiheadAttention.forward has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AttentionLayers.__init__ (cyclomatic 42) · ×1
  • AttentionLayers.__init__ (cyclomatic 42) TTS/tts/layers/tortoise/xtransformers.py:757 — AttentionLayers.__init__ has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NewGenerationMixin.sample_stream (cyclomatic 39) · ×1
  • NewGenerationMixin.sample_stream (cyclomatic 39) TTS/tts/layers/xtts/stream_generator.py:644 — NewGenerationMixin.sample_stream has cyclomatic complexity 39 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · AttentionLayers.forward (cyclomatic 34) · ×1
  • AttentionLayers.forward (cyclomatic 34) TTS/tts/layers/tortoise/xtransformers.py:927 — AttentionLayers.forward has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DPM_Solver.sample (cyclomatic 32) · ×1
  • DPM_Solver.sample (cyclomatic 32) TTS/tts/layers/tortoise/dpm_solver.py:1238 — DPM_Solver.sample has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · synthesize.main (cyclomatic 30) · ×1
  • synthesize.main (cyclomatic 30) TTS/bin/synthesize.py:144 — synthesize.main has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · numbers._num2chinese (cyclomatic 30) · ×1
  • numbers._num2chinese (cyclomatic 30) TTS/tts/utils/text/chinese_mandarin/numbers.py:12 — numbers._num2chinese has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Attention.forward (cyclomatic 27) · ×1
  • Attention.forward (cyclomatic 27) TTS/tts/layers/tortoise/xtransformers.py:594 — Attention.forward has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · zh_num2words.num2chn (cyclomatic 26) · ×1
  • zh_num2words.num2chn (cyclomatic 26) TTS/tts/layers/xtts/zh_num2words.py:649 — zh_num2words.num2chn has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · inference_funcs.generate_text_semantic (cyclomatic 23) · ×1
  • inference_funcs.generate_text_semantic (cyclomatic 23) TTS/tts/layers/bark/inference_funcs.py:152 — inference_funcs.generate_text_semantic has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GPT.forward (cyclomatic 22) · ×1
  • GPT.forward (cyclomatic 22) TTS/tts/layers/xtts/gpt.py:370 — GPT.forward has cyclomatic complexity 22 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · zh_num2words.normalize_nsw (cyclomatic 21) · ×1
  • zh_num2words.normalize_nsw (cyclomatic 21) TTS/tts/layers/xtts/zh_num2words.py:928 — zh_num2words.normalize_nsw has cyclomatic complexity 21 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · BaseTTS.get_data_loader (cyclomatic 21) · ×1
  • BaseTTS.get_data_loader (cyclomatic 21) TTS/tts/models/base_tts.py:280 — BaseTTS.get_data_loader has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BaseVC.get_data_loader (cyclomatic 21) · ×1
  • BaseVC.get_data_loader (cyclomatic 21) TTS/vc/models/base_vc.py:268 — BaseVC.get_data_loader has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TacotronLoss.forward (cyclomatic 20) · ×1
  • TacotronLoss.forward (cyclomatic 20) TTS/tts/layers/losses.py:354 — TacotronLoss.forward has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GeneratorLoss.__init__ (cyclomatic 20) · ×1
  • GeneratorLoss.__init__ (cyclomatic 20) TTS/vocoder/layers/losses.py:227 — GeneratorLoss.__init__ has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Wavernn.inference (cyclomatic 20) · ×1
  • Wavernn.inference (cyclomatic 20) TTS/vocoder/models/wavernn.py:315 — Wavernn.inference has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · load_model.load_model (cyclomatic 18) · ×1
  • load_model.load_model (cyclomatic 18) REDACTED:94 — load_model.load_model has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · speakers.get_speaker_manager (cyclomatic 18) · ×1
  • speakers.get_speaker_manager (cyclomatic 18) TTS/tts/utils/speakers.py:150 — speakers.get_speaker_manager has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TTSDataset.collate_fn (cyclomatic 17) · ×1
  • TTSDataset.collate_fn (cyclomatic 17) TTS/tts/datasets/dataset.py:416 — TTSDataset.collate_fn has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · synthesis.synthesis (cyclomatic 17) · ×1
  • synthesis.synthesis (cyclomatic 17) TTS/tts/utils/synthesis.py:116 — synthesis.synthesis has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · inference_funcs.generate_coarse (cyclomatic 16) · ×1
  • inference_funcs.generate_coarse (cyclomatic 16) TTS/tts/layers/bark/inference_funcs.py:307 — inference_funcs.generate_coarse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GAN.train_step (cyclomatic 16) · ×1
  • GAN.train_step (cyclomatic 16) TTS/vocoder/models/gan.py:68 — GAN.train_step has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: TTS/utils/synthesizer.py TTS/utils/synthesizer.py:257 — TTS/utils/synthesizer.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in Synthesizer.tts at line 257. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2023-11-12..2024-02-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2023-11-12 11:20:58 -03:00' --until='2024-02-10 11:20:58 -03:00' --full-history --no-merges -- TTS/utils/synthesizer.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · NewGenerationMixin.generate (cognitive 122) · ×1
  • NewGenerationMixin.generate (cognitive 122) TTS/tts/layers/xtts/stream_generator.py:46 — NewGenerationMixin.generate has cognitive complexity 122 (threshold 15). Drivers by points: if/else 43 (90 pts), boolean chains 25, ternaries 3 (4 pts), loops 1 (3 pts) (nesting depth added 50). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · Synthesizer.tts (cognitive 83) · ×1
  • Synthesizer.tts (cognitive 83) TTS/utils/synthesizer.py:257 — Synthesizer.tts has cognitive complexity 83 (threshold 15). Drivers by points: if/else 35 (64 pts), boolean chains 14, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiheadAttention.forward (cognitive 74) · ×1
  • MultiheadAttention.forward (cognitive 74) TTS/vc/modules/freevc/wavlm/modules.py:424 — MultiheadAttention.forward has cognitive complexity 74 (threshold 15). Drivers by points: if/else 43 (66 pts), boolean chains 8 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NewGenerationMixin.sample_stream (cognitive 68) · ×1
  • NewGenerationMixin.sample_stream (cognitive 68) TTS/tts/layers/xtts/stream_generator.py:644 — NewGenerationMixin.sample_stream has cognitive complexity 68 (threshold 15). Drivers by points: if/else 16 (37 pts), ternaries 16 (24 pts), boolean chains 6, loops 1 (nesting depth added 29). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · DPM_Solver.sample (cognitive 61) · ×1
  • DPM_Solver.sample (cognitive 61) TTS/tts/layers/tortoise/dpm_solver.py:1238 — DPM_Solver.sample has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (42 pts), loops 4 (9 pts), ternaries 4 (8 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AttentionLayers.__init__ (cognitive 53) · ×1
  • AttentionLayers.__init__ (cognitive 53) TTS/tts/layers/tortoise/xtransformers.py:757 — AttentionLayers.__init__ has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 15 (25 pts), if/else 13 (16 pts), boolean chains 11, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · numbers._num2chinese (cognitive 53) · ×1
  • numbers._num2chinese (cognitive 53) TTS/tts/utils/text/chinese_mandarin/numbers.py:12 — numbers._num2chinese has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (34 pts), ternaries 6 (11 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseTTS.get_data_loader (cognitive 51) · ×1
  • BaseTTS.get_data_loader (cognitive 51) TTS/tts/models/base_tts.py:280 — BaseTTS.get_data_loader has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 13 (35 pts), if/else 9 (14 pts), boolean chains 2 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseVC.get_data_loader (cognitive 51) · ×1
  • BaseVC.get_data_loader (cognitive 51) TTS/vc/models/base_vc.py:268 — BaseVC.get_data_loader has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 13 (35 pts), if/else 9 (14 pts), boolean chains 2 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AttentionLayers.forward (cognitive 50) · ×1
  • AttentionLayers.forward (cognitive 50) TTS/tts/layers/tortoise/xtransformers.py:927 — AttentionLayers.forward has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (37 pts), boolean chains 8, ternaries 2 (4 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GAN.train_step (cognitive 46) · ×1
  • GAN.train_step (cognitive 46) TTS/vocoder/models/gan.py:68 — GAN.train_step has cognitive complexity 46 (threshold 15). Drivers by points: if/else 22 (46 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · zh_num2words.num2chn (cognitive 45) · ×1
  • zh_num2words.num2chn (cognitive 45) TTS/tts/layers/xtts/zh_num2words.py:649 — zh_num2words.num2chn has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (28 pts), ternaries 2 (8 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TTSDataset.collate_fn (cognitive 37) · ×1
  • TTSDataset.collate_fn (cognitive 37) TTS/tts/datasets/dataset.py:416 — TTSDataset.collate_fn has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 2 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · synthesize.main (cognitive 35) · ×1
  • synthesize.main (cognitive 35) TTS/bin/synthesize.py:144 — synthesize.main has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (24 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inference_funcs.generate_text_semantic (cognitive 35) · ×1
  • inference_funcs.generate_text_semantic (cognitive 35) TTS/tts/layers/bark/inference_funcs.py:152 — inference_funcs.generate_text_semantic has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 8, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RAdam.step (cognitive 34) · ×1
  • RAdam.step (cognitive 34) TTS/utils/radam.py:33 — RAdam.step has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GPT.forward (cognitive 33) · ×1
  • GPT.forward (cognitive 33) TTS/tts/layers/xtts/gpt.py:370 — GPT.forward has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 7 (14 pts) (nesting depth added 11). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · zh_num2words.normalize_nsw (cognitive 30) · ×1
  • zh_num2words.normalize_nsw (cognitive 30) TTS/tts/layers/xtts/zh_num2words.py:928 — zh_num2words.normalize_nsw has cognitive complexity 30 (threshold 15). Drivers by points: loops 10 (20 pts), if/else 10 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PerfectBatchSampler.__iter__ (cognitive 30) · ×1
  • PerfectBatchSampler.__iter__ (cognitive 30) TTS/utils/samplers.py:74 — PerfectBatchSampler.__iter__ has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TacotronLoss.forward (cognitive 29) · ×1
  • TacotronLoss.forward (cognitive 29) TTS/tts/layers/losses.py:354 — TacotronLoss.forward has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (27 pts), ternaries 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Attention.forward (cognitive 29) · ×1
  • Attention.forward (cognitive 29) TTS/tts/layers/tortoise/xtransformers.py:594 — Attention.forward has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23 (25 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · speakers.get_speaker_manager (cognitive 29) · ×1
  • speakers.get_speaker_manager (cognitive 29) TTS/tts/utils/speakers.py:150 — speakers.get_speaker_manager has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 4 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Gruut.phonemize_gruut (cognitive 29) · ×1
  • Gruut.phonemize_gruut (cognitive 29) TTS/tts/utils/text/phonemizers/gruut_wrapper.py:57 — Gruut.phonemize_gruut has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 3 (7 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TTSTokenizer.init_from_config (cognitive 29) · ×1
  • TTSTokenizer.init_from_config (cognitive 29) TTS/tts/utils/text/tokenizer.py:150 — TTSTokenizer.init_from_config has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 1 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wavlm.compute_mask_indices (cognitive 29) · ×1
  • wavlm.compute_mask_indices (cognitive 29) REDACTED:35 — wavlm.compute_mask_indices has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (5 pts), ternaries 1 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inference_funcs.generate_coarse (cognitive 28) · ×1
  • inference_funcs.generate_coarse (cognitive 28) TTS/tts/layers/bark/inference_funcs.py:307 — inference_funcs.generate_coarse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · datasets.load_tts_samples (cognitive 27) · ×1
  • datasets.load_tts_samples (cognitive 27) TTS/tts/datasets/__init__.py:70 — datasets.load_tts_samples has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (8 pts), ternaries 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Wavernn.inference (cognitive 27) · ×1
  • Wavernn.inference (cognitive 27) TTS/vocoder/models/wavernn.py:315 — Wavernn.inference has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · train_encoder.train (cognitive 26) · ×1
  • train_encoder.train (cognitive 26) TTS/bin/train_encoder.py:126 — train_encoder.train has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 2 (6 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compute_embeddings.compute_embeddings (cognitive 25) · ×1
  • compute_embeddings.compute_embeddings (cognitive 25) TTS/bin/compute_embeddings.py:15 — compute_embeddings.compute_embeddings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Vits.get_data_loader (cognitive 25) · ×1
  • Vits.get_data_loader (cognitive 25) TTS/tts/models/vits.py:1584 — Vits.get_data_loader has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (17 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelManager.model_info_by_full_name (cognitive 25) · ×1
  • ModelManager.model_info_by_full_name (cognitive 25) TTS/utils/manage.py:143 — ModelManager.model_info_by_full_name has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (25 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · remove_silence_using_vad.preprocess_audios (cognitive 24) · ×1
  • remove_silence_using_vad.preprocess_audios (cognitive 24) TTS/bin/remove_silence_using_vad.py:34 — remove_silence_using_vad.preprocess_audios has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (8 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AugmentWAV.__init__ (cognitive 24) · ×1
  • AugmentWAV.__init__ (cognitive 24) TTS/encoder/utils/generic_utils.py:13 — AugmentWAV.__init__ has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · synthesis.synthesis (cognitive 24) · ×1
  • synthesis.synthesis (cognitive 24) TTS/tts/utils/synthesis.py:116 — synthesis.synthesis has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelManager._update_path (cognitive 24) · ×1
  • ModelManager._update_path (cognitive 24) TTS/utils/manage.py:500 — ModelManager._update_path has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepare_voxceleb.convert_audio_and_make_label (cognitive 23) · ×1
  • prepare_voxceleb.convert_audio_and_make_label (cognitive 23) REDACTED:146 — prepare_voxceleb.convert_audio_and_make_label has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · formatters.mailabs (cognitive 23) · ×1
  • formatters.mailabs (cognitive 23) REDACTED:140 — formatters.mailabs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Wav2VecAlignment.align (cognitive 23) · ×1
  • Wav2VecAlignment.align (cognitive 23) TTS/tts/layers/tortoise/wav2vec_alignment.py:55 — Wav2VecAlignment.align has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inference_funcs.generate_fine (cognitive 22) · ×1
  • inference_funcs.generate_fine (cognitive 22) TTS/tts/layers/bark/inference_funcs.py:484 — inference_funcs.generate_fine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GaussianDiffusion.training_losses (cognitive 22) · ×1
  • GaussianDiffusion.training_losses (cognitive 22) TTS/tts/layers/tortoise/diffusion.py:864 — GaussianDiffusion.training_losses has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tortoise.inference (cognitive 22) · ×1
  • Tortoise.inference (cognitive 22) TTS/tts/models/tortoise.py:598 — Tortoise.inference has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 6 (8 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseVocoder._set_model_args (cognitive 22) · ×1
  • BaseVocoder._set_model_args (cognitive 22) TTS/vocoder/models/base_vocoder.py:27 — BaseVocoder._set_model_args has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (22 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GPT.get_prompts (cognitive 21) · ×1
  • GPT.get_prompts (cognitive 21) TTS/tts/layers/xtts/gpt.py:319 — GPT.get_prompts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (8 pts) (nesting depth added 12). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · GPTTrainer.__init__ (cognitive 21) · ×1
  • GPTTrainer.__init__ (cognitive 21) TTS/tts/layers/xtts/trainer/gpt_trainer.py:70 — GPTTrainer.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GPTTrainer.get_data_loader (cognitive 21) · ×1
  • GPTTrainer.get_data_loader (cognitive 21) TTS/tts/layers/xtts/trainer/gpt_trainer.py:353 — GPTTrainer.get_data_loader has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tacotron.inference (cognitive 21) · ×1
  • Tacotron.inference (cognitive 21) TTS/tts/models/tacotron.py:219 — Tacotron.inference has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (8 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tacotron2.inference (cognitive 21) · ×1
  • Tacotron2.inference (cognitive 21) TTS/tts/models/tacotron2.py:239 — Tacotron2.inference has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (8 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tortoise.get_conditioning_latents (cognitive 21) · ×1
  • Tortoise.get_conditioning_latents (cognitive 21) TTS/tts/models/tortoise.py:405 — Tortoise.get_conditioning_latents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelManager.download_model (cognitive 21) · ×1
  • ModelManager.download_model (cognitive 21) TTS/utils/manage.py:371 — ModelManager.download_model has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RelativePositionTransformer.__init__ (cognitive 20) · ×1
  • RelativePositionTransformer.__init__ (cognitive 20) TTS/tts/layers/glow_tts/transformer.py:344 — RelativePositionTransformer.__init__ has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 5 (8 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diffusion.space_timesteps (cognitive 20) · ×1
  • diffusion.space_timesteps (cognitive 20) TTS/tts/layers/tortoise/diffusion.py:1146 — diffusion.space_timesteps has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffusionTts.forward (cognitive 20) · ×1
  • DiffusionTts.forward (cognitive 20) TTS/tts/layers/tortoise/diffusion_decoder.py:322 — DiffusionTts.forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Vits._freeze_layers (cognitive 20) · ×1
  • Vits._freeze_layers (cognitive 20) TTS/tts/models/vits.py:848 — Vits._freeze_layers has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 6 (7 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ModelManager.model_info_by_idx (cognitive 20) · ×1
  • ModelManager.model_info_by_idx (cognitive 20) TTS/utils/manage.py:102 — ModelManager.model_info_by_idx has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (9 pts), error handling 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DPM_Solver.singlestep_dpm_solver_third_update (cognitive 19) · ×1
  • DPM_Solver.singlestep_dpm_solver_third_update (cognitive 19) TTS/tts/layers/tortoise/dpm_solver.py:758 — DPM_Solver.singlestep_dpm_solver_third_update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (19 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscreteVAE.__init__ (cognitive 19) · ×1
  • DiscreteVAE.__init__ (cognitive 19) TTS/tts/layers/xtts/dvae.py:202 — DiscreteVAE.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (3 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BaseTTS.get_aux_input_from_test_sentences (cognitive 19) · ×1
  • BaseTTS.get_aux_input_from_test_sentences (cognitive 19) TTS/tts/models/base_tts.py:116 — BaseTTS.get_aux_input_from_test_sentences has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Vits.get_aux_input_from_test_sentences (cognitive 19) · ×1
  • Vits.get_aux_input_from_test_sentences (cognitive 19) TTS/tts/models/vits.py:1379 — Vits.get_aux_input_from_test_sentences has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · download.extract_archive (cognitive 19) · ×1
  • download.extract_archive (cognitive 19) REDACTED:138 — download.extract_archive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 2, loops 2 (nesting depth added 9). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · BaseVC.get_aux_input_from_test_sentences (cognitive 19) · ×1
  • BaseVC.get_aux_input_from_test_sentences (cognitive 19) TTS/vc/models/base_vc.py:104 — BaseVC.get_aux_input_from_test_sentences has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeneratorLoss.__init__ (cognitive 19) · ×1
  • GeneratorLoss.__init__ (cognitive 19) TTS/vocoder/layers/losses.py:227 — GeneratorLoss.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 12, if/else 6, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · analyze.plot_phonemes (cognitive 19) · ×1
  • analyze.plot_phonemes (cognitive 19) notebooks/dataset_analysis/analyze.py:154 — analyze.plot_phonemes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (8 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GaussianDiffusion.p_mean_variance (cognitive 18) · ×1
  • GaussianDiffusion.p_mean_variance (cognitive 18) TTS/tts/layers/tortoise/diffusion.py:298 — GaussianDiffusion.p_mean_variance has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (18 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · tokenizer.split_sentence (cognitive 18) · ×1
  • tokenizer.split_sentence (cognitive 18) TTS/tts/layers/xtts/tokenizer.py:35 — tokenizer.split_sentence has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DelightfulTTS._freeze_layers (cognitive 18) · ×1
  • DelightfulTTS._freeze_layers (cognitive 18) TTS/tts/models/delightful_tts.py:783 — DelightfulTTS._freeze_layers has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 6 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Tacotron.forward (cognitive 18) · ×1
  • Tacotron.forward (cognitive 18) TTS/tts/models/tacotron.py:136 — Tacotron.forward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Tacotron2.forward (cognitive 18) · ×1
  • Tacotron2.forward (cognitive 18) TTS/tts/models/tacotron2.py:154 — Tacotron2.forward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Vits.forward_mas (cognitive 18) · ×1
  • Vits.forward_mas (cognitive 18) TTS/tts/models/vits.py:909 — Vits.forward_mas has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 4, if/else 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WaveRNNDataset.load_item (cognitive 18) · ×1
  • WaveRNNDataset.load_item (cognitive 18) TTS/vocoder/datasets/wavernn_dataset.py:50 — WaveRNNDataset.load_item has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Wavegrad.remove_weight_norm (cognitive 18) · ×1
  • Wavegrad.remove_weight_norm (cognitive 18) TTS/vocoder/models/wavegrad.py:178 — Wavegrad.remove_weight_norm has cognitive complexity 18 (threshold 15). Drivers by points: error handling 3 (9 pts), if/else 3 (6 pts), loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · eval_encoder.compute_encoder_accuracy (cognitive 17) · ×1
  • eval_encoder.compute_encoder_accuracy (cognitive 17) TTS/bin/eval_encoder.py:12 — eval_encoder.compute_encoder_accuracy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GaussianDiffusion.autoregressive_training_losses (cognitive 17) · ×1
  • GaussianDiffusion.autoregressive_training_losses (cognitive 17) TTS/tts/layers/tortoise/diffusion.py:950 — GaussianDiffusion.autoregressive_training_losses has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Quantize.forward (cognitive 17) · ×1
  • Quantize.forward (cognitive 17) TTS/tts/layers/xtts/dvae.py:71 — Quantize.forward has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XTTSDataset.__getitem__ (cognitive 17) · ×1
  • XTTSDataset.__getitem__ (cognitive 17) TTS/tts/layers/xtts/trainer/dataset.py:138 — XTTSDataset.__getitem__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseTTS.get_sampler (cognitive 17) · ×1
  • BaseTTS.get_sampler (cognitive 17) TTS/tts/models/base_tts.py:242 — BaseTTS.get_sampler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DelightfulTTS.get_aux_input_from_test_sentences (cognitive 17) · ×1
  • DelightfulTTS.get_aux_input_from_test_sentences (cognitive 17) TTS/tts/models/delightful_tts.py:1123 — DelightfulTTS.get_aux_input_from_test_sentences has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Xtts.inference_stream (cognitive 17) · ×1
  • Xtts.inference_stream (cognitive 17) TTS/tts/models/xtts.py:611 — Xtts.inference_stream has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioProcessor.normalize (cognitive 17) · ×1
  • AudioProcessor.normalize (cognitive 17) TTS/utils/audio/processor.py:259 — AudioProcessor.normalize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AudioProcessor.denormalize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · AudioProcessor.denormalize (cognitive 17) · ×1
  • AudioProcessor.denormalize (cognitive 17) TTS/utils/audio/processor.py:300 — AudioProcessor.denormalize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AudioProcessor.normalize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ModelManager._list_models (cognitive 17) · ×1
  • ModelManager._list_models (cognitive 17) TTS/utils/manage.py:70 — ModelManager._list_models has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseVC.get_sampler (cognitive 17) · ×1
  • BaseVC.get_sampler (cognitive 17) TTS/vc/models/base_vc.py:230 — BaseVC.get_sampler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · formatters.cml_tts (cognitive 16) · ×1
  • formatters.cml_tts (cognitive 16) REDACTED:16 — formatters.cml_tts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 4 (6 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (formatters.coqui) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · formatters.coqui (cognitive 16) · ×1
  • formatters.coqui (cognitive 16) REDACTED:55 — formatters.coqui has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 4 (6 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (formatters.cml_tts) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Tacotron.__init__ (cognitive 16) · ×1
  • Tacotron.__init__ (cognitive 16) TTS/tts/models/tacotron.py:32 — Tacotron.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D22 · Internal API Consistency · Redundant loading methods with overlapping signatures. `load_vc_model_by_name` and `load_tts_model_by_name` are specific variants of `load_model_by_name`. This forces users to guess which method to call based on the model type, rather than using a single unified entry point that handles dispatch internally. · ×1
  • Redundant loading methods with overlapping signatures. `load_vc_model_by_name` and `load_tts_model_by_name` are specific variants of `load_model_by_name`. This forces users to guess which method to call based on the model type, rather than using a single unified entry point that handles dispatch internally. — Remove `load_vc_model_by_name` and `load_tts_model_by_name`. Keep `load_model_by_name` and have it automatically detect the model type or accept an optional `model_type` argument. Alternatively, if the internal state management requires distinct loading, ensure the public API exposes a single `load` method that handles all cases. (signatures: TTS.load_model_by_name(self, model_name: str, gpu: bool) | TTS.load_vc_model_by_name(self, model_name: str, gpu: bool) | TTS.load_tts_model_by_name(self, model_name: str, gpu: bool))
D22 · Internal API Consistency · Inconsistent parameter ordering and naming for file output. `tts_to_file` adds `pipe_out` and `file_path` but keeps the same positional argument order as `tts`, which is confusing. Furthermore, `tts` returns audio (implied), while `tts_to_file` writes to disk. The presence of `pipe_out` in `tts_to_file` suggests a hybrid behavior that is not present in the base `tts` method, creating a split in how output is handled. · ×1
  • Inconsistent parameter ordering and naming for file output. `tts_to_file` adds `pipe_out` and `file_path` but keeps the same positional argument order as `tts`, which is confusing. Furthermore, `tts` returns audio (implied), while `tts_to_file` writes to disk. The presence of `pipe_out` in `tts_to_file` suggests a hybrid behavior that is not present in the base `tts` method, creating a split in how output is handled. — Unify into a single `tts` method that accepts an optional `output_path` or `return_tensor` flag. Or, if keeping two methods, ensure `tts_to_file` does not introduce unexpected parameters like `pipe_out` unless `tts` also supports it. Better yet, use a single method with keyword arguments for output destination. (signatures: TTS.tts(self, text: str, speaker: str, language: str, speaker_wav: str, emotion: str, speed: float, split_sentences: bool) | TTS.tts_to_file(self, text: str, speaker: str, language: str, speaker_wav: str, emotion: str, speed: float, pipe_out, file_path: str, split_sentences: bool))
D22 · Internal API Consistency · Same pattern as TTS · ×1
  • Same pattern as TTS: redundant `_to_file` variants. `voice_conversion` and `voice_conversion_to_file` duplicate intent. The base method likely returns audio data, while the `_to_file` variant writes it. This pattern is repeated for `tts` and `tts_with_vc`. — Consolidate `voice_conversion` and `voice_conversion_to_file` into a single method with an optional `output_path` parameter. Apply the same unification to `tts_with_vc` and `tts_with_vc_to_file`. (signatures: TTS.voice_conversion(self, source_wav: str, target_wav: str) | TTS.voice_conversion_to_file(self, source_wav: str, target_wav: str, file_path: str))
D22 · Internal API Consistency · Redundant `_to_file` variant for TTS with Voice Conversion. Same inconsistency as above. · ×1
  • Redundant `_to_file` variant for TTS with Voice Conversion. Same inconsistency as above. — Unify into a single `tts_with_vc` method with an optional `output_path` parameter. (signatures: TTS.tts_with_vc(self, text: str, language: str, speaker_wav: str, speaker: str, split_sentences: bool) | TTS.tts_with_vc_to_file(self, text: str, language: str, speaker_wav: str, file_path: str, speaker: str, split_sentences: bool))
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (49 shared lines) · ×1
  • Near-duplicate member pair (49 shared lines) TTS/tts/models/tacotron.py:39 — TTS/tts/models/tacotron.py:39-134 | TTS/tts/models/tacotron2.py:53-145 — These two members are variants of one another: 49 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (43 shared lines) · ×1
  • Near-duplicate member pair (43 shared lines) TTS/encoder/models/resnet.py:76 — TTS/encoder/models/resnet.py:76-121 | TTS/tts/layers/xtts/hifigan_decoder.py:436-492 — These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (77 corresponding lines) · ×1
  • Edited copy of a member (77 corresponding lines) TTS/tts/models/base_tts.py:164 — TTS/tts/models/base_tts.py:164-240 | TTS/vc/models/base_vc.py:152-228 — These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) TTS/tts/layers/delightful_tts/conformer.py:436 — TTS/tts/layers/delightful_tts/conformer.py:436-450 | TTS/tts/layers/tacotron/gst_layers.py:131-149 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×1
  • Edited copy of a member (10 corresponding lines) TTS/utils/manage.py:103 — TTS/utils/manage.py:103-141 | TTS/utils/manage.py:144-175 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (76 lines × 2) · ×1
  • Duplicated block (76 lines × 2) recipes/ljspeech/xtts_v1/train_gpt_xtts.py:97 — recipes/ljspeech/xtts_v1/train_gpt_xtts.py:97-172 | recipes/ljspeech/xtts_v2/train_gpt_xtts.py:97-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `recipes/ljspeech/xtts_v1/train_gpt_xtts.py:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (63 lines × 2) · ×1
  • Duplicated block (63 lines × 2) TTS/tts/layers/delightful_tts/kernel_predictor.py:29 — TTS/tts/layers/delightful_tts/kernel_predictor.py:29-91 | TTS/tts/layers/tortoise/vocoder.py:36-98 — before extracting anything, compare `TTS/tts/layers/delightful_tts/kernel_predictor.py` and `TTS/tts/layers/tortoise/vocoder.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (52 lines × 2) · ×1
  • Duplicated block (52 lines × 2) TTS/tts/models/base_tts.py:164 — TTS/tts/models/base_tts.py:164-215 | TTS/vc/models/base_vc.py:152-203 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) TTS/tts/layers/delightful_tts/conv_layers.py:551 — TTS/tts/layers/delightful_tts/conv_layers.py:551-599 | TTS/tts/layers/tortoise/vocoder.py:154-202 — before extracting anything, compare `TTS/tts/layers/delightful_tts/conv_layers.py` and `TTS/tts/layers/tortoise/vocoder.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×1
  • Duplicated block (46 lines × 2) TTS/tts/models/base_tts.py:290 — TTS/tts/models/base_tts.py:290-335 | TTS/vc/models/base_vc.py:278-323 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–38 lines × 2) · ×1
  • Duplicated block (19–38 lines × 2) TTS/tts/models/glow_tts.py:196 — TTS/tts/models/glow_tts.py:196-233 | TTS/tts/models/glow_tts.py:266-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) TTS/tts/models/neuralhmm_tts.py:264 — TTS/tts/models/neuralhmm_tts.py:264-301 | TTS/tts/models/overflow.py:280-317 — before extracting anything, compare `TTS/tts/models/neuralhmm_tts.py` and `TTS/tts/models/overflow.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TTS/tts/models/overflow.py:276` calls `store_inverse` and `TTS/tts/models/neuralhmm_tts.py:260` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) TTS/tts/layers/tortoise/diffusion.py:914 — TTS/tts/layers/tortoise/diffusion.py:914-948 | TTS/tts/layers/tortoise/diffusion.py:986-1020 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) TTS/tts/models/base_tts.py:129 — TTS/tts/models/base_tts.py:129-161 | TTS/vc/models/base_vc.py:117-149 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) TTS/tts/models/base_tts.py:80 — TTS/tts/models/base_tts.py:80-110 | TTS/vc/models/base_vc.py:68-98 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29–30 lines × 2) · ×1
  • Duplicated block (29–30 lines × 2) TTS/tts/layers/tortoise/autoregressive.py:119 — TTS/tts/layers/tortoise/autoregressive.py:119-148 | TTS/tts/layers/xtts/gpt_inference.py:96-124 — before extracting anything, compare `TTS/tts/layers/tortoise/autoregressive.py` and `TTS/tts/layers/xtts/gpt_inference.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/tortoise/autoregressive.py:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) TTS/tts/models/tacotron.py:223 — TTS/tts/models/tacotron.py:223-251 | TTS/tts/models/tacotron2.py:250-278 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) TTS/encoder/models/resnet.py:99 — TTS/encoder/models/resnet.py:99-121 | TTS/tts/layers/xtts/hifigan_decoder.py:468-492 — before extracting anything, compare `TTS/encoder/models/resnet.py` and `TTS/tts/layers/xtts/hifigan_decoder.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/encoder/models/resnet.py:99` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) TTS/tts/models/base_tts.py:337 — TTS/tts/models/base_tts.py:337-361 | TTS/vc/models/base_vc.py:325-349 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–24 lines × 3) · ×1
  • Duplicated block (13–24 lines × 3) TTS/demos/xtts_ft_demo/utils/gpt_train.py:126 — TTS/demos/xtts_ft_demo/utils/gpt_train.py:126-138 | recipes/ljspeech/xtts_v1/train_gpt_xtts.py:128-151 | recipes/ljspeech/xtts_v2/train_gpt_xtts.py:128-151 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/demos/xtts_ft_demo/utils/gpt_train.py:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) TTS/tts/models/base_tts.py:117 — TTS/tts/models/base_tts.py:117-138 | TTS/tts/models/vits.py:1380-1401 | TTS/vc/models/base_vc.py:105-126 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) TTS/tts/layers/losses.py:22 — TTS/tts/layers/losses.py:22-43 | TTS/tts/layers/losses.py:61-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) TTS/tts/layers/xtts/stream_generator.py:375 — TTS/tts/layers/xtts/stream_generator.py:375-395 | TTS/tts/layers/xtts/stream_generator.py:401-420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/xtts/stream_generator.py:375` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) TTS/tts/models/base_tts.py:421 — TTS/tts/models/base_tts.py:421-441 | TTS/vc/models/base_vc.py:409-429 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) TTS/tts/models/delightful_tts.py:175 — TTS/tts/models/delightful_tts.py:175-193 | TTS/tts/models/delightful_tts.py:270-288 | TTS/tts/models/vits.py:117-135 | TTS/tts/models/vits.py:185-203 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) TTS/tts/models/tacotron.py:156 — TTS/tts/models/tacotron.py:156-173 | TTS/tts/models/tacotron2.py:175-193 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/tacotron.py:156` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) TTS/tts/models/tacotron.py:43 — TTS/tts/models/tacotron.py:43-60 | TTS/tts/models/tacotron2.py:59-74 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TTS/tts/models/tacotron.py:61` calls `normal_` and `TTS/tts/models/tacotron2.py:77` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) TTS/tts/models/tacotron.py:87 — TTS/tts/models/tacotron.py:87-104 | TTS/tts/models/tacotron2.py:99-116 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/tacotron.py:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) TTS/tts/layers/xtts/hifigan_decoder.py:230 — TTS/tts/layers/xtts/hifigan_decoder.py:230-246 | TTS/vc/models/freevc.py:107-123 | TTS/vocoder/models/hifigan_generator.py:206-222 — before extracting anything, compare `TTS/tts/layers/xtts/hifigan_decoder.py` and `TTS/vocoder/models/hifigan_generator.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) TTS/tts/models/delightful_tts.py:1400 — TTS/tts/models/delightful_tts.py:1400-1414 | TTS/tts/models/vits.py:1549-1565 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) TTS/tts/models/neuralhmm_tts.py:80 — TTS/tts/models/neuralhmm_tts.py:80-96 | TTS/tts/models/overflow.py:79-95 — before extracting anything, compare `TTS/tts/models/neuralhmm_tts.py` and `TTS/tts/models/overflow.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×1
  • Duplicated block (16 lines × 5) TTS/tts/configs/delightful_tts_config.py:155 — TTS/tts/configs/delightful_tts_config.py:155-170 | TTS/tts/configs/fast_pitch_config.py:168-183 | TTS/tts/configs/fast_speech_config.py:162-177 | TTS/tts/configs/fastspeech2_config.py:183-198 | TTS/tts/configs/speedy_speech_config.py:179-194 — before extracting anything, compare `TTS/tts/configs/fast_pitch_config.py` and `TTS/tts/configs/fast_speech_config.py` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) TTS/tts/models/base_tacotron.py:157 — TTS/tts/models/base_tacotron.py:157-172 | TTS/tts/models/base_tts.py:400-415 | TTS/tts/models/glow_tts.py:491-506 | TTS/vc/models/base_vc.py:388-403 — before extracting anything, compare `TTS/tts/models/base_tts.py` and `TTS/vc/models/base_vc.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/base_tacotron.py:157` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) TTS/tts/layers/tortoise/diffusion.py:646 — TTS/tts/layers/tortoise/diffusion.py:646-661 | TTS/tts/layers/tortoise/diffusion.py:800-813 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) TTS/tts/layers/delightful_tts/conv_layers.py:646 — TTS/tts/layers/delightful_tts/conv_layers.py:646-659 | TTS/tts/layers/tortoise/vocoder.py:249-262 | TTS/vocoder/layers/lvc_block.py:182-195 — before extracting anything, compare `TTS/tts/layers/delightful_tts/conv_layers.py` and `TTS/tts/layers/tortoise/vocoder.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) TTS/tts/models/tacotron.py:361 — TTS/tts/models/tacotron.py:361-374 | TTS/tts/models/tacotron2.py:386-397 — before extracting anything, compare `TTS/tts/models/tacotron.py` and `TTS/tts/models/tacotron2.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TTS/tts/models/tacotron.py:359` calls `cpu`, `numpy` and `TTS/tts/models/tacotron2.py:384` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) TTS/tts/models/delightful_tts.py:164 — TTS/tts/models/delightful_tts.py:164-176 | TTS/tts/models/vits.py:106-118 | TTS/vc/modules/freevc/mel_processing.py:41-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/delightful_tts.py:164` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) TTS/tts/layers/bark/model.py:29 — TTS/tts/layers/bark/model.py:29-41 | TTS/tts/layers/bark/model_fine.py:18-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) TTS/tts/layers/xtts/hifigan_decoder.py:289 — TTS/tts/layers/xtts/hifigan_decoder.py:289-299 | TTS/vc/models/freevc.py:141-152 | TTS/vocoder/models/hifigan_generator.py:255-265 — before extracting anything, compare `TTS/tts/layers/xtts/hifigan_decoder.py` and `TTS/vocoder/models/hifigan_generator.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) TTS/tts/layers/xtts/stream_generator.py:426 — TTS/tts/layers/xtts/stream_generator.py:426-437 | TTS/tts/layers/xtts/stream_generator.py:500-512 | TTS/tts/layers/xtts/stream_generator.py:545-558 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/xtts/stream_generator.py:426` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TTS/tts/layers/xtts/stream_generator.py:515` calls `ValueError` and `TTS/tts/layers/xtts/stream_generator.py:439` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (4–12 lines × 3) · ×1
  • Duplicated block (4–12 lines × 3) TTS/tts/layers/delightful_tts/acoustic_model.py:232 — TTS/tts/layers/delightful_tts/acoustic_model.py:232-249 | TTS/tts/models/align_tts.py:174-177 | TTS/tts/models/forward_tts.py:312-323 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) TTS/tts/models/align_tts.py:368 — TTS/tts/models/align_tts.py:368-378 | TTS/tts/models/delightful_tts.py:1046-1056 | TTS/tts/models/glow_tts.py:441-451 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) TTS/tts/models/delightful_tts.py:282 — TTS/tts/models/delightful_tts.py:282-291 | TTS/tts/models/vits.py:197-206 | TTS/vc/modules/freevc/mel_processing.py:112-122 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/delightful_tts.py:282` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) REDACTED:379 — REDACTED:379-389 | REDACTED:576-585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:586` calls `replace` and `REDACTED:391` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–10 lines × 4) · ×1
  • Duplicated block (8–10 lines × 4) REDACTED:192 — REDACTED:192-201 | REDACTED:227-236 | REDACTED:259-268 | REDACTED:618-625 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–10 lines × 3) · ×1
  • Duplicated block (7–10 lines × 3) TTS/tts/layers/delightful_tts/conformer.py:444 — TTS/tts/layers/delightful_tts/conformer.py:444-450 | TTS/tts/layers/delightful_tts/networks.py:122-131 | TTS/tts/layers/tacotron/gst_layers.py:141-149 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (6–10 lines × 3) · ×1
  • Duplicated block (6–10 lines × 3) TTS/tts/models/delightful_tts.py:261 — TTS/tts/models/delightful_tts.py:261-266 | TTS/tts/models/vits.py:170-179 | TTS/vc/modules/freevc/mel_processing.py:87-96 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TTS/tts/models/vits.py:180` calls `librosa_mel_fn` and `TTS/tts/models/delightful_tts.py:266` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) TTS/utils/manage.py:132 — TTS/utils/manage.py:132-139 | TTS/utils/manage.py:154-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) REDACTED:276 — REDACTED:276-284 | REDACTED:634-642 | REDACTED:647-655 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) TTS/tts/models/delightful_tts.py:974 — TTS/tts/models/delightful_tts.py:974-982 | TTS/tts/models/delightful_tts.py:1164-1171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/models/delightful_tts.py:974` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) TTS/tts/models/align_tts.py:366 — TTS/tts/models/align_tts.py:366-372 | TTS/tts/models/forward_tts.py:770-776 | TTS/tts/models/tacotron.py:355-361 | TTS/tts/models/tacotron2.py:382-388 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TTS/tts/models/tacotron.py:362` calls `cpu`, `numpy` and `TTS/tts/models/align_tts.py:374` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) REDACTED:97 — REDACTED:97-102 | REDACTED:275-280 | REDACTED:633-638 | REDACTED:646-651 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) TTS/tts/layers/tortoise/arch_utils.py:274 — TTS/tts/layers/tortoise/arch_utils.py:274-279 | TTS/tts/layers/tortoise/classifier.py:97-101 — before extracting anything, compare `TTS/tts/layers/tortoise/arch_utils.py` and `TTS/tts/layers/tortoise/classifier.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/tts/layers/tortoise/arch_utils.py:274` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–5 lines × 5) · ×1
  • Duplicated block (4–5 lines × 5) TTS/tts/models/delightful_tts.py:304 — TTS/tts/models/delightful_tts.py:304-307 | TTS/tts/models/vits.py:236-239 | TTS/tts/utils/data.py:75-79 | TTS/tts/utils/languages.py:120-125 | TTS/tts/utils/speakers.py:218-222 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) TTS/demos/xtts_ft_demo/utils/gpt_train.py:52 — TTS/demos/xtts_ft_demo/utils/gpt_train.py:52-57 | TTS/demos/xtts_ft_demo/utils/gpt_train.py:68-74 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TTS/demos/xtts_ft_demo/utils/gpt_train.py:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TTS/demos/xtts_ft_demo/utils/gpt_train.py:67` calls `join`, `basename` and `TTS/demos/xtts_ft_demo/utils/gpt_train.py:49` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×1
  • Swallowed exception (caught, then discarded) TTS/tts/layers/xtts/trainer/dataset.py:85 — `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Minor — 288 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×223
  • Orphaned file TTS/tts/layers/xtts/zh_num2words.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/tortoise/diffusion.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/models/tortoise.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/tortoise/xtransformers.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/datasets/dataset.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/models/forward_tts.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/losses.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/models/xtts.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/vc/modules/freevc/wavlm/modules.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/xtts/tokenizer.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/utils/manage.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/bark/inference_funcs.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/vocoder/models/wavernn.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/xtts/hifigan_decoder.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/overflow/neural_hmm.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/tortoise/autoregressive.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/models/glow_tts.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/delightful_tts/conv_layers.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/utils/audio/processor.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/tts/layers/delightful_tts/acoustic_model.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/utils/synthesizer.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/vc/models/freevc.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file TTS/api.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 198 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate TTS/tts/models/base_tts.py:104 — `"d_vector_dim" in config and config.d_vector_dim is not None` appears character-identically in 3 files — TTS/tts/models/base_tts.py, TTS/tts/models/glow_tts.py, TTS/vc/models/base_vc.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/layers/delightful_tts/acoustic_model.py:184 — `"d_vectors" in aux_input and aux_input["d_vectors"] is not None` appears character-identically in 2 files — TTS/tts/layers/delightful_tts/acoustic_model.py, TTS/tts/models/vits.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/layers/delightful_tts/acoustic_model.py:189 — `"durations" in aux_input and aux_input["durations"] is not None` appears character-identically in 2 files — TTS/tts/layers/delightful_tts/acoustic_model.py, TTS/tts/models/vits.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/layers/delightful_tts/acoustic_model.py:180 — `"speaker_ids" in aux_input and aux_input["speaker_ids"] is not None` appears character-identically in 2 files — TTS/tts/layers/delightful_tts/acoustic_model.py, TTS/tts/models/vits.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/layers/tortoise/autoregressive.py:65 — `attention_mask is not None and position_ids is None` appears character-identically in 2 files — TTS/tts/layers/tortoise/autoregressive.py, TTS/tts/layers/xtts/gpt_inference.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/layers/xtts/hifigan_decoder.py:399 — `c.has("reinit_layers") and c.reinit_layers is not None` appears character-identically in 2 files — TTS/tts/layers/xtts/hifigan_decoder.py, TTS/utils/generic_utils.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/base_tts.py:317 — `config.model.lower() == "tacotron" or config.compute_linear_spec` appears character-identically in 2 files — TTS/tts/models/base_tts.py, TTS/vc/models/base_vc.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/base_tts.py:107 — `config.use_speaker_embedding and not config.use_d_vector_file` appears character-identically in 4 files — TTS/tts/models/base_tts.py, TTS/tts/models/forward_tts.py, TTS/tts/models/glow_tts.py, TTS/vc/models/base_vc.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/base_tts.py:102 — `config.use_speaker_embedding or config.use_d_vector_file` appears character-identically in 2 files — TTS/tts/models/base_tts.py, TTS/vc/models/base_vc.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/encoder/models/base_encoder.py:134 — `criterion is not None and "criterion" in state` appears character-identically in 2 files — TTS/encoder/models/base_encoder.py, TTS/tts/layers/xtts/hifigan_decoder.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/layers/delightful_tts/acoustic_model.py:202 — `d_vectors is not None and speaker_ids is not None` appears character-identically in 4 files — TTS/tts/layers/delightful_tts/acoustic_model.py, TTS/tts/models/forward_tts.py, TTS/tts/models/glow_tts.py, TTS/tts/models/vits.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/layers/glow_tts/duration_predictor.py:44 — `language_emb_dim != 0 and language_emb_dim is not None` appears character-identically in 2 files — TTS/tts/layers/glow_tts/duration_predictor.py, TTS/tts/layers/vits/stochastic_duration_predictor.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/delightful_tts.py:417 — `len(token_ids) > self.max_text_len or wav.shape[1] < self.min_audio_len` appears character-identically in 2 files — TTS/tts/models/delightful_tts.py, TTS/tts/models/vits.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate recipes/ljspeech/xtts_v1/train_gpt_xtts.py:52 — `not os.path.isfile(DVAE_CHECKPOINT) or not os.path.isfile(MEL_NORM_FILE)` appears character-identically in 2 files — recipes/ljspeech/xtts_v1/train_gpt_xtts.py, recipes/ljspeech/xtts_v2/train_gpt_xtts.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate recipes/ljspeech/xtts_v1/train_gpt_xtts.py:66 — `not os.path.isfile(TOKENIZER_FILE) or not os.path.isfile(XTTS_CHECKPOINT)` appears character-identically in 2 files — recipes/ljspeech/xtts_v1/train_gpt_xtts.py, recipes/ljspeech/xtts_v2/train_gpt_xtts.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/neuralhmm_tts.py:265 — `not os.path.isfile(trainer.config.mel_statistics_parameter_path) or trainer.config.force_generate_statistics` appears character-identically in 2 files — TTS/tts/models/neuralhmm_tts.py, TTS/tts/models/overflow.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/tacotron.py:373 — `self.bidirectional_decoder or self.double_decoder_consistency` appears character-identically in 2 files — TTS/tts/models/tacotron.py, TTS/tts/models/tacotron2.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/base_tacotron.py:53 — `self.capacitron_vae and self.use_capacitron_vae` appears character-identically in 3 files — TTS/tts/models/base_tacotron.py, TTS/tts/models/tacotron.py, TTS/tts/models/tacotron2.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/configs/delightful_tts_config.py:167 — `self.d_vector_dim is not None and self.d_vector_dim > 0` appears character-identically in 5 files — TTS/tts/configs/delightful_tts_config.py, TTS/tts/configs/fast_pitch_config.py, TTS/tts/configs/fast_speech_config.py, TTS/tts/configs/fastspeech2_config.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/base_tts.py:152 — `self.language_manager is not None and config.use_language_embedding and language_name is not None` appears character-identically in 2 files — TTS/tts/models/base_tts.py, TTS/vc/models/base_vc.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/neuralhmm_tts.py:106 — `self.mean.item() == 0 or self.std.item() == 1` appears character-identically in 2 files — TTS/tts/models/neuralhmm_tts.py, TTS/tts/models/overflow.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/delightful_tts.py:1333 — `self.speaker_manager is not None and self.speaker_manager.embeddings and self.args.use_d_vector_file` appears character-identically in 2 files — TTS/tts/models/delightful_tts.py, TTS/tts/models/vits.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/vocoder/datasets/gan_dataset.py:114 — `self.use_cache and self.cache[idx] is not None` appears character-identically in 2 files — TTS/vocoder/datasets/gan_dataset.py, TTS/vocoder/datasets/wavegrad_dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/vocoder/datasets/gan_dataset.py:150 — `self.use_noise_augment and self.is_training and self.return_segments` appears character-identically in 2 files — TTS/vocoder/datasets/gan_dataset.py, TTS/vocoder/datasets/wavegrad_dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate TTS/tts/models/tacotron.py:49 — `self.use_speaker_embedding or self.use_d_vector_file` appears character-identically in 2 files — TTS/tts/models/tacotron.py, TTS/tts/models/tacotron2.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X4 · Structured logging · Interpolated log message defeats structured logging · ×10
  • Interpolated log message defeats structured logging REDACTED:121 — `info` at line 121 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:123 — `info` at line 123 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:137 — `info` at line 137 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:140 — `error` at line 140 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:95 — `info` at line 95 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:115 — `warning` at line 115 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:118 — `info` at line 118 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:155 — `info` at line 155 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging TTS/tts/layers/bark/inference_funcs.py:207 — `warning` at line 207 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:224 — `info` at line 224 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
M4 · Documentation accuracy · README/code drift · ×4
  • README/code drift docs/source/finetuning.md:91 — docs/source/finetuning.md names `train_tts.py`, but no file or folder `train_tts.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/source/implementing_a_new_model.md:5 — docs/source/implementing_a_new_model.md names `TTS/tts/layers/new_model.py`, but no file or folder `TTS/tts/layers/new_model.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/source/implementing_a_new_model.md:5 — docs/source/implementing_a_new_model.md names `TTS/tts/model/new_model.py`, but no file or folder `TTS/tts/model/new_model.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/source/tutorial_for_nervous_beginners.md:101 — docs/source/tutorial_for_nervous_beginners.md names `train_vocoder.py`, but no file or folder `train_vocoder.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file TTS/tts/models/vits.py:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file TTS/tts/layers/tortoise/dpm_solver.py:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file TTS/tts/models/delightful_tts.py:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D31 · IaC & Container Security · Low IaC · ×2
  • REDACTED
  • REDACTED
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 5.0/10. The most over is `(repository root)` (55148 LoC, 613 module-visible types across 48 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Dormant codebase · ×1
  • Dormant codebase — 226 of 226 significant files have no living knowledge — the codebase as a whole is dormant, not 226 separate risks. Counted over 226 of the 325 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 23416 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Minor — 5 finding(s)
D12 · Dependency Hygiene · Outdated · ×5
  • Outdated: bokeh — `bokeh` is pinned to 1.4.0, but 3.10.1 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.4.0 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: gruut — `gruut` is pinned to 2.2.3, but 2.4.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 2.2.3 until the declaration is edited.
  • Outdated: mecab-python3 — `mecab-python3` is pinned to 1.0.6, but 1.0.12 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.0.6 until the declaration is edited.
  • Outdated: mutagen — `mutagen` is pinned to 1.47.0, but 1.48.1 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.47.0 until the declaration is edited.
  • Outdated: numba — `numba` is pinned to 0.55.1, but 0.68.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 0.55.1 until the declaration is edited.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a795311692bb4136870a26854ed90991/history.json --exit-code 0 --source .322artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a795311692bb4136870a26854ed90991/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .97artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .3artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .14artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a17125-6be8-7c89-95c0-412771637dde · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md