Repository navigation
fix(normalizer): read uppercase HTTPS:// as https - #608
Merged
remsky merged 2 commits intoNov 21, 2026
Merged
Conversation
The protocol check looked for a lowercase "https" while the match is case-insensitive, so HTTPS:// and Https:// were read as "http". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks for the fix, cheers; merging in |
KevinSJ
added a commit
to KevinSJ/Kokoro-FastAPI-zh
that referenced
this pull request
Dec 2, 2026
…ing Chinese support (#3) * fix(rocm): persist MIOpen cache and add FIND_MODE=2 default +warmup script (#469) * chore(release): bump and minor docs, release notes * fix(webui): bounded buffer to resolve 10 minute crashout, player state short ciruit on no-up updates to preserve responsiveness on long sessions. (#471) * feat(api): add POST /dev/unload to release model from GPU VRAM (#474) * feat(api): add POST /dev/unload to release model from GPU VRAM Allows homelab deployments to free GPU memory when the TTS service is idle without stopping the container. The model reloads lazily on the next request. - ModelManager.unload(): acquires lock, calls backend.unload(), nulls _backend, then calls torch.cuda.empty_cache() if CUDA is available - ModelManager.generate(): lazy reinit when _backend is None (calls initialize() + load_model()) instead of raising RuntimeError - POST /dev/unload: 200 on success, 503 if manager not initialised, 500 on unexpected error - TTSService.model_manager annotated as Optional[ModelManager] for correct mypy narrowing at the endpoint - Full test coverage in api/tests/test_model_unload.py (11 tests) Closes #473 (partial) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(model-unload): lazy reload on next request after /dev/unload Add ensure_backend() to ModelManager which reinitialises the backend and reloads the model if /dev/unload was called. All three get_backend() call sites in tts_service now await ensure_backend() first, so the first TTS request after an unload reloads the model automatically rather than raising RuntimeError: Backend not initialized. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(model-unload): add double-checked locking to ensure_backend() Addresses review feedback: the original lazy-reload in generate() ran without a lock, so a burst of requests landing while _backend is None could trigger multiple concurrent initialize()/load_model() calls. - ensure_backend(): fast-path check outside lock, then re-check inside _lock before initializing (double-checked locking pattern) - generate(): routes through ensure_backend() instead of inline check, eliminating the duplicate code path - test_ensure_backend_serializes_concurrent_reloads: 5-way concurrent gather confirms only one initialize/load_model cycle fires Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(benchmarks): add model unload benchmarking script and update README with VRAM reclaim details * fix(audio): implement audio file source swapping for stream playback and seeking (#475) Re: discussions/150 * chore: actions bumps + ruff formatting -checkout@v4 → v5, setup-buildx-action@v3 → v4 across all workflows. -Ruff formatting pass: quote style, import order, line length. * chore(release): bump to v0.5.0, new endpoint, UI features * fix(mappings): update voice mappings for consistency, add missing audio file for 'bf_isabella' (#480) * fix(dev-unload): Prevent POST /dev/unload behind an opt-in setting (#483) Currently /dev/unload is mounted by default with no authentication, so any caller that can reach the API can unload the active model from memory and can possibly force repeated reload cycles (#478). Add an 'allow_dev_unload' setting (default False) and return 403 when disabled, so the endpoint is off by default and can be re-enabled with ALLOW_DEV_UNLOAD=true for trusted deployments. * fix: word timestamps for non-English (espeak) voices in captioned_speech (#484) KPipeline only attaches timed tokens for English (misaki) voices, so /dev/captioned_speech silently returned timestamps: null for Spanish, French, Italian, Hindi and Portuguese. The model does predict a duration for every phoneme in every language (pred_dur) - the audio is rendered from exactly those durations - but the espeak path discarded them. Derive word timestamps for espeak pipelines from pred_dur directly: pred_dur[0] is BOS and pred_dur[1+i] covers phonemes[i], so summing per-character durations and splitting at the phoneme string's spaces yields exact word times. Words espeak expands into several spoken words (e.g. "1863") are reconciled by re-phonemizing per word; if counts still disagree, no timestamps are emitted (previous behavior). English is untouched, and ja/zh (non-espeak G2Ps, no space-separated word groups) deliberately keep the previous behavior. Fixes #331 Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * fix(debug-endpoints): gate /debug/* introspection routes behind ENABLE_DEBUG_ENDPOINTS, documentation * chore(release): bump to v0.6.0, opt-in dev/debug endpoints, voice + timestamp fixes * chore(ci): bump docker/login-action to v4, re: node 20 deprecation warnings * build(docker, python): python 3.12, image optimizations * doc(agents): include AGENTS.md for agent contributor guidelines, add SKILL.md files for API, benchmarks, and web contributions; * test(benchmarks): split transcription reports by device, refresh rtf + first-token baselines * chore(python): loosen floor to maintain 3.10-3.11 support, 3.12 for images maintained * doc(benchmarks): fix unneeded bestfit line, minor tweaks, skill notes. * build(docker, python): better files verification, drop unused deps, harden against dep duplications * chore(docs): bump version to 0.7.0-rc1, update changelog, and refine README * build(docker, rocm): add model download script and adjust Dockerfile for local model baking * fix: prevent ReDoS in text normalizer (URL/email/acronym patterns) (#489) * fix: prevent ReDoS in text normalizer (URL/email/acronym patterns) normalize_text() runs synchronously in the request path, so a single request of adversarial text could pin the event loop for tens of seconds via catastrophic regex backtracking: - URL_PATTERN: the domain branch '[a-zA-Z0-9.-]+' rescanned the whole tail from every position of a long word-char run (100KB of 'a' -> the normalizer hung). Added a token-start negative lookbehind and bounded the domain run to 253 chars (DNS limit). - EMAIL_PATTERN: unbounded local/domain runs scanned for '@' from every word boundary of an 'a.a.a...' flood. Bounded to RFC lengths (64/253). - Dotted-acronym handler '(?:[A-Za-z]\.){2,} [a-z]': unbounded '{2,}' backtracked O(n) per position on an 'a.a...' flood. Bounded to {2,12} (real acronyms are short); 'U.S.A. b' -> 'U-S-A- b' behavior preserved. Worst cases drop from 10-65s to <0.1s at 100KB. Adds api/tests/test_normalizer_redos.py covering each vector plus a linear-scaling guard; existing normalizer tests unchanged. * fix: simplify URL_PATTERN prefix to avoid empty-alternative '+' Reviewer flagged (https?://|www\.|)+ — a '+' quantifier over a group with an empty alternative, a ReDoS smell and needlessly non-deterministic. Rewrite as two optionals (?:https?://)?(?:www\.)? — deterministic, same accepted URLs. handle_url uses only group(0), so dropping the capturing group is safe. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: trim exposition comments per maintainer review Condense the ReDoS-fix comments to one terse line each — keep the load-bearing 'why bounded' so the limits aren't removed later, drop the exposition. * fix(audio): improve error handling for aborted audio streams - Add graceful handling for AbortError in stream requests - Enhance audio error logging with detailed error info - Prevent playbackUnavailable dispatch for user-aborted playback * fix(normalizer): expand wh-word 're contractions espeak voices as -ray (#488) * doc(changelog, readme): simplify copy commands for docker run, banner update * build(ci): keep Python 3.10 to CI matrix for testing compatibility * docs(readme): bump commit limit on glyph * docs(readme): adjust README.md * chore(deps): drop dead docs pin set, unpin regex, bump requests + dotenv * build(deps): track root uv.lock, cap transformers below 6 * fix(paths): harden _find_file to stay contained to its search roots * fix(normalizer): anchor decimal regex to prevent backtracking on digit floods * fix(normalizer): move range sub before NUMBER_PATTERN to fix minus handling * fix(normalizer): handle version-like numbers before NUMBER_PATTERN splits * chore(changelog): update changelog with recent dependency and fix entries * fix(dependencies): update fastapi to 0.116.1 and pin starlette dependency to avoid CVE * chore(workflows): permissions on CI, release, and test_build workflows * fix(normalizer): expand apostrophe-less "'re" contractions #488 missed the bare spellings (howre, youre, theyre), which espeak gives the same "-ray" ending. Word list differs from #488: "you"/"they" added, "who"/"we" dropped because "whore" and "were" are real words. * fix(download_model): checksum verification for downloaded model files, avoid clobbering pre-existing model files * fix(changelog): update model validation details for consistency and error handling * fix(paths): allow operator symlinks in search roots, keep traversal containment * chore(dev): cleanup dev cruft folder * chore(release): bump to v0.7.0 * docs(changelog): added more detail, size tables * docs(changelog): add table label * fix(web): assorted UI tweaks, responsiveness, animation * feat(web,accessibility): enhance keyboard navigation and ARIA attributes for improved accessibility * feat(web): improve styling, responsiveness * fix(web download): voice-timestamp as download names, associated url handling * fix(web): pin playbar to bottom on slim view, responsive fixes, redesign tweaks * refactor(web): update README visuals, adjust PlayerControls and TextEditor logic, and clean up CSS styles * refactor(web): dedupe audio error listeners into shared handler * docs: add AMD GPU (ROCm) troubleshooting section to README and update docker-compose.yml comments * chore: update version to 0.7.1 and enhance changelog with new features and fixes * fix(audio): read finalize buffer before close except for ogg, fixes flac tail loss (#497) * chore(version, docs): bump interim version to incorporate buffer fix. * build: bump fastapi and pin starlette>=1.3.1 to fix CVE-2025-62727 Starlette 0.47.3 (resolved by fastapi==0.116.1's <0.48 cap) has CVE-2025-62727: quadratic Range-header parsing in FileResponse enables unauthenticated DoS. This service serves audio via FileResponse, making it directly reachable. Bump fastapi to latest and floor starlette at >=1.3.1 (patched). * ci(docker): switch build cache from GHA to GHCR registry to allow public use, add uv cache mounts, reorder test-client layers * fix(api): turn off CORS credentials for starlette 1.x re: starlette >=1.0 echoes the caller's origin with allow-credentials: true where 0.47 returned "*". nothing here uses cookies or auth, so allow_credentials=False keeps the old behavior by default * chore(release): bump to v0.7.2, starlette CVE fix, CORS credentials off, flac/wav tail fix * build(cache): wire compose builds to the GHCR cache, make cache export non-fatal * chore: normalize line endings to lf so windows builds hit the ghcr cache * chore: remove legacy gradio ui code * feat(multi-speaker): add inline multi-speaker support, voice alias mappings, read-along scrobbing in web ui (#502) * feat: implement multi-speaker dialogue support with inline voice tags and new endpoint * feat: multi-speaker dialogue examples and benchmarking scripts * feat: add support for alias fields in DialogueRequest and DialogueTurn schemas * feat: multi-speaker voice timestamps/captioning and example script * feat: implement voice tag functionality with UI toggle, insertion, and stripping logic * feat(multivoice web): voice chip/cast creation, management * chore(VoiceCombineRequest): drop legacy/unreachable list branch from voice parser * chore(web badges): swap in SVG so offline doesnt break links, minor tweaks * feat(web): pin generate bar on narrow screens, swap text for play/pause icons, minor tweaks * fix(web): narrow view UI layout fixes * feat(web, multivoice): tightened voice tag management with tabbed interface, bump version to 0.8.0-rc1 * feat(voice aliases): implement case-insensitive alias matching and improve the UI handling * feat(web): save/import of voice tag aliases * fix(voice tags): added as opt-in, adjusting tag handling, review fixes - blank dialogue turns 422 at the schema; tags-only input is a 400, not an IndexError 500 - ENABLE_VOICE_TAGS=false kill switch (403), for deployments passing untrusted text through - captioned timestamps omit voice entirely when tags are off, so existing responses stay byte-identical - web: cast name checks fold case like the server, so AF_Bella cannot shadow af_bella - web: cast names anchored to the tag pattern, no leading dash - web: leaving the tags tab restores the staged voice, not cast[0] - web: editing a mix onto an existing member merges chips instead of twinning them - web: imports reject mixes with empty +-parts instead of letting them 400 at generationentirely when tags are off, so existing responses stay byte-identical - web: cast name checks fold case like the server, so AF_Bella cannot shadow af_bella - web: cast names anchored to the tag pattern, no leading dash - web: leaving the tags tab restores the staged voice, not cast[0] * chore: minor cleanup * fix: dialogue aliases and voice guards, audio teardown listener leak - web: detach playback listeners when releasing the audio element, a stale pause event could reset state for the replacement - api: dialogue accepts voice_aliases and forwards it to the speech path - api: empty voice after alias resolution is a 400, not an IndexError - api: dialogue turn voices are validated against the tag charset, so a voice cannot break out of its rendered tag - examples: caption script tolerates timestamps without a voice key - chore: sync uv.lock to 0.8.0rc1 * feat(web): cast import as merge or replace - the cast file menu offers Import (merge) and Import (replace) - merge keeps the old behavior, replace swaps the cast for the file's contents - replace leaves the text alone, tags for swapped-out members stay as written * feat(web): editor page jump and find/replace, invalid tag counts showni on cast replace * feat(read-along): implement approximate read-along, bidirectional UI and audio synchronization * fix(read-along): swap to file at read-along click instead of using buffered window; prevent missing sync points * fix(read-along): scrollable view for narrow layouts in read-along mode * feat(read-along): center highlighting, calibration attempt client side * feat(timing): implement timing X-Timing-Path, connect to read-along web synchronization * feat(timing): add chunk timing sidecar and voice tagging support in streaming audio generation * feat(web, temp-manager): temp file cleanup to remove associated sidecar file,: improve timing fetch error handling and state management * fix: tighten timing sidecar, web UI, temp file management * chore(temp-manager): fix nit on aiofiles.os * refactor(web): split AudioService into MsePipeline and BlockLoader * chore(inference): silence warnings by passing repo_id from settings to KModel/KPipeline * refactor: dedupe voice_aliases validators and 403 blocks, fix sci-notation pause tags, web menu keyboard + cleanup * docs: update README to include multi-speaker generation and WebUI features * docs: update README, added sections, badges, banner * docs(schemas): correct aac in response_format descriptions * docs(readme): updated banner * chore: remove unused ONNX settings from scripts * chore: update changelog with multi-speaker features and web UI enhancements * chore(changelog): ref voice studio work re: parallel work [#272](https://github.com/remsky/Kokoro-FastAPI/discussions/272) Co-Authored-By: radzrader <64661454+radzrader@users.noreply.github.com> * feat(ssml, speed/rate tag): initial crack at integrating speed param per voice, ssml compliance * feat(ssml): dedicated ssml router, shared rate clamp contract, alias rate visible + synced in web editor * feat: improve voice selector and tag handling * fix(ssml): keep block boundaries, drop <desc>, add provider corpus, translate documents with an xml prolog, refuse DTDs, 400 on deep nesting, cap nesting depth * feat(ssml, cleanup): ENABLE_SSML kill switch, drop legacy settings, documentation of config variables) * docs(readme, bump): * fix(web): anchor the cast menu to its Options button, float it in the top layer * feat(web): add cast pins, resize insert button and ordering * fix(web): filtering, edit mode opens name as well * fix(web): playback slider step size; smoothness * docs(readme): last model commit hash, downloads * docs(tests,cov): update tests and coverage badges * fix(web): drop auto-insert voice tag, enter key to save name, update related tests * docs(wiki): migrating wiki into general repo * feat(player): duration handling and update UI controls for audio playback * feat(web): swap to the finished file as soon as it exists, allow minor skip on swap/ * feat(web): seamless auto swap-to-file * feat(web): add duplicate to options, simplify suggested cast name rate to 3 digits * build(docker): bytecode compile, entrypoint fix for unraid/optimizations, lockfile alignment (#504) * feat(build, config): drop uv run on entrypoint, add max_pause_duration_s setting, update SSML processing fix(web): wire volume control state back in to AudioService * build(docker): byte code compile, frozen lockfile, drop uv/link mode, ffmpeg pydub from runtime deps * docs(changelog): clarify multi-speaker input details and endpoint descriptions * feat(ssml): adjust rate tag semantics to scale speaking pace and introduce baserate tag * fix(ssml, web): SSML root validation, rate validation in VoiceSelector * feat(ssml): ssml flag on the speech endpoints, one call to translate and synthesize * chore(release): bump to v0.8.0; multi-speaker voice tags, SSML translation endpoint, read-along web UI * fix(uv direct run deps): pyopenjtalk-plus on native Windows, avoids MSVC (#508); pending swapover after multi-platform image testing * docs(changelog): pyopenjtalk-plus on native Windows (#508) * fix(schema, pause overflow): caps total pause duration, input length, volume_multiplier, validates lang_code (#511) * fix(schemas): bound volume_multiplier and validate lang_code on speech requests * fix(security): cap aggregate pause duration and input length re: (GHSA-f64g-9jmv-pm22) * docs(changelog): pause and request limits documented * chore(debug logs): swap 'split' for 'synthesis' in the wording to clarify log intent * fix(voices): combine endpoint accepts weighted syntax, matching speech endpoints (#285) (#512) * feat(time-to-first-audio): lazy phonemization in get_sentence_info (#513) * docs(env vars): uvicorn concurrency worker counts * feat(time-to-first-audio): lazy phonemization in get_sentence_info - Changed get_sentence_info to yield sentences lazily instead of accumulating results, reducing time to first audio chunk. - Introduced benchmark script to compare time to first audio chunk between eager and lazy phonemization. - Added tests to ensure lazy phonemization works as intended and does not phonemize the entire input upfront. - Updated existing tests to accommodate changes in get_sentence_info. * docs(benchmark): update benchmark plots with new stats * docs(changelog): minor wording tweaks * docs(skills): add integration test guidance skill * chore(release): bump to v0.8.1, lazy phonemization, pause/input limits, weighted voice combine * chore(docs) drop detailed notes as cruft * fix: honour default_voice_code in _split_multi_voice (issue #514) (#515) _split_multi_voice computed segment_lang as the first letter of the voice name when no explicit lang_code was provided, bypassing settings.default_voice_code entirely. This caused voices whose filename does not begin with a valid Kokoro language code to be routed to the wrong pipeline, returning empty audio (HTTP 200 with a zero-byte body). Mirror the precedence used in kokoro_v1.py: lang_code > settings.default_voice_code > voice[:1] Add two unit tests to guard the fix and the existing explicit-wins case. Fixes #514 Signed-off-by: Christian-Sidak <61099993+Christian-Sidak@users.noreply.github.com> * fix: phonemes default voice code (#516) * fix: ensures default_voice_code is used in phoneme generation * chore(version): bump interim version * docs(changelog): added default voice code entry * feat(api, web ui): include voice grades on the voice listing endpoint (#517) * feat: add voice grades and update voice listing endpoint * feat(web): update voice dropdown to display grade and info * docs(readme): add temporary link to Inno model until integration * docs(readme): minor wording adjustment, badge bump * feat(api): optional model auto-unload after idle timeout (#506) * Add model auto-unload controls * Schedule auto-unload after model load * Log model auto-unload timeout * simplify readme * reduce readme diff * remove added newline * Refine model auto-unload handling Centralize request timeout accounting into ModelManager.hold(). Use it for generate_from_phonemes(). Remove MODEL_AUTO_UNLOAD_ENABLED. Replace it with MODEL_AUTO_UNLOAD_TIMEOUT_SECONDS=0 is the default/off state. * changelog * readme Debug Endpoints, clarify that ALLOW_DEV_UNLOAD=true is needed. config.py inline comment on allow_dev_unload * Fix model_manager.hold test mock --------- Co-authored-by: brycehenson <brycehenson> * fix(chunking): replace regex sentence splitter with UAX #29 segmentation (#308, adapts #415) (#520) Co-authored-by: lionel-rowe <lionel-rowe@users.noreply.github.com> * fix(docker): honour HOST/PORT in entrypoint for IPv6 binds (#408), download_model defaults; drop api dev mount cruft (#522) * perf(rocm): disable MIOpen by default, add ENABLE_MIOPEN opt-in (#518) * ROCm performance: disable MIOpen, which compiles a kernel per shape. Kokoro's decoder length varies with the input text, so MIOpen recompiles on nearly every request. Measured on gfx1100 / ROCm 7.2: 2433ms per generation with MIOpen, 268ms without. Gated on torch.version.hip; KOKORO_ENABLE_MIOPEN=1 restores the old behaviour. Updates the ROCm troubleshooting section, whose warmup procedure now only applies when MIOpen is explicitly re-enabled. * ROCm performance: move the MIOpen switch to a settings field. * feat(web): add text normalization toggle to web UI settings (#523) * feat(web): add text normalization toggle to web UI settings * refactor(web): address review trims for normalization toggle styling and request building * docs(changelog): backfill 0.8.2 entries for #518, #520, #522, #523 * ci: upload coverage to Codecov, swap static badges, pin actions to sha, dependabot config * build(deps): bump nltk to 3.10.3, pygments, setuptools for dependabot alerts * chore: update version to 0.8.2, update docs and contributing.md * build(deps): bump the actions group with 5 updates (#524) Bumps the actions group with 5 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `5.1.0` | `7.0.1` | | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `5.4.2` | `10.0.1` | | [codecov/codecov-action](https://github.com/codecov/codecov-action) | `5.5.5` | `7.0.0` | | [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `2.6.2` | `3.0.3` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `6.19.2` | `7.3.0` | Updates `actions/checkout` from 5.1.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `astral-sh/setup-uv` from 5.4.2 to 10.0.1 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86...20cfd1bf945f4377ade1205e4dbc17946fc9a30d) Updates `codecov/codecov-action` from 5.5.5 to 7.0.0 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/0fb7174895f61a3b6b78fc075e0cd60383518dac...fb8b3582c8e4def4969c97caa2f19720cb33a72f) Updates `softprops/action-gh-release` from 2.6.2 to 3.0.3 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/3bb12739c298aeb8a4eeaf626c5b8d85266b0e65...efb35369e0ad2afab669f228072c1b0d510eae64) Updates `docker/build-push-action` from 6.19.2 to 7.3.0 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/10e90e3645eae34f1e60eeb005ba3a3d33f178e8...53b7df96c91f9c12dcc8a07bcb9ccacbed38856a) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: astral-sh/setup-uv dependency-version: 10.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: codecov/codecov-action dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: softprops/action-gh-release dependency-version: 3.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: docker/build-push-action dependency-version: 7.3.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: preserve paragraph breaks as sentence boundaries in normalizer (#525) The normalizer replaced all newlines with spaces unconditionally, merging paragraph-separated sections (headings, chapter titles, body text) into one continuous phrase with no prosodic pause. Convert double-newline paragraph breaks to a period before the newline-to-space pass: if the preceding non-whitespace character is already sentence-ending punctuation the period is omitted to avoid duplication. Single newlines continue to become spaces. Add tests covering the exact failure case from the issue report, no- double-punctuation, single newline, and multiple consecutive blank lines. Fixes #519 Signed-off-by: Christian-Sidak <61099993+Christian-Sidak@users.noreply.github.com> * fix(normalizer): 'F' is normalised to "farad" instead of "fahrenheit" (#526) VALID_UNITS declares the key "f" twice: "°f": "degree fahrenheit", "f": "degree fahrenheit", # L96, Temperature ... "f": "farad", # L121, Capacitance Python keeps the last binding, so the temperature entry is silently discarded and every bare "F" is spoken as farads: "It is 72 F outside" -> "It is 72 farads outside" The neighbouring "°c"/"c" pair shows the intent: each temperature unit is registered both with and without the degree sign, and "c" survives only because nothing else claims it. "°f" still works today; only the bare form is lost. This drops the capacitance entry so the bare "F" resolves to fahrenheit again. In prose fed to a TTS engine a bare "F" after a number is overwhelmingly Fahrenheit, and the prefixed capacitance units ("µf", "nf", "pf") are unaffected. Happy to flip it the other way, or to special-case one of them, if you would rather keep bare "F" as farad. Replaying UNIT_PATTERN.sub(handle_units, ...) with the real dict: input before after "It is 72 F outside" 72 farads 72 degrees fahrenheit "It is 72 °F outside" 72 degrees fahr. 72 degrees fahrenheit "It is 22 C outside" 22 degrees celsius 22 degrees celsius pyflakes reports "dictionary key 'f' repeated with different values" on lines 96 and 121 before the change and nothing after. * refactor(normalizer): per-language Normalizer classes, chunker sentence fixes, property/expanded tests * docs: contributing, agents.md, normalization skill and references * fix(normalizer): handle double dashes in text normalization and improve token processing * feat(normalizer): opt-in remove_emoji, 400 before streaming on unspeakable input (#353) * feat(web): normalization options menu in player * refactor(chunker): one packer for sentences and clauses, fix log ellipsis * test: captioned speech route, unexpected 500, timestamp guards * feat(normalizer): caps_normalization option, spoken phone numbers, hertz plurals, drop the 'S pass, emoji tag flags and joiners, web toggles (#353) * feat(web): voice list sorted by grade then name, DEFAULT_VOICE honoured * ci: web unit and playwright jobs on by default, editor and voice tag specs run on the fixture server, timeout on the python job * test: lock contention, decoded audio asserts, mse feeder unit test, pytest config dedup * docs: community projects list, stale paths and commands in AGENTS.md, CONTRIBUTING.md and the skills * ci: add live-model unit tests, broaden coverage * fix(normalizer): treat underscore as a word boundary in caps detection * test(web): silent wav for mse element, wait on search refocus * fix(web): voice search dropdown keys, clearable alias name, focus restore guard * test(web): shared e2e boot fixture, regression tests for the voice search fixes * style(ruff): clean up imports and error handling; enforce 'F' rule * fix(streaming): close audio writer and generator on client disconnect (#288, #337) (#533) * fix(streaming): close audio writer and generator on client disconnect (#288, #337) * ci: drop the preinstalled google-chrome apt source before installing deps * feat(voice-clone-tune): integrate Inno tuner, improve web ui * test(transient-voice): add monkeypatch for voices_dir in transient voice test * fix(tuning): decode reference clips in a child process, serialized tune requests * docs(release): remove release notes header * chore(release): bump to v0.9.0, inno voice tuning, normalizer rework, disconnect segfault fix * fix(tuner, web): catch scipy convergence bug with informative error message * build(deps): bump the actions group with 4 updates Bumps the actions group with 4 updates: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv), [codecov/codecov-action](https://github.com/codecov/codecov-action), [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) and [docker/build-push-action](https://github.com/docker/build-push-action). Updates `astral-sh/setup-uv` from 10.0.1 to 10.2.0 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/20cfd1bf945f4377ade1205e4dbc17946fc9a30d...c18668ad3cf93ea998bef934396af7bb5c839dc7) Updates `codecov/codecov-action` from 7.0.0 to 7.1.1 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/fb8b3582c8e4def4969c97caa2f19720cb33a72f...303a32d7a59b442fa8d48b6a1cc6825c09c847a5) Updates `docker/setup-buildx-action` from 4.3.0 to 4.4.1 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/37fe631027851001ddb9b187196cc803df7f5f0e...f87e5991a6d7451dcb8d9637bfbc97413f497069) Updates `docker/build-push-action` from 7.3.0 to 7.4.0 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/53b7df96c91f9c12dcc8a07bcb9ccacbed38856a...c3c9e263c25d99ce0380d002d59b67737d91b0dc) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 10.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: codecov/codecov-action dependency-version: 7.1.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: docker/setup-buildx-action dependency-version: 4.4.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: docker/build-push-action dependency-version: 7.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> * docs: point the Zotero-TTS link at its new name, Zotero-OpenReader * Fix startup URL showing default port instead of configured port When uvicorn is launched via CLI with --port N without also exporting the PORT environment variable (e.g. using shell default syntax like ${PORT:-3000}), settings.port stays at its default value of 8880 while the server actually listens on the CLI-specified port. The startup message then displays the wrong port in the Beta Web Player URL. Add _get_effective_port(), which inspects sys.argv for --port/--port=/ -p arguments and falls back to settings.port when none is present. Use it in the lifespan startup message instead of settings.port directly. Fixes #545 Signed-off-by: Christian Sidak <christian@sentineltech.eu> Signed-off-by: Christian-Sidak <61099993+Christian-Sidak@users.noreply.github.com> * fix(inference): free MPS memory between requests _check_memory() returned False on MPS, and both generate paths only checked memory on CUDA, so _clear_memory() never ran on Apple Silicon. PyTorch's MPS allocator keeps the buffers it caches, and each new input length adds more, so the server grew with every request until the machine ran out. Check MPS too, against the same threshold, using torch.mps.driver_allocated_memory(), which includes that cache. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix: hook uvicorn 'running on' log instead of parsing sys.argv * fix: deepwiki badge (#548) docs: badge count, community details * fix(api): web player startup link from uvicorn's bound address, drop argv tests * Added Home Assistant app link under the Community section of the README (#549) * fix(api): log web player urls as two lines * chore(deps): bump certifi, anyio, urllib3, fsspec, filelock, setuptools for advisories * fix(web): preserve IME input in voice-tag controls (#550) * docs(changelog): security advisories for 0.9.1 * fix(web): keep find/replace out of IME composition (#557) The find and replace inputs ran on every Enter, including the Enter that confirms an input-method composition. Skip the handler while isComposing is true, matching the earlier VoiceSelector fix, and cover both inputs with a unit test. Fixes #556 Signed-off-by: bfs2021 <101915083+bfs2021@users.noreply.github.com> * ci(release): title releases from changelog headings * chore(release): bump to v0.9.1, security bumps, IME and MPS fixes * test(tune): restore decode timeout before the healthy decoder call * fix(voices): bound voice-mix files and caches Every distinct mix expression was saved as /tmp/<expression>.pt and, on first use, copied again to /tmp/temp_voice_<expression>.pt. Neither was removed, the backend cached each tensor by path forever, and every KPipeline kept its own copy in pipeline.voices. Varying a weight per request grew disk and memory by about 1 MB each, and the expression doubled as a file path. - Name mixes by SHA-256 digest under kokoro_voice_mixes/ in the temp dir and keep the newest VOICE_CACHE_SIZE (64). - Make the backend voice cache an LRU of the same size. - Hand KPipeline the cached tensor (moved to CPU, the only tensor form it takes as-is) instead of a staged file path, so no temp copy is written and pipeline.voices does not grow. forget_voice now only has the cache entry to drop. * feat(api): optional API keys for the API routes The server has no authentication, and with CORS_ORIGINS defaulting to "*" any client that can reach the port can run generation. Add API_KEYS, a list of accepted keys. When it is non-empty, the /v1, /dev, SSML, tune and debug routers require "Authorization: Bearer <key>", which is how OpenAI-compatible clients send their API key; keys are compared with secrets.compare_digest. /health, the docs and the web player's static files stay open. Empty by default, so nothing changes for existing deployments. Closes #373 * Read a stray comma before a unit as a decimal separator (#559) unit_normalized text like '1,5s' skipped units() because the number pattern only accepted comma groups, then _comma_groups() in numbers() fused it into '15s'. The unit was only read on the next normalize pass, so the function was not idempotent. Accept the comma-decimal form in UNIT_PATTERN and pass it to inflect as '1.5'; thousands groups (10,000s) keep their old reading. * fix(downloads): age temp files against the clock (#563) cleanup_temp_files took "now" from the temp directory's mtime, which moves only when a file is added or removed. A file's age was therefore measured against the newest download, so files written together never reached max_temp_dir_age_hours. Use time.time(). * fix(dev): return every segment from /dev/phonemize (#569) The route returned from inside its pipeline loop, so text the pipeline split into several segments, such as separate paragraphs, came back with only the first segment's phonemes and no sign the rest was dropped. Join all segments with a space. * fix(dev): validate the voice on /dev/generate_from_phonemes (#564) The phoneme route passed request.voice straight to get_voices_path, skipping process_and_validate_voices. The mixer uses the expression as a file name, so an absolute path such as /app/api/src/voices/v1_0/af_heart+af_bella resolved its first voice inside the voices root and os.path.join then wrote the mix next to the real packs, even with allow_local_voice_saving off. Run the same validation the speech routes use, so unknown voices 400. * fix(inference): retry a CUDA OOM once, before any audio is sent (#562) Both generate paths retried an out-of-memory error by calling themselves again with no limit, then re-raised the original error even when the retry succeeded. A chunk that never fits kept the GPU busy until the recursion limit, and a failure after the first chunk replayed audio the client already had. generate() also dropped return_timestamps on retry. Retry once, only when nothing has been yielded, and return on success. * fix(tts): fail the request when a chunk fails instead of dropping it (#571) Errors from model calls and audio encoding were logged and swallowed at three levels of generate_audio_stream, so a sentence that failed was left out of an HTTP 200 with nothing to show the text was incomplete. Streams also kept going and finalized their download link file. The errors now propagate. Non-streaming requests get the existing error response; a stream is cut off, which clients can detect, and TempFileWriter removes its file when it exits with an error so the download link never serves the truncated audio. Pause-chunk errors are unchanged. * fix(model): serialise backend loading and refuse unload mid-generation (#572) ensure_backend returned early whenever _backend was set, but initialize sets it before load_model finishes, so after an idle unload a second request could start generating on a half-loaded model. A failed load also left that object in place, so later requests kept using it. /dev/unload and /dev/reload took the lifecycle lock but ignored _active_requests and could unload the model under a generator paused between chunks. Always take the lock in ensure_backend, clear _backend when loading fails, and have unload and reload raise ModelBusyError while requests are generating, which the dev routes return as 409. * fix(inference): run model calls off the event loop (#566) Both generate paths iterated the synchronous KPipeline generator inside an async generator, so each chunk's G2P and model forward pass ran on the event loop. While one request generated, /health, /v1/models and every other request waited, and a long input stalled the whole server. Step the generator in a worker thread with asyncio.to_thread, holding a threading lock around each step so model calls stay one at a time, as they effectively were before. A lock held by the worker, rather than an asyncio lock, keeps that true when a request is cancelled mid-step. * fix(voices): mix requests avoid failing if pruning races another worker * chore(lint): enable ruff ASYNC rules and run ruff in CI (#574) * fix(api): cap request body size and bound dev text fields (#567) * fix(api): cap request body size and bound dev text fields MAX_INPUT_LENGTH is checked after the body is read and parsed, so a client could send any amount of JSON before it was refused, and the /dev/tune multipart upload is spooled before its 10 MB check runs (even with the tuner disabled). /dev/phonemize, /dev/generate_from_phonemes and /dev/ssml did not use the InputText limit at all. Add MAX_REQUEST_BODY_MB (default 32, room for the largest valid speech request in escaped JSON and a tune upload). A small ASGI middleware 413s on a larger Content-Length, and counts chunked bodies as they arrive; FastAPI reports a failed body read as its own 400, so the middleware swaps that response for the 413. The three dev text fields now use InputText. * Update typo api/src/core/config.py * refactor(api): move the body size middleware out of main.py * docs(contributing): update guidance on CI, gating and voice cache in contributor guides * feat(web): add A to Z sort toggle to the voice list, closes #542 (#575) * feat(web): add A to Z sort toggle to the voice list, closes #542 * docs(changelog): hover text added for Tune tab * docs(changelog): clarify descriptions, add title header * fix(normalizer): space an unspaced ellipsis so short words aren't spelled out, closes #561 * chore(release): bump to v0.9.2, request handling and stability fixes, voice sorting * feat(api): add ElevenLabs and Cartesia compatible websocket TTS for voice agents * chore(deps): bump uvicorn to 0.54.0 for websocket size limits and keepalive pings; bump version to v0.10.0-rc1 * feat(api): accept ElevenLabs and Cartesia key headers, require keys on the websocket routes * refactor(api): move require_api_key into core/auth.py * docs(readme): add API Keys section to README with usage instructions test(api): check /v1/test stays open with API_KEYS set * fix(api): an empty API key never matches a missing header API_KEYS containing "" matched any request without credentials. Skip empty tokens and keys so such a config fails closed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(api): map OpenAI voices marin, cedar, verse and ballad * build(deps): bump the actions group with 3 updates (#581) Bumps the actions group with 3 updates: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv), [actions/setup-node](https://github.com/actions/setup-node) and [docker/login-action](https://github.com/docker/login-action). Updates `astral-sh/setup-uv` from 10.2.0 to 10.3.3 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/c18668ad3cf93ea998bef934396af7bb5c839dc7...68559e99cc807c1eb7e9238fd43a15bba460eec2) Updates `actions/setup-node` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1) Updates `docker/login-action` from 4.6.0 to 4.7.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/dbcb813823bdd20940b903addbd779551569679f...81c6f93d4bc991e510b342a00b419b3bb4efc5c6) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 10.3.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: docker/login-action dependency-version: 4.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(api): reject a download_format that differs from response_format (#570) The download link file is written from the bytes encoded for response_format; download_format only changed its extension and so its served content type. mp3 with a wav download gave mp3 data named .wav, which strict players and importers refuse. Nothing re-encodes, so require the two to match (or download_format to be unset) on the speech and dialogue requests. The web player already sends the same value for both. * chore(github): add pull request template * docs(skills): add downstream consumer check skill with helper script (#583) * docs(readme): minor clarity changes, use requests for /dev/tune example docs(skills): clarify intended usage on consumer-check, replace literal tab char * feat(api): add OpenAI Realtime compatible TTS on /v1/realtime * feat(api): accept voice_aliases, lang_code, volume and normalization on websockets via shared SpeechOptions * fix(api): only check download_format when a download link is requested #570 rejected a download_format that differs from response_format on every request, but without return_download_link the field is never used. Clients that send a fixed download_format next to a configurable response_format would get a 422 on every request. * Return a short silence for input with nothing to speak (#579) (#580) * Return a short silence for input with nothing to speak (#579) Fixes #579 * Pin unspoken_input_pause_s to 0 in the older nothing-speakable 400 tests * ci(test): fail a stalled apt install after 5 minutes * fix(api): send websocket silence once per context, keep empty input with alias rate a 400 (#590) * fix(api): send websocket silence once per context, keep empty input with alias rate a 400 * docs(changelog): note websocket silence behaviour * ci(test): apt install on runners skip ffmpeg and cmake (#592) * ci(test): drop ffmpeg and cmake from the apt install * temp(ci): disable uv cache for one run, see if cmake can stay dropped * Revert "temp(ci): disable uv cache for one run, see if cmake can stay dropped" This reverts commit 4cd830012ef234c253ed1b8d2832d07976bfa7d7. * fix(docker): preload jemalloc in the CPU image to keep memory flat (#595) glibc keeps the freed tensor buffers of every new input length, so RSS grows with traffic and is not returned when idle (#594). jemalloc reuses them. oversize_threshold:0 keeps buffers above 8 MB under the 30 s decay instead of purging them right away, which made plain jemalloc slower, and background_thread:true purges off the request path. * fix(docker): bake Kokoro weights from the Hub as primary with config GET comparison, keep old method as fallback (#596) * fix(docker): bake Kokoro weights from the Hub as primary with config GET comparison, keep old method as fallback * ci(test): run download_model.py in the uv env, skip the hub GET on runners * docs(readme): reorder sections, update api key section * chore(release): bump to v0.10.0, websockets/realtime api, cpu memory, api keys * chore(version): bump to rc1 interim * chore(deps): bump pytest to 9.0.3, pytest-asyncio to 1.3.0 * fix(audio): keep chunk audio when GAP_TRIM_MS is 0 (#593) With a zero base trim, audio[0:-0] slices every chunk down to an empty array, so the whole response is silent. Skip the base trim when there is nothing to trim. Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com> * fix(audio): write real sizes into non-streamed WAV headers * fix(audio): keep the placeholder sizes for WAV over 4 GiB * fix(normalizer): read the whole part of money with cents correctly (#597) The cents branch of _money took math.floor of the amount, so a negative amount lost one more unit: -$1.50 was read as "minus two dollars and fifty cents". It also pluralized the bill on the full amount, so $1.05 became "one dollars". Read the sign on its own, use the whole number of units for the words and for the plural. Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com> * feat(normalizer): add initial Brazilian Portuguese normalization (#553) * feat(normalizer): add Brazilian Portuguese normalization * fix(normalizer): address Portuguese review feedback * chore(deps): declare num2words directly * docs(changelog): keep Portuguese entry under Added * Update test_normalizer_redos.py * fix(normalizer): handle Portuguese time edge cases --------- Co-authored-by: Udbhav Regadamilli <udbhav.regadamilli@gmail.com> * fix(normalizer): Portuguese feminine numbers, signs, percent and currency edge cases (#598) docs(skills): update adding-normalizer skill with additional testing guidance * feat(normalizer): read Portuguese h-notation times (12h30, 14h) without the units option (#598) * fix(normalizer): read money with more than two decimals as a decimal number (#599) Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com> * docs(readme): hf news update note Added a note responding to the HuggingFace takeover of `hexgrad/Kokoro-82M` / any implications for FastKoko users. * docs(readme): shortened phrasing on hf note * fix(ssml): ignore voice names that aren't valid voice names * fix(ssml): drop redundant anchors in fullmatch pattern * fix(normalizer): read uppercase HTTPS:// as https (#608) The protocol check looked for a lowercase "https" while the match is case-insensitive, so HTTPS:// and Https:// were read as "http". * docs(contributing): fix dead uv install link (#615) Signed-off-by: sarankumar1325 <120080287+sarankumar1325@users.noreply.github.com> * fix(tests): configure v1.0 model settings in test_real_model and pick warmup text by voice * fix(tests): patch frozen model_config in model_manager for test_real_model * fix(tests): reset manager singletons before startup in test_real_model --------- Signed-off-by: Christian-Sidak <61099993+Christian-Sidak@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Christian Sidak <christian@sentineltech.eu> Signed-off-by: bfs2021 <101915083+bfs2021@users.noreply.github.com> Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com> Signed-off-by: sarankumar1325 <120080287+sarankumar1325@users.noreply.github.com> Co-authored-by: remsky <jdavbraun@gmail.com> Co-authored-by: Andrew T. Marcus <tyro@sageframe.net> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Sanjay Gulati <sanjaygulati13@gmail.com> Co-authored-by: mlevinmail <mlevinmail@gmail.com> Co-authored-by: Nelson Spence <nelson@projectnavi.ai> Co-authored-by: Udodirim Bassey <hello@yooudee.com> Co-authored-by: radzrader <64661454+radzrader@users.noreply.github.com> Co-authored-by: remsky <25017870+remsky@users.noreply.github.com> Co-authored-by: Radz <danielroch1989@gmail.com> Co-authored-by: Bunlong Heng <bheng.code@gmail.com> Co-authored-by: Christian Sidak <61099993+Christian-Sidak@users.noreply.github.com> Co-authored-by: brycehenson <bryce.henson@anu.edu.au> Co-authored-by: lionel-rowe <lionel-rowe@users.noreply.github.com> Co-authored-by: Shiva Kerdel <49479846+s-kerdel@users.noreply.github.com> Co-authored-by: Samran Asif <samranwebdev2000@gmail.com> Co-authored-by: remsky <remsky.dev@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tai An <antai12232931@outlook.com> Co-authored-by: xujialiu <xujialiuphd@gmail.com> Co-authored-by: Colin Howes <chowes@netflix.com> Co-authored-by: YaannnTech <github.com@stanger.biz> Co-authored-by: Kai <99519599+abaichuan1017@users.noreply.github.com> Co-authored-by: zgy <101915083+bfs2021@users.noreply.github.com> Co-authored-by: David Coulson <23066302+davidcoulson@users.noreply.github.com> Co-authored-by: Alvi Rahman <46807496+Alvi-Rahman@users.noreply.github.com> Co-authored-by: Dylan Duan <dylanduancanada@gmail.com> Co-authored-by: Lucas Barros <70347936+lbarrosby@users.noreply.github.com> Co-authored-by: somaz <genius5711@gmail.com> Co-authored-by: Udbhav Regadamilli <luckyudbhav@gmail.com> Co-authored-by: Udbhav Regadamilli <udbhav.regadamilli@gmail.com> Co-authored-by: samuelbraun15 <124533775+samuelbraun15@users.noreply.github.com> Co-authored-by: Nurlan Mammadli <116812760+nurlanmnn@users.noreply.github.com> Co-authored-by: sarankumar <120080287+sarankumar1325@users.noreply.github.com> Co-authored-by: Antigravity <noreply@github.com> Co-authored-by: Kevin Sicong Jiang <7546654+KevinSJ@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #607
URLs starting with
HTTPS://orHttps://were read as "http". The protocol regex is case-insensitive, but the check that picks "https" or "http" looked for a lowercase"https"in the match. It now compares the lowercased match, so any casing ofhttps://reads as "https".Added two cases to
test_normalizer.py(HTTPS://andHttps://). Both fail on master and pass with the change.Testing
uv run pytestpasses locally (API changes)npm run test:webpasses locally (web player changes)npm run cpu:up/gpu:up), for inference or docker changesCHANGELOG.mdentry, if users will notice the changeI didn't run the full suite since it needs torch, which I don't have set up. I ran
test_normalizer.py,test_normalizer_contract.pyandtest_normalizer_properties.pywith the locked inflect 7.5.0: 167 passed.ruff checkandruff format --checkare clean on the changed files.🤖 Generated with Claude Code