diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..b7249b6ee315a322e50e0580b910981cd7db1e06 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,48 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +tokenizer.json filter=lfs diff=lfs merge=lfs -text +examples/audio/de_block_reassembled.mp3 filter=lfs diff=lfs merge=lfs -text +examples/audio/de_segment_reassembled.mp3 filter=lfs diff=lfs merge=lfs -text +examples/audio/en_block_reassembled.mp3 filter=lfs diff=lfs merge=lfs -text +examples/audio/en_segment_reassembled.mp3 filter=lfs diff=lfs merge=lfs -text +examples/references/de_s1.mp3 filter=lfs diff=lfs merge=lfs -text +examples/references/de_s2.mp3 filter=lfs diff=lfs merge=lfs -text +examples/references/en_s1.mp3 filter=lfs diff=lfs merge=lfs -text +examples/references/en_s2.mp3 filter=lfs diff=lfs merge=lfs -text +validation/gpu-smoke/en-turns/episode.wav filter=lfs diff=lfs merge=lfs -text +validation/gpu-smoke/en-pairs/episode.wav filter=lfs diff=lfs merge=lfs -text +validation/gpu-smoke/de-turns/episode.wav filter=lfs diff=lfs merge=lfs -text +validation/gpu-smoke/de-pairs/episode.wav filter=lfs diff=lfs merge=lfs -text diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..658e63b0e0d4c266371293b103566c378dd56e37 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release tooling changes + +## Pipeline v2 + +The first fresh GPU smoke stopped before generation because a progress-page SQL query used LIMIT4 instead of LIMIT 4. Fixed the query and added empty/populated journal rendering regression checks. Model weights, prompts, candidate rewards and QA thresholds are unchanged. The failed attempt is retained in release validation history. A new GPU smoke uses a fresh output directory and the corrected source snapshot. + +The portable continued-training loader also uses a real one-example batch sampler with an identity collator. A regression check with the actual Accelerate BatchSamplerShard verifies disjoint rank partitions and preserves the required1×T×13 tensor layout. This does not change the historical training run or inference runtime. diff --git a/EXPORT_PROOF.json b/EXPORT_PROOF.json new file mode 100644 index 0000000000000000000000000000000000000000..1f5f415b5de4acd9dd7a4a76f6129b884f265a9b --- /dev/null +++ b/EXPORT_PROOF.json @@ -0,0 +1,27 @@ +{ + "passed": true, + "source_checkpoint_step": 9874, + "source_file_sha256": "8c4cd0923553e9522e0b92e5719bfd12ab11f4981b1364c9d134301dfc42b633", + "source_dtype": "FP32 FSDP full state", + "deployment_dtype": "BF16; exact per-tensor equality to source cast, as in the listening pilot", + "parent": "laion/Humaneness-Voice-Large-1.7", + "tensors": 425, + "all_tensors_equal_to_evaluated_bf16_cast": true, + "no_model_generation_or_neural_forward_on_login": true, + "shard_bytes": { + "model-00001-of-00005.safetensors": 1997031256, + "model-00002-of-00005.safetensors": 1997658024, + "model-00003-of-00005.safetensors": 1997657656, + "model-00004-of-00005.safetensors": 1963573536, + "model-00005-of-00005.safetensors": 304110984 + }, + "sha256": { + "model-00001-of-00005.safetensors": "791c61b2bcad322b58fbac3d0d24174014bb49acad2a52fb581cf96074381675", + "model-00002-of-00005.safetensors": "1be302af66c882ec7f6ef35954c76b0e55436911596b1602627d53cfbaed1dca", + "model-00003-of-00005.safetensors": "1d65aa4709289a60e18fc7d7a3fa75c3357755707b167df62e9512c94a3a69c0", + "model-00004-of-00005.safetensors": "1f8a6db71e26dc79f3f5f0562bf0320f51f1d83fdec0db7b2ca74206f170dde2", + "model-00005-of-00005.safetensors": "b8033d7393e3d846a6740f041992fa449d2a017613a9130ab5ab0df9d3a15d91" + }, + "total_parameters": 4129990144, + "time": 1794075986.055203 +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b67e4764e83a065eab2c5f65b53fd818d1978d9e --- /dev/null +++ b/LICENSE @@ -0,0 +1,6 @@ +Creative Commons Attribution 4.0 International (CC BY 4.0) + +LAION model weights, new pipeline code and documentation are provided under CC BY 4.0. +License terms: https://creativecommons.org/licenses/by/4.0/legalcode.en +Attribution: LAION, Humanness Voice Podcast, 2026. +Upstream code and dependencies retain their original notices/licenses; example source recordings retain their original terms. See NOTICE.md and UPSTREAM_LICENSE. diff --git a/MANIFEST.json b/MANIFEST.json new file mode 100644 index 0000000000000000000000000000000000000000..64f14f212b3ba324b92e124e21d5b59420d02f44 --- /dev/null +++ b/MANIFEST.json @@ -0,0 +1,642 @@ +{ + "model-00005-of-00005.safetensors": { + "bytes": 304110984, + "sha256": "b8033d7393e3d846a6740f041992fa449d2a017613a9130ab5ab0df9d3a15d91" + }, + "config.json": { + "bytes": 7014, + "sha256": "34f03ae9ac95c2c6cf0a36a17fd64eec57caa23e344b4e7999015d433a5543b4" + }, + "LICENSE": { + "bytes": 432, + "sha256": "cc980e308d6c61586ea8d4707a3c57a5023f86e24c93ae21aa9dabc43881fe68" + }, + "processing_moss_tts.py": { + "bytes": 37501, + "sha256": "059637b92e7eb9a67df531fe9578e9554d456195828b223eb81f21117c58e8f8" + }, + "TRAINING.md": { + "bytes": 8224, + "sha256": "9d318a9d13304d1c1dd84c204707f3f1a1a1925aa0a486f1bc6141b5495e9af6" + }, + "model-00004-of-00005.safetensors": { + "bytes": 1963573536, + "sha256": "1f8a6db71e26dc79f3f5f0562bf0320f51f1d83fdec0db7b2ca74206f170dde2" + }, + "voices.json": { + "bytes": 15113, + "sha256": "9a80aeafcbfe45247d98170b4139bef99b1d8393588e97cbb93125923a509ea1" + }, + "requirements.txt": { + "bytes": 114, + "sha256": "0a22058ff0d1ff22b7970a9d173b8397cda2fa0209a04ffcaf6ab4653a344002" + }, + "tokenizer_config.json": { + "bytes": 5727, + "sha256": "ec2869dd4c9c7155b3460c291a6fb2b955e5068013ba7efbcaafd1c61e02abce" + }, + "infer.py": { + "bytes": 423, + "sha256": "ebf0e8250a2a5c17c3986c3ab71294c5abc302a0ad6b61f80eac09f01658e37b" + }, + "model-00002-of-00005.safetensors": { + "bytes": 1997658024, + "sha256": "1be302af66c882ec7f6ef35954c76b0e55436911596b1602627d53cfbaed1dca" + }, + "model.safetensors.index.json": { + "bytes": 37211, + "sha256": "cc511c4197d5ae3982936eae3e4b12ef70202dbb163d67526dfbbd7f6a4c6dd7" + }, + "configuration_moss_tts.py": { + "bytes": 7160, + "sha256": "ab6debcb92032cb9dc91ae80aed77dbadd2e59848208baef2b062bd6def3f3be" + }, + "UPSTREAM_LICENSE": { + "bytes": 544, + "sha256": "17241371600bcde523c76ca4f006a1700145535914b24586c5766572640f7cf8" + }, + "model-00003-of-00005.safetensors": { + "bytes": 1997657656, + "sha256": "1d65aa4709289a60e18fc7d7a3fa75c3357755707b167df62e9512c94a3a69c0" + }, + "gpt2_decoder.py": { + "bytes": 30896, + "sha256": "f2e877104669f1e6c7cd34680f0da1a8a159e032123ee56b660b63929b6c8989" + }, + "UPSTREAM_NOTICE.md": { + "bytes": 1236, + "sha256": "a00fd9ba52637b37dce84f9a09596a6747df540a3796b8140e151fb5949d9cf6" + }, + "model-00001-of-00005.safetensors": { + "bytes": 1997031256, + "sha256": "791c61b2bcad322b58fbac3d0d24174014bb49acad2a52fb581cf96074381675" + }, + "PUBLICATION_ID.json": { + "bytes": 67, + "sha256": "89ef756681c83c23a2b778c01c5f90f4e119761e174205b09e5fcc49c89129ea" + }, + "special_tokens_map.json": { + "bytes": 394, + "sha256": "02a153514db64e5378c53ef164c960409882649de6f4aac8f81f66218e7f8797" + }, + "added_tokens.json": { + "bytes": 790, + "sha256": "39bb49db6acfb8e7510b1640f575bdc183f511d85c94ce3ee967f2a6195c4a8a" + }, + "processor_config.json": { + "bytes": 209, + "sha256": "fac7289af2a37d988d708d813c92960e5e91c59d348c17b72c6aa6b86859f2b7" + }, + "VALIDATION.md": { + "bytes": 6251, + "sha256": "ce2472ae62539510a22114427a028c6a4a782d5d3d78a423509dbb82fcd5da84" + }, + "EXPORT_PROOF.json": { + "bytes": 1366, + "sha256": "456c6feffd52f2cd5462bd8575578c81c7c1910885b17858ba3d29390ba8d8b9" + }, + "qwen3_decoder.py": { + "bytes": 25473, + "sha256": "100163bd7ecf31a59bafacc0b032ace9339edc992a3eb4cc80662502e04e46f0" + }, + "README.md": { + "bytes": 23905, + "sha256": "5763750ea138f21907c5104fc2202e0f96d81e9076a494f06c02db2d96359cf8" + }, + "modeling_moss_tts.py": { + "bytes": 26379, + "sha256": "b0a66211943ae580b087f3e71495fea2f455701a4f6c29b6d3562218f7668c5f" + }, + "CHANGELOG.md": { + "bytes": 787, + "sha256": "21038fecbeb284c10ab60eca304b67fd335aedde672c9524cffc351f9760f0f2" + }, + "tokenizer.json": { + "bytes": 11423220, + "sha256": "06902d1fb775216338802205886a24bc715ccc606bd872a892e3d3c83ca1b9e2" + }, + "generation_config.json": { + "bytes": 158, + "sha256": "ec11df43c896a23a66d88eb9281d90bbbca48f3afb047fec0172f7af4d1ccdfc" + }, + "NOTICE.md": { + "bytes": 2009, + "sha256": "63dc5e7668c70550dcb0854dd8349cf22fdc1d1bd4e3e1d0bdd28ae872b64f2e" + }, + "tests/test_model_contracts.py": { + "bytes": 4901, + "sha256": "20ba80d70689b505d827bad32c292c5e1a56f02e39b6622e5d44600bdcc98804" + }, + "tests/test_pipeline.py": { + "bytes": 4355, + "sha256": "e2025aa7fb1e1cd649121451d50ac74c06a10cc2f62455e686c33e0ee1996c15" + }, + "stats/DONE.json": { + "bytes": 162, + "sha256": "09067f0e493d2e2ec4aab55a9d42fd357e068db9fe919cea22741caa68154369" + }, + "stats/editing_pilot.json": { + "bytes": 1700, + "sha256": "3ad9dd4b0640f5639fe093205995b8d27b57d2e646287f3caf35ea52e7b8cb97" + }, + "stats/release_validation.json": { + "bytes": 2004, + "sha256": "4dd00c89df21824943d6d2c1f02dab0c76e4eb3906a97ca950a1ac6358b79976" + }, + "stats/validation.jsonl": { + "bytes": 1867, + "sha256": "90669a2f7a333ec1c6b85115452785d6f730b5d80e95a6dd756078cf42388156" + }, + "stats/segment_block_pilot.json": { + "bytes": 36613, + "sha256": "a11d82e6a83c2d950546be29329730fe901eafbb1602a7085f8fbf343f6f5bf1" + }, + "stats/training_summary.json": { + "bytes": 3957, + "sha256": "33c55870e00f69a0a2dd617e82a5f4fb7a887c5daceec2896ba529e4bbd73686" + }, + "stats/steps.jsonl": { + "bytes": 94968, + "sha256": "dcb081c2a884f0fff80595c848d36a8a2c311e69d28f5ee7c3111cd950731962" + }, + "guides/recipe.json": { + "bytes": 608, + "sha256": "c5cd09a5fb8ddda86d5cc8368cc0906fdb4374351510da2bf8e40458e0255983" + }, + "guides/MULTI_SPEAKER.md": { + "bytes": 2767, + "sha256": "0a45fc63797508a13ee35bdbaced2d3d6fc4f81acdfb3fb7a9230b6b044864d3" + }, + "guides/SINGLE_SPEAKER.md": { + "bytes": 2213, + "sha256": "c9cce422e04a4fe1f950e4fc0014c6bda31356b71d235f57252c8a159cbaf45c" + }, + "guides/AGENT_GUIDE.md": { + "bytes": 3513, + "sha256": "6bb36e793e9112de0377ef9fc95217b0635b7ae86b60ded7d7884fd36d86b109" + }, + "guides/PIPELINE.md": { + "bytes": 21725, + "sha256": "758c0280fff9205b157fd0f0d3d69ab7dc6484a211239c9c79acd5a5e381de08" + }, + "podcast/engine.py": { + "bytes": 6370, + "sha256": "1ddddde10286f779b9d2812da71516ecb06373741daa5ec55c05f4c50731e52c" + }, + "podcast/pipeline.py": { + "bytes": 14590, + "sha256": "a25386e92dd064658d4f36c4886d71d4adc7386bd32b59e1b996dc32915fb5d0" + }, + "podcast/ranking.py": { + "bytes": 2372, + "sha256": "3ba4350a10d98e11cb480a0c7b98ffb7ffec3e680336d26d65b59a078cf2e8b2" + }, + "podcast/asr.py": { + "bytes": 1025, + "sha256": "084a520f2948e3886aecb6ef21c19e5266f46182f362def3dc16ddb3149536f0" + }, + "podcast/audio.py": { + "bytes": 5013, + "sha256": "01155a8975bb9ad09ebedd60c33910370dd84599e5a1bdd0bcd83ae19bc15645" + }, + "podcast/__init__.py": { + "bytes": 85, + "sha256": "c6ef743673c226d84a65d0865559de003b5e34ccd6319ad87b3da7ff38ab7938" + }, + "podcast/prompting.py": { + "bytes": 2930, + "sha256": "391b9fe64002f49846cd88bfea1d8b4d0d57d2982b435e094b686180a0736dfa" + }, + "podcast/alignment.py": { + "bytes": 2832, + "sha256": "ea286efa586e21741e26fba902e9e25b61f79673c03dd12e2271b4905f354784" + }, + "podcast/conversion.py": { + "bytes": 869, + "sha256": "20f497b9c2ab5766a2e619ab3bee04ba914b5b0ccf09faaa5cee4887c3ca72e4" + }, + "podcast/ears_backend.py": { + "bytes": 13002, + "sha256": "3b318831e66fc27e6f1e3d231635b6ab69338631dbdcc37571cb1603468ad0a6" + }, + "runtime/native_cfg.py": { + "bytes": 4319, + "sha256": "d5af8a56d35be6baee5587c019ffbe08d0581ce915e14063194bb2dccbbc9a5f" + }, + "runtime/base_infer.py": { + "bytes": 7464, + "sha256": "4b73145ff3dbeaa6cce4e609973054ea79b1b9ff9f4bb10e3e8a662e7f42b540" + }, + "examples/short_de.json": { + "bytes": 844, + "sha256": "9f8de1d752fc04528b9af635c83d5194fb87421a34b7c88689fcec2af1a4e069" + }, + "examples/episode_de.json": { + "bytes": 3421, + "sha256": "c38c5c59849a6e7226f8189b7dabbd5ea16798e66c5fa2a8adedb927fbd2f700" + }, + "examples/episode_en.json": { + "bytes": 3324, + "sha256": "d5893bf87feab3b8113610ed7100621c2802b35d3517e5726fd02ad7fcedc26c" + }, + "examples/short_en.json": { + "bytes": 834, + "sha256": "7a7084aae9257736d2d262be4afbacf97169bcba8392ff5c4cdfeb9d522c4e15" + }, + "examples/audio/en_block_reassembled.mp3": { + "bytes": 911660, + "sha256": "efdeb8b807a286e5407ac09c4f5c0abc15288774aca734c9e992a0249d077c1b" + }, + "examples/audio/de_segment_reassembled.mp3": { + "bytes": 1252268, + "sha256": "070dfe22bae9fa125022d7ab36346c5d6cc5124fbad41553d0a40ea27d1d4ed5" + }, + "examples/audio/de_block_reassembled.mp3": { + "bytes": 947756, + "sha256": "43462ee94dd0f48ddf3c149ba3450f6b0e08f33e471d124c1b7152f47540d4e2" + }, + "examples/audio/PROVENANCE.json": { + "bytes": 1142, + "sha256": "046c9fadbb7bf2fe11e0517a76fc112c35a5ddcbe8fa4453d40abca5ee231e85" + }, + "examples/audio/en_segment_reassembled.mp3": { + "bytes": 1247276, + "sha256": "1ed0d49e35a7866de27ee71a4112947f37226922d902cd7eeb6352666ec9fec1" + }, + "examples/references/en_s2.mp3": { + "bytes": 186284, + "sha256": "517e5ff6a62e393ac995985a03535ad367322aad14ac5caba3b7b2ee6d2daf92" + }, + "examples/references/en_s1.mp3": { + "bytes": 150188, + "sha256": "b630face220f977dc36e01db02f22063b7f2e4188439e272dc3a02f552082722" + }, + "examples/references/de_s1.mp3": { + "bytes": 232364, + "sha256": "9d5a7823fea82182d6a3ec378e15ae03b0bd61f028c6f50fb6c5b82fb1f1b7dd" + }, + "examples/references/de_anchors.npz": { + "bytes": 6799, + "sha256": "27c051d23d584df782cfcf4abd4051700838169d7bf2a0610b077ec1d30eccdf" + }, + "examples/references/en_anchors.npz": { + "bytes": 5199, + "sha256": "ed071500398ed41980e5ddc81bfc4b928a1469a7e6874792af033b52b92af989" + }, + "examples/references/de_s2.mp3": { + "bytes": 209324, + "sha256": "d2da04db22aeb44206e4f935e95919846e3e5bb4cb116503a7a260c9f48752cd" + }, + "examples/references/PROVENANCE.json": { + "bytes": 939, + "sha256": "a5e08afd717070d35d388ad576a9ad188e05fc667f03231d441b3fce898690b0" + }, + "training/tokenize_manifest.py": { + "bytes": 3555, + "sha256": "381b0938655f62dd23cd66ba4851e35134664a0bf907c9c3d7ccc392d88abd7f" + }, + "training/va_loss.py": { + "bytes": 5534, + "sha256": "2df51c949a72d0ccbad4a1fdb3ce50374cddae34f70c73fd212d7959347095a5" + }, + "training/train.py": { + "bytes": 9582, + "sha256": "234a082f83bdc0022794ea5816c0a0e1b65f5d0ad9bcde9bb21d398f8f7f9f31" + }, + "training/historical/frozen_fullft_source.tar.gz": { + "bytes": 39749, + "sha256": "a232f7f6b5f7ecd7e2def77a4c7e6ec37d8471c73ff3d8caaf9ea1229f93c89a" + }, + "stats/gpu_smoke_details.json": { + "bytes": 1802, + "sha256": "34fb1757ba1b2bf29073c7a694b9c9a2158ddcb8e9fabf1ce4872ddbd37cec42" + }, + "validation/gpu-smoke/en-turns/episode.wav": { + "bytes": 1634444, + "sha256": "7f31f92585479deba672ecdad4521b385f9d12bbe94ad39e58899e3caf846aa4" + }, + "validation/gpu-smoke/en-turns/episode_timeline.json": { + "bytes": 213, + "sha256": "963ef4a873e812f1b042a37af4cdf6b1e8133970b5e2f061d5e703f4dce9b438" + }, + "validation/gpu-smoke/en-turns/STATUS.json": { + "bytes": 91, + "sha256": "31080092245ae8345ac8d9d33051aa6782ec99ad1ab7f9b439407ced8eea06bd" + }, + "validation/gpu-smoke/de-pairs/episode.wav": { + "bytes": 2890124, + "sha256": "5061cdada7a57cfe4ea95730d0aff0bd62d639f9789107b5687922bb428e0fb3" + }, + "validation/gpu-smoke/de-pairs/episode_timeline.json": { + "bytes": 216, + "sha256": "d25c1b878aa98d36f95fe1c4775d2cf3c04a32e035f23e71d193bcf59b361178" + }, + "validation/gpu-smoke/de-pairs/STATUS.json": { + "bytes": 91, + "sha256": "8d24f76ccc148df88f4311724a804c06f88e0d12e764177885a07eaaa4c64931" + }, + "validation/gpu-smoke/en-pairs/episode.wav": { + "bytes": 2809484, + "sha256": "cd95dbfbc64225044092ac43fd951458a74687011a5e948eb8aa3cadbcd5a4b8" + }, + "validation/gpu-smoke/en-pairs/episode_timeline.json": { + "bytes": 212, + "sha256": "cfc9e564da04822707b4cf49c930d9bbcd05785bed94edd39992139f3293f7f7" + }, + "validation/gpu-smoke/en-pairs/STATUS.json": { + "bytes": 92, + "sha256": "085ebcfabbaf4e61a4e7f2d2b5cfe49a7462c69e61cf7ae337a2c5ba4924491a" + }, + "validation/gpu-smoke/de-turns/episode.wav": { + "bytes": 1726604, + "sha256": "ec15965f059af08b805984295ffb08cc85b9d54b5b71172f0a8aa75a198e67cc" + }, + "validation/gpu-smoke/de-turns/episode_timeline.json": { + "bytes": 211, + "sha256": "c4289b2ecf5dee22b15ba98d15add3dc92fa7dfef3b60ab661872c294675c1f5" + }, + "validation/gpu-smoke/de-turns/STATUS.json": { + "bytes": 92, + "sha256": "9afcae48a7133c1d1207e12749fbf4591c8b7e7072512a33818c5615a7f474d1" + }, + "requirements-legacy.txt": { + "bytes": 124, + "sha256": "8bcd23f75f4c83db37dcbd2c7a499edc6887870f5451de9ac85c93656d7aaa88" + }, + "infer_legacy.py": { + "bytes": 146, + "sha256": "4b138e143329b7c50cb1897a65d327936b5bd622a400df92f28b81f4d44ab25d" + }, + "optimized_pipeline/script-spontaneous-en.json": { + "bytes": 14275, + "sha256": "21d1aab0d49ca9e66b56e4c1097ba14b274d251cc1ba3f888383499fdc064a5f" + }, + "optimized_pipeline/test_spontaneous.py": { + "bytes": 1480, + "sha256": "784c283b29b8da7541f4f1a00d54199b3eb6e7e407f25b87e6896719ac8d099f" + }, + "optimized_pipeline/scoring.py": { + "bytes": 5106, + "sha256": "fffc89db6534a326272bb38e1039c46575b911e330fbea393ab49ec550cbce12" + }, + "optimized_pipeline/.gitignore": { + "bytes": 108, + "sha256": "a4f4af8a2429865be28ced3ae59a073e49150ffe039b6e4f8efe871fc9a38781" + }, + "optimized_pipeline/verify_artifacts.py": { + "bytes": 3520, + "sha256": "1c1c7a4b8885b1188a047076c8ce116188905cecee6312b83d6ef708c3a383ca" + }, + "optimized_pipeline/references.json": { + "bytes": 488, + "sha256": "4b21cd86212d5b7e495956a82e6cb630c497e56ad35e8aed8b278cd8e5a54102" + }, + "optimized_pipeline/test_contracts.py": { + "bytes": 3875, + "sha256": "9642836aea9449ba9d294f913ccf5eb785d7bba362b769d01972aa9bb0044aa4" + }, + "optimized_pipeline/produce.py": { + "bytes": 1178, + "sha256": "ea02ca7aeb6053c31b0c211bfbec9fb6ac36706d2b53cb6b4897e5b4ad08aae4" + }, + "optimized_pipeline/finish.py": { + "bytes": 13587, + "sha256": "c9dea792a237d4a90cea9ce1e1b58929c69a329bab2946a84b0419de7025f931" + }, + "optimized_pipeline/script-de.json": { + "bytes": 6722, + "sha256": "49c89ce912de090124ee15645f0fe94acff6f3316343e8c11032f06994b88406" + }, + "optimized_pipeline/speaker_scoring.py": { + "bytes": 3880, + "sha256": "e355d7f3b9571d20564a981cf2028ed74f029ab9e4d0918f81e2140c1526ce9b" + }, + "optimized_pipeline/script-en.json": { + "bytes": 6312, + "sha256": "35bb921b1516483823335a86aaa5afc10a0514dd6739cad60e387b940f95683e" + }, + "optimized_pipeline/README.md": { + "bytes": 1282, + "sha256": "d05e2e462b030afa4bbb1bfe4f9d18a502c959f672e8bd24f3726f90a3c846d9" + }, + "optimized_pipeline/script-speaker-en.json": { + "bytes": 16141, + "sha256": "3dee05ee57db607968a74c27a9ea367187cd7355b95379a1e210d57fc6240bfe" + }, + "optimized_pipeline/requirements.txt": { + "bytes": 261, + "sha256": "c1fb18bc05fe70062f3fed98584f9ba31a327877b43335656e33f0bdacedba8e" + }, + "optimized_pipeline/script-speaker-de.json": { + "bytes": 16975, + "sha256": "8d66a30ee8be0008732f5cfb47365a6fe8ba4ee407d3959608ee0b3fa5b94c77" + }, + "optimized_pipeline/archive.py": { + "bytes": 1774, + "sha256": "a57b71da8081e1cbecddb585490a255a8098872c298c30cf7b77e39f11cbb63b" + }, + "optimized_pipeline/speaker_finish.py": { + "bytes": 15682, + "sha256": "5a9d9a5f64cc8ace567089e5a116579787428745941ce1f3a6bd479e670d158d" + }, + "optimized_pipeline/generation.py": { + "bytes": 22018, + "sha256": "2bcf575383aba32f14e21d9c7087d3e10b0aa6240f88998bce54c4be4c428192" + }, + "optimized_pipeline/test_inputs.py": { + "bytes": 2548, + "sha256": "177acef192ba5edb355fd3a7ff57489e9f0963d0543211f4432c9eb80dcaf748" + }, + "optimized_pipeline/browser_verify.cjs": { + "bytes": 2858, + "sha256": "4b32a23c371e9ab05ee75dd3c3225a150dffd4d37c0d3e63b4d51b6d89965ba6" + }, + "optimized_pipeline/PROMPTING.md": { + "bytes": 8521, + "sha256": "a63ee77066c510f2eae8fc205abbd1c82f61c1fcafccf2e854285d6fd3bc1b9d" + }, + "optimized_pipeline/prepare.py": { + "bytes": 1977, + "sha256": "81752d559ce9901a0e0625efd0de7e8e20243adc531c1e605cc4c9e7a55391e0" + }, + "optimized_pipeline/run.py": { + "bytes": 936, + "sha256": "1773a36cae62fc1de6b3cc59ae893bd54e5cda20065f9a5972b54608eb7dd77e" + }, + "optimized_pipeline/inputs.py": { + "bytes": 2061, + "sha256": "ac95a829fd4b11327a29dde3fe2bc634b22496eab95d909d669001099240af8e" + }, + "optimized_pipeline/compare_n.py": { + "bytes": 1907, + "sha256": "32bada3d5cb534fd7a6a9856d2c4dd16ed61a5b247dae75d900ec62fb72bcc1a" + }, + "optimized_pipeline/offline_batch.py": { + "bytes": 8396, + "sha256": "d5b390625f4351fa1789a74100f0b50abe5f78e5b7b16e645e54b3a0127ee7f3" + }, + "optimized_pipeline/test_speaker_recipe.py": { + "bytes": 1258, + "sha256": "3982784fffe963582ef2b2769cd780953cd8b380538165d2f22eaf357cf71138" + }, + "optimized_pipeline/speaker_run.py": { + "bytes": 9641, + "sha256": "8925320004c85b567571e1d9fd3f66c2a71f253b92fca9a2f4d4760c8ae081bf" + }, + "optimized_pipeline/script-spontaneous-de.json": { + "bytes": 15092, + "sha256": "da7b4050b7aaedd4176f0304441495ec2a216816b4f5a1d160ceb33373defa88" + }, + "optimized_pipeline/repair_listening.py": { + "bytes": 4036, + "sha256": "db2c050be4c429781d35d33648b48a61062d28d549b6801f24c4d9fd42d93272" + }, + "optimized_pipeline/SPEAKER_RECIPE.md": { + "bytes": 21735, + "sha256": "302dd77bfc61098b5e352d24566a77e47f2d9eb4f11b16f296c78d9c832721b2" + }, + "optimized_pipeline/recipe.py": { + "bytes": 4794, + "sha256": "7ed2aa0356b11cc37194c6044cf8dd73bc815348747a686b83a5753b1a86a371" + }, + "guides/LEGACY_PIPELINE.md": { + "bytes": 8337, + "sha256": "140c75a23bafa5d015fdaf51429d9212b95b5cba256a493d581132690e68784a" + }, + "guides/PROMPTING.md": { + "bytes": 8521, + "sha256": "a63ee77066c510f2eae8fc205abbd1c82f61c1fcafccf2e854285d6fd3bc1b9d" + }, + "guides/LEGACY_README.md": { + "bytes": 15290, + "sha256": "bcd4c2388a9c8a5bcadbcb2c955ff3b97cea3172ba5cb2b1f89d00602d8da532" + }, + "optimized_pipeline/runtime/APACHE-2.0.txt": { + "bytes": 11358, + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + }, + "optimized_pipeline/runtime/published_audio.py": { + "bytes": 5013, + "sha256": "01155a8975bb9ad09ebedd60c33910370dd84599e5a1bdd0bcd83ae19bc15645" + }, + "optimized_pipeline/runtime/semantic_graph.py": { + "bytes": 6212, + "sha256": "f5177bd119633417f9704e7967f7d8fe68296429c8e0f6f815350b9da769954d" + }, + "optimized_pipeline/runtime/generate.py": { + "bytes": 1112, + "sha256": "f7fc075e83801574c6e491c6af5e021135882509c28c7965f06d91054c8d9a34" + }, + "optimized_pipeline/runtime/audio_export.py": { + "bytes": 3518, + "sha256": "ee4b770a7fa0125de16800dacd95abea8670cf89844a679683ba852db3110f46" + }, + "optimized_pipeline/runtime/local_fused.py": { + "bytes": 23036, + "sha256": "2a977365935eeffa80f711c61d66b37b7f25db6eef5e1028debc9b2a00652ee9" + }, + "optimized_pipeline/runtime/codec_fused.py": { + "bytes": 15807, + "sha256": "e2deb62ea9344f6073107647ca114c8faef51904d2e6daaa3d1e27b6811f754f" + }, + "optimized_pipeline/runtime/phased_generate.py": { + "bytes": 4005, + "sha256": "57b767cf20e4b7bfaf2e762f25db177677d78d829b6cdcb6c7dddf132dadead6" + }, + "optimized_pipeline/runtime/performance_core.py": { + "bytes": 16734, + "sha256": "645e9d33d866f3113cd132e26c13a1538fa3f497cb550656bd6a3e9628f0d8a2" + }, + "optimized_pipeline/runtime/PODCAST_UPSTREAM_NOTICE.md": { + "bytes": 1591, + "sha256": "256bc9697f7a856f8cf9a2380dc92c1d3845022d861de00c635ac66d56a8bc49" + }, + "optimized_pipeline/runtime/semantic_layerwise.py": { + "bytes": 3687, + "sha256": "59675f59e87450e89e891c9fcc7046a8b128dfd17606f388e294820293e15dcf" + }, + "optimized_pipeline/runtime/settings.py": { + "bytes": 273, + "sha256": "4c6dd861f36eb582ddef65780601a11c513eb4427c32aee461ce283057d9d629" + }, + "optimized_pipeline/runtime/align_engine.py": { + "bytes": 24831, + "sha256": "64d49c130aa7d042fd8f43da1bb5a47a037b0deb408f01e9ae7d2e6ae573cec0" + }, + "optimized_pipeline/runtime/config.py": { + "bytes": 180, + "sha256": "3dec1ab6944c40ee7c44cecd06e676b87620e37c0bd1ca7efdf6203d429d27b3" + }, + "optimized_pipeline/runtime/PODCAST_UPSTREAM_LICENSE": { + "bytes": 432, + "sha256": "cc980e308d6c61586ea8d4707a3c57a5023f86e24c93ae21aa9dabc43881fe68" + }, + "optimized_pipeline/runtime/ears_reward.py": { + "bytes": 12273, + "sha256": "1d607446d9f55f59e62440d98e46519c2489d502e57ee9e14ad8fb6988e47216" + }, + "optimized_pipeline/references/source.json": { + "bytes": 141, + "sha256": "1fa9522adde72ebc5e24b578c946c5c8aa5506a1ea2f5f4c92c14fe6aa64b726" + }, + "optimized_pipeline/references/PROVENANCE.json": { + "bytes": 939, + "sha256": "a5e08afd717070d35d388ad576a9ad188e05fc667f03231d441b3fce898690b0" + }, + "optimized_pipeline/benchmarks/spontaneous-2026-11-08.json": { + "bytes": 4021, + "sha256": "dc7e85fe24ffbbcfe3d7d9d8d8768aab249beb343f154baf7261d33f2391448e" + }, + "optimized_pipeline/low_memory_compare.py": { + "bytes": 11528, + "sha256": "a0d6c1626f1b5f0fd7e667426dd73c6cd3a02f40aeb1c42490b780473e90be33" + }, + "optimized_pipeline/compare_report.py": { + "bytes": 7740, + "sha256": "abd684bfcee6192f357f9457ef8b74795d427204c854f1457cef54d4c453691d" + }, + "guides/PODCAST_EXPERIMENT_HISTORY.md": { + "bytes": 8294, + "sha256": "841e5f4fcd9535beaaf9f5b4373b41dc7aeeb78fcc5e04d0263246e6174f37e7" + }, + "optimized_pipeline/benchmarks/n-comparison-2026-11-08-turns.json": { + "bytes": 132495, + "sha256": "2b3968688232da708aa418f6ab6f2d4d0d1e0b541051f89a25e92f021fad05c4" + }, + "optimized_pipeline/benchmarks/n-comparison-2026-11-08.json": { + "bytes": 6269, + "sha256": "282023c1143d0a6731048c53cbf86ca9a7d2e583fd3591ab4fa80a00f4203553" + }, + "optimized_pipeline/finish_comparison.py": { + "bytes": 1399, + "sha256": "6d295692f56adfbf910858f5f94c7dc0c830c79ef314afdcb7b3a3e727b72616" + }, + "optimized_pipeline/script-spontaneous-fr.json": { + "bytes": 15563, + "sha256": "ba11fb76309337e27e6dd861212047da712e73ef5a24b792db13a15bce9c42c6" + }, + "optimized_pipeline/audit_alignment.py": { + "bytes": 3142, + "sha256": "a729e89d7f17d6d41865dda78086ea8518a957543aa2bfaa04eade1a53be379a" + }, + "optimized_pipeline/script-spontaneous-es.json": { + "bytes": 15017, + "sha256": "e7c4d18468ca6787e6df7440e2b68627e50333b2a25011e01d3d365506879867" + }, + "optimized_pipeline/languages.py": { + "bytes": 425, + "sha256": "f57c3263d9c1e52930f51ecc67cbf674c1a130db953434ea39e1c5ed46314664" + }, + "optimized_pipeline/script-spontaneous-nl.json": { + "bytes": 14795, + "sha256": "85925be8fa1604d0bcfc05b61b5b8fb2ec1d2f6797b8675693285c5612517986" + }, + "optimized_pipeline/benchmarks/five-language-extension-2026-11-08.json": { + "bytes": 14316, + "sha256": "7269325d5cfdce258171fc2636b259c496306aadf30371f653d6f9686c824ce6" + }, + "optimized_pipeline/benchmarks/five-language-extension-2026-11-08-turns.json": { + "bytes": 203694, + "sha256": "6729585516e27882f7e8eaafa868eb19a152fd8ccef7b30a4fe2be91571f94df" + } +} diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 0000000000000000000000000000000000000000..c9947737325f8b33abbb6891d02b777da38211ce --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,11 @@ +# Attribution and scope + +LAION's Humanness Voice Podcast is a full supervised fine-tune of Humaneness Voice Large 1.7, using the MOSS Local Transformer family implementation and an external MOSS-v2 audio codec. Earlier family provenance and licenses remain in the inherited UPSTREAM files and source copyright headers. The current release's parent, data mixture and checkpoint are documented in TRAINING.md; older inherited notes describe earlier family releases and are not the current model card. + +New LAION weights, pipeline code and documentation: CC BY 4.0. Third-party implementation files, Python packages, codecs, ASR models, score models and the optional Voice Converter retain their own licenses and notices. The optional converter is separately downloaded and installed; it is not silently embedded in this repository. + +The German example anchors are short excerpts from recordings supplied by the experiment owner. The English anchors are the previously approved short real-podcast reference excerpts. MP3s and exact cached MOSS codes are included for reproducible conditioning; their provenance is in examples/references/PROVENANCE.json. Source recordings retain original terms. The model's CC BY 4.0 notice does not relicense source recordings or grant rights over someone's identity. + +Generated example episodes are LAION model outputs, released under CC BY 4.0 with their source-condition records. They demonstrate the earlier script-boundary crop and 400-ms assembly; they are not evidence validating the newly added internal-pause compaction or optional per-turn VC route. + +The 8 November optimized-pipeline update adds sparse spontaneous prompting, native-normalized genuineness plus ECAPA ranking, bounded archival and measured RTX 3090 results. It does not change model weights or relicense source recordings. The prior native pair workflow remains under infer_legacy.py. Third-party runtime notices, including Apache-2.0 codec optimizations, are retained in optimized_pipeline/runtime/. diff --git a/PUBLICATION_ID.json b/PUBLICATION_ID.json new file mode 100644 index 0000000000000000000000000000000000000000..790713775d10f18aa3e0e70195aa6a5acaaf9131 --- /dev/null +++ b/PUBLICATION_ID.json @@ -0,0 +1,4 @@ +{ + "project": "humanness-voice-podcast-20261107", + "step": 9874 +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..57dd2214033d9b7df9850857f2e2d5aa1d256a52 --- /dev/null +++ b/README.md @@ -0,0 +1,229 @@ +--- +license: cc-by-4.0 +language: [en, de, fr, es, nl] +pipeline_tag: text-to-speech +library_name: transformers +base_model: laion/Humaneness-Voice-Large-1.7 +tags: [podcast, multi-speaker, voice-cloning, expressive-speech, custom-code, research] +--- + +# Humanness Voice Podcast + +**Generate natural, reference-conditioned speech and assemble it into a podcast.** This is the complete Podcast full fine-tune of [Humaneness Voice Large 1.7](https://huggingface.co/laion/Humaneness-Voice-Large-1.7), at training update **9,874**. It contains full BF16 weights, not a LoRA. The model speaks a supplied script; an optional API-based or local language model can write the script and its performance directions. + +## 🎧 Listen: five languages, two reference voices + +**[Open the public Podcast listening Space →](https://huggingface.co/spaces/laion/Humanness-Voice-Podcast)** + +Reference audios, an exact prompt example, and **Best-of-4 → Best-of-2 → Single Take** episodes in **German, English, Dutch, French and Spanish**. The same conversation and reference pair make the variants easy to compare; scripts, measured generation times and review notes are included. No installation or paid API is required to listen. + +The full fine-tune uses real podcasts from these five languages — approximately **300 source hours per language** — with a training mixture of **80% podcast and 20% synthetic voice-acting presentations**. The source-hour estimate is distinct from the packed target-token hours reported in [training details and provenance](TRAINING.md). + +The current recommended pipeline uses **sparse spontaneous, relaxed and gentle inline directions**, fixed reference voices, and complete-turn Best-of-N. The listener approved this style on 8 November 2026. N=4 is the default; N=2 and N=1 offer cheaper comparisons. Voice conversion, DPO adapters and internal pause compaction are off. + +**Start here:** [Prompting templates and LLM-writing guide](guides/PROMPTING.md) · [Single-speaker guide](guides/SINGLE_SPEAKER.md) · [Multi-speaker guide](guides/MULTI_SPEAKER.md) · [Pipeline, rewards and speed details](guides/PIPELINE.md) · [Agent quick reference](guides/AGENT_GUIDE.md) · [Machine-readable defaults](guides/recipe.json) · [Runnable optimized code](optimized_pipeline/) + +[Earlier listening study](https://laion-humaneness-podcast-segment-block-pilot.static.hf.space/editing/index.html) · [Training and provenance](TRAINING.md) · [Validation status](VALIDATION.md) · [GitHub implementation](https://github.com/LAION-AI/Humaneness-Voice/tree/main/podcast_pipeline) + +## Model and inference at a glance + +The MOSS Local Transformer architecture combines a Qwen-family semantic backbone with a local acoustic transformer. It generates twelve acoustic codebook tokens per 80-ms frame. The separately downloaded MOSS-v2 codec renders 48-kHz mono audio. The full Podcast policy has approximately 4.13 billion parameters / 8.26 GB of BF16 weights; codec, judges, KV caches and CUDA graphs need additional memory. + +Supply literal speech, a short delivery direction, and one clean fixed reference per voice. The recommended pipeline generates each speaker turn independently, optionally samples several candidates in parallel, selects a winner, audits its words, and assembles lossless turns before exporting MP3, subtitles, timeline JSON and a listening page. + +```mermaid +flowchart LR + A[Human or LLM writes script and sparse cues] --> B[Fixed reference per speaker] + B --> C[Podcast policy: N candidates per turn] + C --> D[Native MOSS-v2 audio decoder] + D --> E[For N above 1: genuineness + ECAPA selection] + E --> F[Independent transcript and boundary audit] + F --> G[400 ms word-clock assembly] + G --> H[MP3 + HTML + JSON + subtitles] +``` + +N=1 keeps its first and only take and skips online ranking. Each generation uses only its intended speaker's reference. Several different turns can share a GPU batch without sharing their generated histories. + +The optimized CLI supports **English, German, Dutch, French and Spanish**. Bundled scripts translate the same twenty-turn conversation; the public Space compares N=4, N=2 and N=1 for each language using the same approved German reference pair. This small fixed-script comparison is not a broad multilingual quality benchmark. Automated content/alignment flags remain visible. The English N4 complete listening edition has one explicitly documented candidate replacement, with the strict original still available. + +## Quick start: recommended pipeline + +Use a CUDA/BF16-capable GPU; the measured setup is an **RTX 3090 with 24 GB**, Python 3.12, PyTorch 2.6.0+cu124 and Transformers 5.15.0. Install system `ffmpeg` and `libsndfile`, then use a separate environment. Keep enough disk space for all model assets and candidates. No LLM API key is needed. + +```bash +hf download laion/Humanness-Voice-Podcast --local-dir humanness-podcast +cd humanness-podcast +python3.12 -m venv .venv +source .venv/bin/activate +pip install torch==2.6.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124 +pip install -r requirements.txt + +# Fetch the pinned reference/codec/judge assets and record their local paths. +python optimized_pipeline/prepare.py + +# One English episode, approved sparse prompting, four takes per speaker turn. +python infer.py --model . \ + --script optimized_pipeline/script-spontaneous-en.json \ + --n 4 --groups 2 --device cuda:0 --output runs/en-best4 + +# Same German script, two takes per turn; N=1 is a true single take. +python infer.py --model . \ + --script optimized_pipeline/script-spontaneous-de.json \ + --n 2 --groups 4 --device cuda:0 --output runs/de-best2 +``` + +Open `runs/en-best4/index.html`. Without `--script`, the bundled English **and** German episodes are generated. Use `--n 1 --groups 8` for single takes, or omit `--groups` to run the small automatic batch-size pilot. Groups × N must not exceed 16; reduce groups if VRAM is insufficient. The example group settings keep eight simultaneous candidates. + +For Dutch, French or Spanish, pass `optimized_pipeline/script-spontaneous-nl.json`, `script-spontaneous-fr.json` or `script-spontaneous-es.json` respectively. Repeat `--script` to generate several languages. The [five-language reproduction commands](guides/PIPELINE.md#reproduce-the-additional-dutch-french-and-spanish-episodes) also show the phased token/codec runner and shared final audit for N=4/2/1 on a GPU with limited free VRAM. + +`infer.py` now runs the optimized generation → audit → export route. The former native single/pair driver remains available explicitly as **`infer_legacy.py`**, with its own [legacy guide](guides/LEGACY_PIPELINE.md) and `requirements-legacy.txt` environment. Its identity×inverse-WER reward and Photon ASR differ from the current defaults; the two workflows are deliberately labeled. No old model weights, training code or examples were removed. + +## Single-speaker and multi-speaker prompting + +Use `GENERAL` for consistent delivery and parenthesized directions for local expression. Keep the literal text separate from acting cues. A single-turn generation gets only that turn's reference. For a multi-speaker episode, keep a stable speaker-to-reference mapping and alternate independently generated turns; see the [full JSON contract](guides/PROMPTING.md). + +```text +GENERAL: +A warm, emotionally thoughtful two-host podcast conversation. Very authentic, very genuine. +Natural, intimate, spontaneous spoken delivery with clear words, subtle emotion, +relaxed conversational pacing and brief meaningful pauses. +Be sincere, without an exaggerated announcer voice or forced laughter. +Perform only the current speaker turn and speak exactly the SCRIPT. +Keep the same speaker identity as the reference audio. + +SCRIPT: +(warm, curious; relaxed, spontaneous, gently spoken) What if meaning is something we practise? +(gently, as a spontaneous thought) Maybe it begins with noticing who needs us today. +``` + +Do not include the parentheses in the literal `text` passed to the processor. Do not add speaker labels to the words to be spoken. No “very pleasant/nice to listen to” instruction is used in this approved recipe. Use **one short cue per turn and at most one extra cue at an existing sentence boundary**; do not repeatedly demand strong emotion before every sentence. + +The preserved native two-speaker path is different: `infer_legacy.py --mode pairs` uses `(speaker=S1, ...)` and `(speaker=S2, ...)` plus two labeled reference slots in a single call. Its wrapper, prior-context limits and caveats are documented in the [multi-speaker guide](guides/MULTI_SPEAKER.md). Do not mix that wrapper with the optimized one-speaker-per-call route. + +## Have a language model write the directions + +We recommend using an **API-based or local LLM** to write the dialogue and its sparse cues. Manually formatting every turn and direction is unnecessarily time-consuming. The [prompting guide](guides/PROMPTING.md#use-an-llm-as-the-script-and-direction-writer) includes a reusable writing instruction, JSON templates and validation rules. + +Tell the writing model the topic, audience, speaker roles and intended length. Ask for natural conversation, subtle contextual emotion, exact preservation of any supplied transcript, and no more than two delivery chunks per turn. Keep each turn comfortably below 25.6 seconds; split longer explanations. The TTS pipeline does not call an LLM itself or bind you to a particular provider. + +For custom scripts use `--script my-script.json`; for your own voices use `--references my-references.json`. Reference paths are relative to the mapping JSON. Keep clean single-speaker anchors of roughly **5–15 seconds**. The approved S1/S2 clips supply 181/163 codec frames (14.48/13.04 s of conditioning), with no old three-second truncation. The [reference provenance](examples/references/PROVENANCE.json) and original source terms remain applicable. Remove or update cached reference codes when replacing a recording. + +## Model assets and reproducibility + +| Component | Role | Source | +|---|---|---| +| Humanness Voice Podcast, full FT step 9874 | Speech policy | [This repository](https://huggingface.co/laion/Humanness-Voice-Podcast), weight revision `91f8110cd815f2233301a8b1dd16dbbf3fae8e05` | +| MOSS Audio Tokenizer v2 | Reference encoding and waveform decoding | [OpenMOSS-Team/MOSS-Audio-Tokenizer-v2](https://huggingface.co/OpenMOSS-Team/MOSS-Audio-Tokenizer-v2) | +| Humaneness Ears Medium | Genuineness, additional diagnostic scores | [laion/humaneness-ears-base-medium](https://huggingface.co/laion/humaneness-ears-base-medium) | +| SpeechBrain ECAPA, 192D | Similarity to the intended reference | [speechbrain/spkrec-ecapa-voxceleb](https://huggingface.co/speechbrain/spkrec-ecapa-voxceleb) | +| Parakeet TDT 0.6B v3 | Final transcript diagnostic | [nvidia/parakeet-tdt-0.6b-v3](https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3) | +| Qwen3 ForcedAligner | Approximate script-word boundaries for EN/DE/FR/ES; Dutch uses conservative Parakeet TDT estimates | [Qwen/Qwen3-ForcedAligner-0.6B-hf](https://huggingface.co/Qwen/Qwen3-ForcedAligner-0.6B-hf) | + +All asset revisions and commands are in [the pipeline guide](guides/PIPELINE.md). Use fixed model snapshots, script/reference hashes and separate output folders for different recipes. Preserve batch grouping and seeds. Fixed seeds do not imply identical audio across different batch sizes, hardware, precision or software versions. Model weight hashes remain in `EXPORT_PROOF.json`; no model weights changed in this pipeline update. + +## Detailed defaults and selection + +| Setting | Current value | +|---|---| +| Prompt style | `spontaneous`: restrained, relaxed, gentle, sparse inline cues | +| Precision | BF16 | +| Temperature / CFG | 1.0 / 2.5 | +| Top-p / top-k | 0.95 / 50 | +| Timing | Free timing: `tokens=None`, no inline duration request | +| Maximum per turn | 320 semantic frames = 25.6 seconds | +| Default selection | Best-of-4 complete raw turns | +| Voice conversion / added adapters | Off / none | +| Internal pause compaction | Off | + +For N>1: + +```text +G = clip(native Humaneness Ears genuineness / 6, 0, 1) +S = clip(cosine(ECAPA(candidate), ECAPA(correct reference)), 0, 1) +reward = 0.5 * G + 0.5 * S +``` + +Use fixed scales, not per-batch min/max. Compute the correct reference embedding once and reuse it. Select the maximum separately for each turn; exact ties choose the lowest candidate index. **Content Enjoyment and WER do not enter this reward.** N=1 keeps its sole take and does not run online ranking. + +Every selected output gets an independent final transcript/alignment audit. The boundary edit preserves up to 80 ms before the first word and 150 ms after the last, with small fades outside those words. Uncertain alignment remains untrimmed and flagged. Reassembly uses a **400-ms word-to-word gap**, including the retained guards, then exports mono 48-kHz / 192-kbps MP3 with a lossless master and audit records. Internal timing is preserved. + +A high genuineness/identity score can still select an incomplete sentence. In the approved Best-of-4 sample set, English turn 6's strict winner stopped after its first sentence. The experiment preserves that strict output. An additional full listening copy replaces only that turn with an existing complete alternative, explicitly adding a content eligibility check. It must not be described as unchanged strict reward argmax. See [the exact failure and repair record](optimized_pipeline/benchmarks/spontaneous-2026-11-08.json). + +## Speed on RTX 3090 and practical optimizations + +These are measured **single-GPU** results for the current sparse-prompt Best-of-4 run. The English row describes the strict experiment, including the flagged incomplete turn; its separately repaired listening copy lasts 201.22 s. + +| Language | Final audio | Generation + ranking | Useful RTF | Genuineness / 6 | ECAPA cosine | Mean turn WER | +|---|---:|---:|---:|---:|---:|---:| +| German, N=4 | 219.38 s | 179.98 s | 0.821 | 3.943 | 0.640 | 1.98% | +| English, N=4, strict | 193.30 s | 195.83 s | 1.013 | 3.880 | 0.407 | 5.50% | + +RTF = generation/ranking time divided by final edited audio duration; lower is faster. It excludes model loading, correctness checks, final audit and MP3 encoding and is not browser first-audio latency. Both languages together required 380.10 s of production including archival/cleanup, or 645.59 s from process start to exports with an existing compiler cache. The extra listening repair and live-service restoration are excluded. + +Implemented optimizations: + +- BF16 policy, layerwise semantic CUDA graphs, reusable local-decoder graphs, fast sampling and fused codec kernels. Real-model tests verify the checked codec/token/PCM paths. +- Batch different turns together while preserving independent candidate histories. Two turns × four candidates produced eight simultaneous takes in this run. +- Reuse identical candidate-prompt prefill only after exact valid-KV/hidden-state checks pass. A two-group check measured 2.009 s normally versus 0.518 s with reuse. +- Keep the unused reference codec encoder in CPU RAM after reference codes are ready; keep the decoder on the GPU. +- Cache reference embeddings, batch candidate judges, and reserve ASR for the final audit. +- Use one bounded CPU writer alongside the next GPU batch. Archival consumed 24.87 CPU seconds but blocked production for only 1.08 s; all takes remain available for later reranking. +- Reuse a known group size to skip repeated timing sweeps, and reuse a warmed model/compilation cache when generating several episodes. `optimized_pipeline/compare_n.py` shares one model load across N=2 and N=1. + +Policy token prediction remains the main cost: 324.85 s across both episodes, versus 24.85 s codec decoding and 21.25 s scoring including preprocessing. These stages total 375.80 s with remaining generation overhead. Of 160 takes, 37 reached the 25.6-s ceiling; 19 of 20 batches waited for at least one capped take. Safely recognizing complete lagging takes, grouping similar lengths or compacting finished rows are future opportunities. Simply shortening the ceiling risks losing actual speech. + +Timing depends on prompts, batch grouping, graph bucket settings, cache warmth and other GPU workloads. Overall production time was about the same as the preceding run; the archival overlap is measured, but this is not evidence of a controlled aggregate speedup. Fresh N=2/N=1 results are documented below. Full receipts and limitations: [pipeline guide](guides/PIPELINE.md), [benchmark JSON](optimized_pipeline/benchmarks/spontaneous-2026-11-08.json). + +## Training, earlier evidence and limitations + +Training used two epochs, approximately 80% real-podcast / 20% original-format acting replay by presentation count, 32 GPUs and 9,874 optimizer updates. Peak learning rates were 2e-5 for the semantic backbone and 4e-5 for the local/acoustic parameters; 5% warm-up followed by cosine decay to 10% of peak. Development loss was 4.4653 versus 4.5745 before training. This is not a human quality rating. See [TRAINING.md](TRAINING.md) for counts, manifests and continued-training instructions. The public weights are deployment weights, not the original 32-rank optimizer resume state. + +The earlier segment/native-block experiment and its original metrics remain accessible in the [archived model card](guides/LEGACY_README.md), [study summary](stats/segment_block_pilot.json) and [listening grid](https://laion-humaneness-podcast-segment-block-pilot.static.hf.space/index.html). Those Ears-identity/Parakeet-Redux measurements must not be compared as identical metrics to the new ECAPA/Parakeet-v3 pipeline. Legacy optional VC and internal-pause compaction retain their original experimental status. + +Speaker identities can drift; words can be omitted or repeated; ASR, alignment and quality judges can be wrong. The listener-approved prompt is a useful recipe, not a universal guarantee. Inspect flags and listen before publishing an episode. Reference recordings, third-party implementations and external models retain their own licenses. LAION model weights and newly authored release materials are **CC BY 4.0**; see [NOTICE.md](NOTICE.md). Use voices with appropriate permission and disclose synthetic speech where appropriate. + +## Fresh N=1 and N=2 comparison with the approved prompts + +Both episodes were freshly generated at N=2 and N=1 after publishing the new defaults. Same literal scripts, cues, reference pair, temperature 1.0 and CFG 2.5. N1 keeps its sole take and skips online ranking. N2 uses the same 50/50 reward as N4; there is no WER gate or hidden retry. + +| Language | N | Final audio | Generate + rank | Useful RTF ↓ | Genuineness / 6 ↑ | ECAPA cosine ↑ | Mean turn WER ↓ | +|---|---:|---:|---:|---:|---:|---:|---:| +| DE | 1 | 220.75 s | 55.24 s | 0.250 | 3.916 | 0.553 | 1.21% | +| DE | 2 | 222.26 s | 115.80 s | 0.521 | 3.897 | 0.630 | 2.56% | +| DE | 4 | 219.38 s | 179.98 s | 0.821 | 3.943 | 0.640 | 1.98% | +| EN | 1 | 199.30 s | 68.56 s | 0.344 | 3.863 | 0.352 | 2.12% | +| EN | 2 | 199.54 s | 122.77 s | 0.615 | 3.904 | 0.383 | 2.93% | +| EN | 4 | 193.30 s | 195.83 s | 1.013 | 3.880 | 0.407 | 5.50% | + +In this sample, **N=2 is a useful speed/identity compromise**: German speaker cosine rises from 0.553 at N1 to 0.630 at N2, close to N4's 0.640. English rises from 0.352 to 0.383; N4 is 0.407. Genuineness stays roughly 3.9/6. N1 is faster but less consistent in speaker identity. These are twenty turns per language, not evidence of a universal optimum. The old English N4 row includes its documented incomplete turn; the repaired listening copy is separate. + +All 80 new selected turns passed the configured review checks (per-turn WER threshold 15% and usable forced alignment); none was regenerated or replaced. This is not a guarantee of perfect speech. Both candidate counts passed artifact validation, exact prompt/reference routing, strict selection and PCM equality checks. The token/full-prefill checks and optional fused decoding were bit-identical on their tested inputs. Fourteen CPU tests pass. + +**Timing scope:** N2 production across both languages totals 238.57 s; N1 totals 123.80 s; old N4 totals 375.80 s. Token prediction accounts for 209.57 / 113.22 / 324.85 s respectively. N2 codec/ranking take 18.18/10.07 s; N1 codec takes 9.91 s and online ranking zero. Loading, correctness probes, final audit and export are excluded from these production sums. The complete successful N2+N1 experiment, from process start to all four MP3s, took **660.70 s**. The failed earlier OOM attempt and live-service restoration are excluded. + +N2/N1 used phased execution under additional unrelated GPU training; N4 used integrated execution with a different background load. The other training ended before final auditing. Do not claim these are controlled percentage speedups from N alone. N2 uses four turns per batch and N1 eight (final partial batches smaller), maintaining up to eight simultaneous candidates. Different groups/seeds mean these are fresh runs, not nested subsets of the N4 pool. + +See [aggregate results](optimized_pipeline/benchmarks/n-comparison-2026-11-08.json) and [all per-turn candidate scores, seeds and audits](optimized_pipeline/benchmarks/n-comparison-2026-11-08-turns.json). Recreate the listening HTML with `compare_report.py`; the six strict episodes and additional labeled N4 English listening copy are independently selectable. + + +## Five-language listening release: additional NL / FR / ES results + +[Open the public listening Space](https://huggingface.co/spaces/laion/Humanness-Voice-Podcast). The nine additional episodes use the same fixed reference pair, approved sparse prompting and translated twenty-turn story as the DE/EN examples. All N2/N4 reward winners and all N1 sole takes are retained; no retries, content re-selection or voice conversion. + +| Language | N | Final audio | Production | Useful RTF | Genuineness / 6 | ECAPA cosine | Mean turn WER | Transcript / boundary flags, of 20 | +|---|---:|---:|---:|---:|---:|---:|---:|---:| +| NL | 4 | 303.00 s | 261.95 s | 0.865 | 3.969 | 0.388 | 14.4% | 8 / 10 | +| NL | 2 | 298.90 s | 134.25 s | 0.449 | 3.884 | 0.352 | 13.5% | 5 / 8 | +| NL | 1 | 280.82 s | 73.28 s | 0.261 | 3.897 | 0.333 | 15.1% | 6 / 9 | +| FR | 4 | 238.82 s | 242.20 s | 1.014 | 4.021 | 0.420 | 21.9% | 8 / 4 | +| FR | 2 | 231.62 s | 131.62 s | 0.568 | 4.032 | 0.385 | 14.2% | 6 / 3 | +| FR | 1 | 238.10 s | 65.74 s | 0.276 | 3.906 | 0.362 | 14.5% | 5 / 4 | +| ES | 4 | 234.02 s | 250.40 s | 1.070 | 4.008 | 0.450 | 2.2% | 0 / 0 | +| ES | 2 | 233.78 s | 134.51 s | 0.575 | 4.018 | 0.385 | 2.6% | 0 / 0 | +| ES | 1 | 232.66 s | 57.90 s | 0.249 | 4.020 | 0.392 | 2.1% | 1 / 0 | + +Flags are materially more frequent in Dutch and French than Spanish in this fixed-reference run. Some recognized transcripts omit words or drift across languages. ASR itself is fallible, and a boundary warning alone does not imply missing speech. Dutch uses conservative Parakeet TDT boundaries because the Qwen aligner does not support Dutch. Uncertain clips remain untrimmed, so some episodes include longer tails. These examples are not endorsed as error-free multilingual outputs. Scripts and detailed diagnostics are available next to every player. + +Production is the sum of policy, codec and online selection time, excluding loading, correctness probes, final audit and encoding. Phased inference used one RTX 3090 alongside unrelated jobs; cross-run GPU loads differ. N4/N2/N1 use separate draws and grouping, not nested subsets. Do not interpret these measurements as a controlled speed or quality ablation. + +[Aggregate measurements](optimized_pipeline/benchmarks/five-language-extension-2026-11-08.json) · [All candidate scores and selected-turn audits](optimized_pipeline/benchmarks/five-language-extension-2026-11-08-turns.json). diff --git a/TRAINING.md b/TRAINING.md new file mode 100644 index 0000000000000000000000000000000000000000..fff7933f73ef4488f621774a7efd441a5c1d5572 --- /dev/null +++ b/TRAINING.md @@ -0,0 +1,91 @@ +# Training and checkpoint provenance + +## Released checkpoint + +- Parent: [Humaneness Voice Large 1.7](https://huggingface.co/laion/Humaneness-Voice-Large-1.7), the merged supervised acting release selected at update 44,250 in its earlier run. +- This release: a subsequent **full supervised fine-tune**, final update **9,874**. It is the real-podcast checkpoint used in the linked listening experiment, not the earlier edition and not an additional LoRA. +- Architecture: MOSS Local Transformer family; semantic backbone plus local acoustic transformer, twelve MOSS-v2 channels per 80-ms frame, 48-kHz mono output. +- Distribution: 32 GPUs, effective global batch 32, accumulation 1, FSDP FULL_SHARD, FP32 optimizer parameters/reductions and BF16 compute. +- Optimizer: AdamW, betas (.9,.95), epsilon 1e-8, weight decay .01, gradient norm limit 1. +- Schedule: two epochs; semantic peak 2e-5, local/acoustic peak 4e-5, 5% linear warm-up, cosine decay to 10% of each peak. No learning-rate restart. +- Actual nonpadding presentations: 315,932, with 36 distributed-padding presentations across the complete run. +- Per epoch: 126,373 podcast training targets and 31,593 acting-replay targets; approximately 80/20 by presentations. +- Full checkpoints included optimizer, per-rank RNG, scheduler and sampler state. The historical checkpoint states remain at their original storage; this public model package contains deployment weights and training code. +- Final development loss: 4.4653007 on 100 balanced audit cases, versus 4.5745 at initialization. The final update had the lowest recorded development loss. This does not establish the best human listening score. + +[Exact numerical training summary](stats/training_summary.json), [development history](stats/validation.jsonl), [logged optimizer-step measurements](stats/steps.jsonl), and [BF16 export proof](EXPORT_PROOF.json) are included. Every exported tensor was checked against the source full checkpoint cast to BF16, matching the precision used in the listening pilot. + +## Data and prompting + +The prepared corpus uses real podcast speech in en/de/fr/es/nl, plus an original-format expressive-acting replay subset. Targets, source splits, literal scripts, word timestamps and speaker labels were retained. The replay subset was language/speaker-balanced and preserved the earlier acting training membership; held-out acting items were excluded from replay. + +Podcast examples contain two clean episode-local S1/S2 anchors and, where available, a continuously encoded earlier-conversation block. Prefer one to three previous turns per speaker, allowing unequal histories and explicitly documented anchors-only or single-speaker-history cases. Combined anchor+history budget: 750 frames / 60 seconds. Each anchor remains 63–187 frames. Only the final assistant target audio is supervised; references and past dialogue must never enter the target labels. + +The frozen mixture and actual token-hour breakdown are in stats/training_summary.json. Token hours are sums of selected codec-frame durations; they should not be treated as a count of unique original podcast episode hours. + +The prepared source corpus was published to the access-controlled [TTS-AGI/Humaneness-Voice-Real-Podcasts-HQ-Multilingual](https://huggingface.co/datasets/TTS-AGI/Humaneness-Voice-Real-Podcasts-HQ-Multilingual), including the continuous-context sidecar in the preparation chain. Access to those training data is separate from downloading this public model. Original-format acting material is described by the parent model's provenance and source preparation. This model repository does not make a private training corpus public. + +## Original code versus portable continued training + +[The frozen historical launch-source archive](training/historical/frozen_fullft_source.tar.gz) records the actual Jupiter trainer, data/packing contracts and immediate parent dependencies. It retains original paths for audit. It is not a claim that a 32-rank Jupiter job can be copied verbatim onto another machine with different filesystem paths. + +The portable entry point training/train.py implements the same MOSS hidden-state supervised loss, twelve-book target masking, semantic/local learning-rate groups and warm-up/cosine recipe. It starts a **new fine-tune** from a downloaded model. Use a canonical local JSONL plus NPZ token arrays, optionally packed inside TARs. This loader avoids the historical machine's SQLite paths and supports your own authorized data. + +### Prepare token data + +A source JSONL record can be: + +~~~json +{ + "language": "en", + "mode": "pairs", + "general": "A warm, genuine, realistic conversation.", + "timed": true, + "references": {"S1": "speaker1.wav", "S2": "speaker2.wav"}, + "target_audio": "dialogue.wav", + "turns": [ + {"speaker": "S1", "text": "I was hoping you would ask.", "direction": "warm, curious", "seconds": 2.1}, + {"speaker": "S2", "text": "Then tell me what surprised you.", "direction": "amused, attentive", "seconds": 2.4} + ] +} +~~~ + +Optional context_audio is a single earlier-conversation waveform, already assembled chronologically; context_description must describe that exact waveform. Do not concatenate independent context code arrays or use future target audio as history. Optional instruction can supply the authoritative original GENERAL/SCRIPT prompt, preserving detailed acting directions rather than replacing them with automatic captions. + +~~~bash +python training/tokenize_manifest.py \ + --model . --input /data/authorized-records.jsonl \ + --output /data/tokenized-podcasts --device cuda:0 +~~~ + +The tokenizer writes TAR containers with compressed NPZ records and a train.jsonl. NPZ keys are target, S1, S2 and optional context, each an integer [frames,12] array. A native single-speaker record uses mode turns, one turn and the matching speaker reference; no-reference acting examples may omit reference arrays. Keep train/development splits separate before tokenization. + +### Start continued full SFT on eight GPUs + +~~~bash +torchrun --standalone --nproc_per_node=8 training/train.py \ + --model . --data /data/tokenized-podcasts/train.jsonl \ + --output /runs/podcast-sft --epochs 2 \ + --semantic-lr 2e-5 --local-lr 4e-5 --warmup 0.05 \ + --save-every 200 +~~~ + +The portable trainer shuffles deterministically per epoch. It does not silently rebalance your input JSONL; construct the desired podcast/replay mixture explicitly. Default accumulation is 1; an eight-GPU run therefore has a smaller effective batch than the original 32-GPU training. Match the global batch if making a controlled scientific comparison. + +### Continue an interrupted portable run + +Use the same arguments and the same world/data/recipe, adding: + +~~~bash +--resume /runs/podcast-sft/checkpoints/step-00000200 +~~~ + +A READY.json is written only after the Accelerate checkpoint is complete. Model/optimizer/RNG states are saved by Accelerate; the ready metadata binds the data manifest, world and schedule, plus the deterministic next epoch/local batch. Keep token archives immutable. A different dataset, schedule or world is a new experiment, not an exact optimizer resume. + +The released BF16 deployment weights cannot reconstruct the original FP32 optimizer moments or the original 32 per-rank RNG states. Do not describe a new run initialized from this repository as that historical exact resume. + +## Loss details + +Target supervision uses the native binary continue/stop head and all twelve codec channels. Channel weights are 1 for the stop head and 32/12 per audio channel, normalized by the total active weights. Loss is computed from global hidden states with a teacher-forced local transformer in chunks of 256 positions. References, instructions and prior context are masked from target labels. The training prefix is constructed through the same single/pair reference builder as inference, with the actual target frame count used for the teacher-forced global timing request. + +The new portable trainer/tokenizer and the new inference orchestrator are release tooling. Their CPU contract checks and any allocated GPU smoke results are recorded separately in [VALIDATION.md](VALIDATION.md); they are not retroactively labelled as the original historical run. diff --git a/UPSTREAM_LICENSE b/UPSTREAM_LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8f4255349f395288edbf734ca9646c445eeb2555 --- /dev/null +++ b/UPSTREAM_LICENSE @@ -0,0 +1,11 @@ +Humaneness Voice Large 1.3 Alpha: model weights and newly authored release materials. +SPDX-License-Identifier: CC-BY-4.0 +Copyright 2026 LAION contributors. + +Creative Commons Attribution 4.0 International: +https://creativecommons.org/licenses/by/4.0/legalcode.en + +Attribute LAION contributors, Humaneness Voice Large 1.3 Alpha, 2026, +https://huggingface.co/laion/Humaneness-Voice-Large-1.3-Alpha +and indicate changes. Third-party code/model/codec/data terms and personality +rights remain applicable. See NOTICE.md; this does not relicense them. diff --git a/UPSTREAM_NOTICE.md b/UPSTREAM_NOTICE.md new file mode 100644 index 0000000000000000000000000000000000000000..75bcdc9ca0b3f8616ca4fc047a9742dab1500320 --- /dev/null +++ b/UPSTREAM_NOTICE.md @@ -0,0 +1,23 @@ +# Upstream provenance + +Immediate parent weights: +https://huggingface.co/laion/Humaneness-Voice-Large-1.2-Alpha +(CC BY 4.0), final step 7,851. The 1.3 continuation is a full supervised +fine-tune, not a LoRA merge and not reinforcement learning. + +Earlier model lineage: +https://huggingface.co/laion/moss-tts-local-transformer-4.55b-voice-acting-v2-sft3 +(CC BY 4.0 as stated by that parent repository). +Architecture: MOSS Local Transformer 1.5 family, Qwen3-family semantic backbone. +External codec: https://huggingface.co/OpenMOSS-Team/MOSS-Audio-Tokenizer-v2 +Synthetic sources: https://huggingface.co/datasets/laion/german-english-voice-acting-challenges + +Original implementation files retain existing attribution. Dependencies, +tokenizer assets, the external codec and source recordings retain their +own upstream terms. The CC BY 4.0 declaration does not relicense third-party +software or grant rights over another person's identity. Source voice +aliases are fictional catalog labels, not real-person endorsements. + +The demo reference crops originate in the public synthetic acting corpus; +their UIDs and attribution remain in the linked listening-audio datasets. +The CLI canary reference uses the same public synthetic reference pool. diff --git a/VALIDATION.md b/VALIDATION.md new file mode 100644 index 0000000000000000000000000000000000000000..396ff835ab9431bd5986839e9892a034ea71c61d --- /dev/null +++ b/VALIDATION.md @@ -0,0 +1,43 @@ +# Current optimized-pipeline validation + +## Five-language listening release + +The [public Podcast listening Space](https://huggingface.co/spaces/laion/Humanness-Voice-Podcast) combines the existing six EN/DE examples with nine newly generated NL/FR/ES episodes. The extension produced **420 candidates and 180 selected turns** at N=4/2/1 on one shared RTX 3090, using the same reference pair and sparse prompting. Strict ranking, correct reference routing, exact candidate-to-selected PCM, transcript/prompt preservation, MP3 hashes and decoding, estimated-boundary joins, and timing accounting passed artifact validation for all three modes. Sixteen CPU tests pass. + +All **17 players** (15 episodes and two references) progressed in Chromium both locally and on the public HTTPS Space; candidate order, language navigation, transcripts, prompt-copy feedback, exclusive playback, and 1440/768/390-pixel layouts passed. These playback checks do not imply perceptual correctness of every spoken word. + +The extension has **49 configured review flags among 180 selected turns**: 39 transcript checks exceed 15% ASR WER, and 38 have uncertain boundaries, with overlap between those sets. Dutch contributes many boundary flags because it uses conservative Parakeet TDT estimates rather than unsupported Qwen forced alignment. Uncertain clips stay untrimmed. French and Dutch have possible omissions or language drift; ASR can also be wrong. Spanish has no review flags at N4/N2 and one at N1. Nothing was silently regenerated or reselected. See [aggregate evidence](optimized_pipeline/benchmarks/five-language-extension-2026-11-08.json) and [all per-turn records](optimized_pipeline/benchmarks/five-language-extension-2026-11-08-turns.json). + +## Earlier EN/DE runs + +The new default was executed end to end on one RTX3090:40turns,160candidates, both DE/EN, exact prefill and codec/token/PCM checks, independent audit and MP3 export. All seven players in the listening comparison progressed in Chromium on desktop/mobile. English turn6 had a real incomplete top-ranked take; strict output is retained and a separately documented complete copy uses another candidate. See [measurements and limits](guides/PIPELINE.md) and [the benchmark receipt](optimized_pipeline/benchmarks/spontaneous-2026-11-08.json). + +Fourteen CPU tests cover the original cache/reward contracts, sparse cue word preservation, failed archival receipts, new default selection and custom script validation. Run `cd optimized_pipeline && python -m unittest test_contracts test_speaker_recipe test_spontaneous test_inputs`. + +The listener has approved the spontaneous samples; that is not a blinded study or a quality guarantee. The fresh N=2/N=1 comparison is complete: 120 candidates, 80 selected turns, four MP3 episodes; zero configured content/alignment review flags. All seven listening-comparison players actually played in Chromium; desktop/mobile checks passed. Exact tested prefill/token and fused-decoder checks passed. See [aggregate comparison](optimized_pipeline/benchmarks/n-comparison-2026-11-08.json) and [per-turn records](optimized_pipeline/benchmarks/n-comparison-2026-11-08-turns.json). Native pairs, optional VC and internal pause compaction belong to the preserved legacy route; the prior evidence follows. + +--- + +# Validation status + +This page separates the trained model evidence from newly packaged tooling. + +- The source full checkpoint at update 9,874 completed training successfully and was used for 1,536 generated/scored candidates in the controlled EN/DE segment/block experiment. All 160 original episode conditions assembled, and 271 selected pause variants received full-dialogue evaluation. +- The BF16 deployment export was checked tensor by tensor against the source FP32 checkpoint cast to BF16, matching the evaluated loading precision. Shard checksums are in EXPORT_PROOF.json. +- The prior CPU-only script-boundary edit produced 1,416 trimmed previews and 123 complete montage conditions. 120 candidate boundaries required review; 37 montage conditions therefore had no safe strict-endpoint edited version. All original audio remained available. +- The prior local embedded MP3 and public players passed real Chromium playback, exclusive-player, trimmed/raw-toggle and responsive-layout checks. +- New portable package CPU tests cover script-vs-extra-ASR boundaries, internal hallucination rejection, waveform-word preservation, exact180-ms quiet-gap compaction, non-quiet-gap preservation, no constant-background crossfade gain bump, exact400-ms joins, global timestamp handling, identity-collapse penalty, prompt routing/timing, heterogeneous batch routing with tiny CPU fakes, CFG1 behavior, and target-only twelve-codebook training labels. +- The new internal-pause compaction remains **UNVALIDATED for listening quality** despite its signal-level tests. +- The optional split/convert/re-ASR/reassemble workflow is **experimental and not validated end to end** in the published listening grid. +- The fresh allocated four-GPU functional smoke **passed** for EN/DE, turns/pairs, two candidates, identity scoring, ASR, assembly and the quiet-pause option. It does not establish perceptual quality or validate optional VC. +- The historical trainer completed on the original 32-GPU environment. The new portable continued-training entry point is separate release tooling; its packer has CPU contract tests, not a completed fresh multi-GPU retraining result. + +Reproduce the CPU checks: + +~~~bash +python -m unittest discover -s tests -v +~~~ + +The exact release-time test report is provided in stats/release_validation.json. It must be interpreted together with the unvalidated-feature labels above. Automatic scores do not replace a listening study. + +The successful v2 smoke generated 16 candidates;10 passed the configured content checks and8 selected units formed four complete episodes (EN turns11.35s,EN pairs19.51s,DE turns11.99s,DE pairs20.07s). The quiet-pause option was enabled, but no real pause met its conservative trigger in these short examples; actual splice behavior is covered only by synthetic CPU tests and remains perceptually unvalidated. [Detailed result](stats/gpu_smoke_details.json) · [The four new audio outputs](validation/gpu-smoke/). diff --git a/added_tokens.json b/added_tokens.json new file mode 100644 index 0000000000000000000000000000000000000000..9e5f284c0d74ecf9b9c006194bd5040b1fe3b640 --- /dev/null +++ b/added_tokens.json @@ -0,0 +1,31 @@ +{ + "": 151668, + "": 151658, + "": 151666, + "": 151667, + "": 151657, + "": 151665, + "<|audio_end|>": 151670, + "<|audio_pad|>": 151671, + "<|audio_start|>": 151669, + "<|box_end|>": 151649, + "<|box_start|>": 151648, + "<|endoftext|>": 151643, + "<|file_sep|>": 151664, + "<|fim_middle|>": 151660, + "<|fim_pad|>": 151662, + "<|fim_prefix|>": 151659, + "<|fim_suffix|>": 151661, + "<|im_end|>": 151645, + "<|im_start|>": 151644, + "<|image_pad|>": 151655, + "<|object_ref_end|>": 151647, + "<|object_ref_start|>": 151646, + "<|quad_end|>": 151651, + "<|quad_start|>": 151650, + "<|repo_name|>": 151663, + "<|video_pad|>": 151656, + "<|vision_end|>": 151653, + "<|vision_pad|>": 151654, + "<|vision_start|>": 151652 +} diff --git a/config.json b/config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e871de139f1a8e537aa8b0d5886f98f27992991 --- /dev/null +++ b/config.json @@ -0,0 +1,268 @@ +{ + "architectures": [ + "MossTTSLocalModel" + ], + "attn_implementation": "sdpa", + "audio_assistant_gen_slot_token_id": 151656, + "audio_assistant_slot_token_id": 151656, + "audio_codebook_sizes": [ + 1024, + 1024, + 1024, + 1024, + 1024, + 1024, + 1024, + 1024, + 1024, + 1024, + 1024, + 1024 + ], + "audio_end_token_id": 151670, + "audio_pad_code": 1024, + "audio_pad_token_id": 1024, + "audio_start_token_id": 151669, + "audio_tokenizer_name_or_path": "OpenMOSS-Team/MOSS-Audio-Tokenizer-v2", + "audio_user_slot_token_id": 151654, + "audio_vocab_size": 1024, + "auto_map": { + "AutoConfig": "configuration_moss_tts.MossTTSLocalConfig", + "AutoModel": "modeling_moss_tts.MossTTSLocalModel", + "AutoProcessor": "processing_moss_tts.MossTTSLocalProcessor" + }, + "dtype": "bfloat16", + "gpt2_config": { + "activation_function": "silu", + "add_cross_attention": false, + "attn_pdrop": 0.0, + "bos_token_id": null, + "cross_attention_hidden_size": null, + "decoder_start_token_id": null, + "embd_pdrop": 0.0, + "eos_token_id": 151645, + "finetuning_task": null, + "initializer_range": 0.02, + "is_decoder": false, + "layer_norm_epsilon": 1e-06, + "model_type": "gpt2", + "n_ctx": 10240, + "n_embd": 2560, + "n_head": 32, + "n_inner": 9728, + "n_layer": 1, + "n_positions": 10240, + "pad_token_id": null, + "position_embedding_type": "rope", + "prefix": null, + "pruned_heads": {}, + "reorder_and_upcast_attn": false, + "resid_pdrop": 0.0, + "rope_base": 1000000.0, + "scale_attn_by_inverse_layer_idx": false, + "scale_attn_weights": true, + "sep_token_id": null, + "summary_activation": null, + "summary_first_dropout": 0.1, + "summary_proj_to_labels": true, + "summary_type": "cls_index", + "summary_use_proj": true, + "task_specific_params": null, + "tf_legacy_loss": false, + "tie_encoder_decoder": false, + "tie_word_embeddings": true, + "tokenizer_class": null, + "torchscript": false, + "use_bfloat16": false, + "use_cache": true, + "vocab_size": 151936 + }, + "hidden_size": 2560, + "im_end_token_id": 151645, + "im_start_token_id": 151644, + "initializer_range": 0.02, + "language_config": { + "add_cross_attention": false, + "architectures": [ + "Qwen3ForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": 151643, + "cross_attention_hidden_size": null, + "decoder_start_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 151643, + "finetuning_task": null, + "gradient_checkpointing_use_reentrant": false, + "head_dim": 128, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9728, + "is_decoder": false, + "layer_types": [ + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention" + ], + "max_position_embeddings": 32768, + "max_window_layers": 36, + "model_type": "qwen3", + "num_attention_heads": 32, + "num_hidden_layers": 36, + "num_key_value_heads": 8, + "pad_token_id": 151643, + "prefix": null, + "pruned_heads": {}, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "rope_theta": 1000000, + "rope_type": "default" + }, + "sep_token_id": null, + "sliding_window": null, + "task_specific_params": null, + "tf_legacy_loss": false, + "tie_encoder_decoder": false, + "tie_word_embeddings": true, + "tokenizer_class": null, + "torchscript": false, + "use_bfloat16": false, + "use_cache": false, + "use_sliding_window": false, + "vocab_size": 151936 + }, + "local_hidden_size": 2560, + "local_text_head_mode": "binary", + "local_transformer_attn_implementation": "sdpa", + "local_transformer_layers": 1, + "model_type": "moss_tts_local", + "n_vq": 12, + "pad_token_id": 151643, + "processor_class": "MossTTSLocalProcessor", + "qwen3_config": { + "add_cross_attention": false, + "architectures": [ + "Qwen3ForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": 151643, + "cross_attention_hidden_size": null, + "decoder_start_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 151643, + "finetuning_task": null, + "gradient_checkpointing_use_reentrant": false, + "head_dim": 128, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9728, + "is_decoder": false, + "layer_types": [ + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention" + ], + "max_position_embeddings": 32768, + "max_window_layers": 36, + "model_type": "qwen3", + "num_attention_heads": 32, + "num_hidden_layers": 36, + "num_key_value_heads": 8, + "pad_token_id": 151643, + "prefix": null, + "pruned_heads": {}, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "rope_theta": 1000000, + "rope_type": "default" + }, + "sep_token_id": null, + "sliding_window": null, + "task_specific_params": null, + "tf_legacy_loss": false, + "tie_encoder_decoder": false, + "tie_word_embeddings": true, + "tokenizer_class": null, + "torchscript": false, + "use_bfloat16": false, + "use_cache": false, + "use_sliding_window": false, + "vocab_size": 151936 + }, + "sampling_rate": 48000, + "tie_word_embeddings": true, + "transformers_version": "5.14.1", + "use_static_local_kv_cache": true, + "vocab_size": 151936, + "torch_dtype": "bfloat16" +} \ No newline at end of file diff --git a/configuration_moss_tts.py b/configuration_moss_tts.py new file mode 100644 index 0000000000000000000000000000000000000000..04b453edd7077170ebbd6a3ffb8167d9af8ac458 --- /dev/null +++ b/configuration_moss_tts.py @@ -0,0 +1,158 @@ +# coding=utf-8 +"""Configuration for the MOSS-TTS-Local-Transformer-v1.5 release.""" + +from __future__ import annotations + +from typing import Any, Dict, Optional, Union + +from transformers.configuration_utils import PretrainedConfig +from transformers.models.gpt2.configuration_gpt2 import GPT2Config +from transformers.models.qwen3.configuration_qwen3 import Qwen3Config + + +SUPPORTED_ATTENTION_IMPLEMENTATIONS = {"flash_attention_2", "sdpa", "eager"} + + +def _normalize_attention_implementation(value: Optional[str], default: str = "flash_attention_2") -> str: + normalized = str(value or default).strip().lower() + if normalized in {"flash", "flash_attn", "flash-attn", "flash_attention"}: + normalized = "flash_attention_2" + if normalized not in SUPPORTED_ATTENTION_IMPLEMENTATIONS: + raise ValueError( + "attn_implementation must be one of " + f"{sorted(SUPPORTED_ATTENTION_IMPLEMENTATIONS)}, got {value!r}." + ) + return normalized + + +class MossTTSLocalConfig(PretrainedConfig): + model_type = "moss_tts_local" + keys_to_ignore_at_inference = ["past_key_values"] + + def __init__( + self, + qwen3_config: Optional[Union[Qwen3Config, Dict[str, Any]]] = None, + gpt2_config: Optional[Union[GPT2Config, Dict[str, Any]]] = None, + language_config: Optional[Union[Qwen3Config, Dict[str, Any]]] = None, + n_vq: int = 12, + audio_vocab_size: int = 1024, + audio_codebook_sizes: Optional[list[int]] = None, + audio_pad_token_id: int = 1024, + audio_pad_code: Optional[int] = None, + pad_token_id: int = 151643, + im_start_token_id: int = 151644, + im_end_token_id: int = 151645, + audio_start_token_id: int = 151669, + audio_end_token_id: int = 151670, + audio_user_slot_token_id: int = 151654, + audio_assistant_slot_token_id: int = 151656, + audio_assistant_gen_slot_token_id: Optional[int] = None, + sampling_rate: int = 48000, + audio_tokenizer_name_or_path: Optional[str] = None, + attn_implementation: str = "flash_attention_2", + local_transformer_attn_implementation: Optional[str] = None, + local_text_head_mode: str = "binary", + initializer_range: float = 0.02, + **kwargs: Any, + ) -> None: + if qwen3_config is None and language_config is not None: + qwen3_config = language_config + if isinstance(qwen3_config, dict): + self.qwen3_config = Qwen3Config(**qwen3_config) + elif qwen3_config is None: + self.qwen3_config = Qwen3Config() + else: + self.qwen3_config = qwen3_config + + if isinstance(gpt2_config, dict): + self.gpt2_config = GPT2Config(**gpt2_config) + elif gpt2_config is None: + self.gpt2_config = GPT2Config( + vocab_size=int(self.qwen3_config.vocab_size), + n_embd=int(self.qwen3_config.hidden_size), + n_layer=1, + n_head=max(1, int(self.qwen3_config.hidden_size) // 80), + n_positions=int(n_vq) + 1, + n_ctx=int(n_vq) + 1, + activation_function="silu", + layer_norm_epsilon=1e-6, + resid_pdrop=0.0, + embd_pdrop=0.0, + attn_pdrop=0.0, + ) + else: + self.gpt2_config = gpt2_config + + self.n_vq = int(n_vq) + if self.n_vq <= 0: + raise ValueError("n_vq must be positive.") + if audio_codebook_sizes is None: + self.audio_codebook_sizes = [int(audio_vocab_size)] * self.n_vq + else: + self.audio_codebook_sizes = [int(size) for size in audio_codebook_sizes] + if len(self.audio_codebook_sizes) != self.n_vq: + raise ValueError( + f"audio_codebook_sizes must have length n_vq={self.n_vq}, " + f"got {len(self.audio_codebook_sizes)}." + ) + if any(size <= 0 for size in self.audio_codebook_sizes): + raise ValueError("audio_codebook_sizes must contain positive integers.") + self.audio_vocab_size = int(max(int(audio_vocab_size), max(self.audio_codebook_sizes))) + self.audio_pad_token_id = int(audio_pad_code if audio_pad_code is not None else audio_pad_token_id) + self.audio_pad_code = self.audio_pad_token_id + if self.audio_pad_token_id < self.audio_vocab_size: + raise ValueError("audio_pad_token_id/audio_pad_code must be outside the audio vocab.") + + self.pad_token_id = int(pad_token_id) + self.im_start_token_id = int(im_start_token_id) + self.im_end_token_id = int(im_end_token_id) + self.audio_start_token_id = int(audio_start_token_id) + self.audio_end_token_id = int(audio_end_token_id) + self.audio_user_slot_token_id = int(audio_user_slot_token_id) + self.audio_assistant_slot_token_id = int( + audio_assistant_slot_token_id + if audio_assistant_gen_slot_token_id is None + else audio_assistant_gen_slot_token_id + ) + self.audio_assistant_gen_slot_token_id = self.audio_assistant_slot_token_id + + self.sampling_rate = int(sampling_rate) + self.audio_tokenizer_name_or_path = audio_tokenizer_name_or_path + self.attn_implementation = _normalize_attention_implementation(attn_implementation) + self.local_transformer_attn_implementation = _normalize_attention_implementation( + local_transformer_attn_implementation, + default=self.attn_implementation, + ) + self.initializer_range = float(initializer_range) + + self.hidden_size = int(self.qwen3_config.hidden_size) + self.vocab_size = int(self.qwen3_config.vocab_size) + self.local_hidden_size = int(self.gpt2_config.hidden_size) + if self.local_hidden_size != self.hidden_size: + raise ValueError( + "This MOSS-TTS-Local-Transformer-v1.5 release expects local hidden size to " + "match Qwen3 hidden size so audio embeddings and heads are tied." + ) + + normalized_text_head_mode = str(local_text_head_mode or "full_vocab").strip().lower() + if normalized_text_head_mode in {"full", "full-vocab", "vocab"}: + normalized_text_head_mode = "full_vocab" + if normalized_text_head_mode not in {"full_vocab", "binary"}: + raise ValueError("local_text_head_mode must be 'full_vocab' or 'binary'.") + self.local_text_head_mode = normalized_text_head_mode + + kwargs.setdefault("tie_word_embeddings", True) + super().__init__(pad_token_id=self.pad_token_id, **kwargs) + + @property + def language_config(self) -> Qwen3Config: + return self.qwen3_config + + def to_dict(self) -> Dict[str, Any]: + output = super().to_dict() + output["qwen3_config"] = self.qwen3_config.to_dict() + output["language_config"] = self.qwen3_config.to_dict() + output["gpt2_config"] = self.gpt2_config.to_dict() + output["audio_pad_code"] = self.audio_pad_token_id + output["audio_assistant_gen_slot_token_id"] = self.audio_assistant_slot_token_id + return output diff --git a/examples/audio/PROVENANCE.json b/examples/audio/PROVENANCE.json new file mode 100644 index 0000000000000000000000000000000000000000..c4fba62041407f33fb4748e3ce1d7ef063cd0a33 --- /dev/null +++ b/examples/audio/PROVENANCE.json @@ -0,0 +1,26 @@ +[ + { + "file": "en_segment_reassembled.mp3", + "source_condition": "en-conversation-02-podcast-segment-free-n1", + "duration_s": 77.91, + "editing": "Verified script boundaries,150-ms tails,400-ms word-clock gaps. Internal pause compaction and optional VC were NOT applied." + }, + { + "file": "en_block_reassembled.mp3", + "source_condition": "en-conversation-01-podcast-block-free-n8", + "duration_s": 56.95, + "editing": "Verified script boundaries,150-ms tails,400-ms word-clock gaps. Internal pause compaction and optional VC were NOT applied." + }, + { + "file": "de_segment_reassembled.mp3", + "source_condition": "de-conversation-02-podcast-segment-free-n1", + "duration_s": 78.23, + "editing": "Verified script boundaries,150-ms tails,400-ms word-clock gaps. Internal pause compaction and optional VC were NOT applied." + }, + { + "file": "de_block_reassembled.mp3", + "source_condition": "de-conversation-01-podcast-block-free-n8", + "duration_s": 59.19, + "editing": "Verified script boundaries,150-ms tails,400-ms word-clock gaps. Internal pause compaction and optional VC were NOT applied." + } +] \ No newline at end of file diff --git a/examples/audio/de_block_reassembled.mp3 b/examples/audio/de_block_reassembled.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..a6f810569e335556f6ebd00a899eb178bdac8214 --- /dev/null +++ b/examples/audio/de_block_reassembled.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43462ee94dd0f48ddf3c149ba3450f6b0e08f33e471d124c1b7152f47540d4e2 +size 947756 diff --git a/examples/audio/de_segment_reassembled.mp3 b/examples/audio/de_segment_reassembled.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..e2fb1e5eafa00772c53a31444e2884751830fe3e --- /dev/null +++ b/examples/audio/de_segment_reassembled.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:070dfe22bae9fa125022d7ab36346c5d6cc5124fbad41553d0a40ea27d1d4ed5 +size 1252268 diff --git a/examples/audio/en_block_reassembled.mp3 b/examples/audio/en_block_reassembled.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..8bc159c53b734b6edcf1cfbf6b0be848c321b8ad --- /dev/null +++ b/examples/audio/en_block_reassembled.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efdeb8b807a286e5407ac09c4f5c0abc15288774aca734c9e992a0249d077c1b +size 911660 diff --git a/examples/audio/en_segment_reassembled.mp3 b/examples/audio/en_segment_reassembled.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..a39bc27e68617b1a363d783746db5fd7fbe55c71 --- /dev/null +++ b/examples/audio/en_segment_reassembled.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ed0d49e35a7866de27ee71a4112947f37226922d902cd7eeb6352666ec9fec1 +size 1247276 diff --git a/examples/episode_de.json b/examples/episode_de.json new file mode 100644 index 0000000000000000000000000000000000000000..fdd44a465219bfdb0cf909b417d39b24721b5441 --- /dev/null +++ b/examples/episode_de.json @@ -0,0 +1,83 @@ +{ + "language": "de", + "references": { + "S1": "references/de_s1.mp3", + "S2": "references/de_s2.mp3" + }, + "reference_codes": "references/de_anchors.npz", + "general": "A very genuine, warm, realistic conversation, pleasant and nice to listen to. Respond naturally to the other host; speak only the scripted words.", + "turns": [ + { + "speaker": "S1", + "text": "Ich habe Humaneness Podcast gehört, eine Feinabstimmung von Humaneness Voice Large.", + "direction": "warm, curious, quietly excited, genuine and pleasant to listen to", + "seconds": 3.93 + }, + { + "speaker": "S2", + "text": "Du klingst verdächtig begeistert. Hat dich ein Sprachmodell wirklich überrascht?", + "direction": "skeptical, teasing, genuinely surprised, genuine and pleasant to listen to", + "seconds": 3.57 + }, + { + "speaker": "S1", + "text": "Es liest ein Skript mit mehreren Stimmen und eigenen Spielanweisungen pro Satz.", + "direction": "engaged, confident, conversational, genuine and pleasant to listen to", + "seconds": 4.29 + }, + { + "speaker": "S2", + "text": "Moment, eine Stimme darf dir misstrauen, während die andere schon jubelt?", + "direction": "incredulous, playful doubt, genuine and pleasant to listen to", + "seconds": 3.93 + }, + { + "speaker": "S1", + "text": "Genau. Wir testen vierzig Emotionsklassen und behaupten nicht, dass jede perfekt gelingt.", + "direction": "thoughtful, candid, reassuring, genuine and pleasant to listen to", + "seconds": 4.29 + }, + { + "speaker": "S2", + "text": "Diese Einschränkung macht die Vorführung irgendwie glaubwürdiger. Ärgerlich vernünftig von dir.", + "direction": "amused, slightly vulnerable, genuine and pleasant to listen to", + "seconds": 3.93 + }, + { + "speaker": "S1", + "text": "Im Training kommen echte Gespräche und Schauspielbeispiele zusammen, damit beide Formate erhalten bleiben.", + "direction": "warm, matter-of-fact, genuine, genuine and pleasant to listen to", + "seconds": 4.64 + }, + { + "speaker": "S2", + "text": "Na gut. Zeig mir diese kleine Pause, bevor jemand widerwillig zugibt, beeindruckt zu sein.", + "direction": "wonder, affectionate teasing, relaxed amusement, genuine and pleasant to listen to", + "seconds": 5.0 + }, + { + "speaker": "S1", + "text": "Ich mag Gespräche, in denen noch Platz für eine echte, unerwartete Reaktion bleibt.", + "direction": "warm, curious, quietly excited, genuine and pleasant to listen to", + "seconds": 4.64 + }, + { + "speaker": "S2", + "text": "Ja, manchmal erzählt dieses kleine Zögern mehr als der nächste völlig glatt formulierte Satz.", + "direction": "skeptical, teasing, genuinely surprised, genuine and pleasant to listen to", + "seconds": 5.0 + }, + { + "speaker": "S1", + "text": "Dann hören wir genau hin, auch an den Stellen, an denen die schöne Illusion kurz zerbricht.", + "direction": "engaged, confident, conversational, genuine and pleasant to listen to", + "seconds": 5.71 + }, + { + "speaker": "S2", + "text": "Einverstanden. Ich möchte Wärme und Persönlichkeit hören und trotzdem erkennen, wer gerade spricht.", + "direction": "incredulous, playful doubt, genuine and pleasant to listen to", + "seconds": 4.64 + } + ] +} \ No newline at end of file diff --git a/examples/episode_en.json b/examples/episode_en.json new file mode 100644 index 0000000000000000000000000000000000000000..1c2970c6debb56f618db2d626c02b40124749bba --- /dev/null +++ b/examples/episode_en.json @@ -0,0 +1,83 @@ +{ + "language": "en", + "references": { + "S1": "references/de_s1.mp3", + "S2": "references/de_s2.mp3" + }, + "reference_codes": "references/de_anchors.npz", + "general": "A very genuine, warm, realistic conversation, pleasant and nice to listen to. Respond naturally to the other host; speak only the scripted words.", + "turns": [ + { + "speaker": "S1", + "text": "I have been listening to Humaneness Podcast, a fine-tune of Humaneness Voice Large.", + "direction": "warm, curious, quietly excited, genuine and pleasant to listen to", + "seconds": 4.33 + }, + { + "speaker": "S2", + "text": "You sound suspiciously excited. Did a speech model actually surprise you?", + "direction": "skeptical, teasing, genuinely surprised, genuine and pleasant to listen to", + "seconds": 3.67 + }, + { + "speaker": "S1", + "text": "It can read a script with different speakers and sentence-level acting directions.", + "direction": "engaged, confident, conversational, genuine and pleasant to listen to", + "seconds": 4.0 + }, + { + "speaker": "S2", + "text": "Wait, so I can ask one voice to doubt you while the other celebrates?", + "direction": "incredulous, playful doubt, genuine and pleasant to listen to", + "seconds": 4.67 + }, + { + "speaker": "S1", + "text": "Exactly. We are testing forty emotion labels, not claiming forty perfect performances.", + "direction": "thoughtful, candid, reassuring, genuine and pleasant to listen to", + "seconds": 4.0 + }, + { + "speaker": "S2", + "text": "That distinction makes me trust the demonstration a little more. Annoyingly sensible of you.", + "direction": "amused, slightly vulnerable, genuine and pleasant to listen to", + "seconds": 4.67 + }, + { + "speaker": "S1", + "text": "The new training mixes real conversations with acting examples to retain both formats.", + "direction": "warm, matter-of-fact, genuine, genuine and pleasant to listen to", + "seconds": 4.33 + }, + { + "speaker": "S2", + "text": "All right, show me the awkward pause before someone finally admits they are impressed.", + "direction": "wonder, affectionate teasing, relaxed amusement, genuine and pleasant to listen to", + "seconds": 4.67 + }, + { + "speaker": "S1", + "text": "There is something lovely about a conversation that leaves room for a real reaction.", + "direction": "warm, curious, quietly excited, genuine and pleasant to listen to", + "seconds": 4.67 + }, + { + "speaker": "S2", + "text": "Yes, a tiny hesitation can say more than another perfectly polished sentence.", + "direction": "skeptical, teasing, genuinely surprised, genuine and pleasant to listen to", + "seconds": 4.0 + }, + { + "speaker": "S1", + "text": "So let us compare the voices carefully, including the moments where the illusion breaks.", + "direction": "engaged, confident, conversational, genuine and pleasant to listen to", + "seconds": 4.67 + }, + { + "speaker": "S2", + "text": "Agreed. I want warmth and character, and I still want to recognize who is talking.", + "direction": "incredulous, playful doubt, genuine and pleasant to listen to", + "seconds": 5.0 + } + ] +} \ No newline at end of file diff --git a/examples/references/PROVENANCE.json b/examples/references/PROVENANCE.json new file mode 100644 index 0000000000000000000000000000000000000000..9670d9359144c2fe7d52319d91f73adc1deb614f --- /dev/null +++ b/examples/references/PROVENANCE.json @@ -0,0 +1,30 @@ +[ + { + "pack": "de-synthetic-reference", + "language": "de", + "speaker_files": [ + "de_s1.mp3", + "de_s2.mp3" + ], + "codes": "de_anchors.npz", + "conditioning_frames": { + "S1": 181, + "S2": 163 + }, + "source_terms": "Original source terms; this model release does not relicense source recordings. German anchors were supplied by the experiment owner; English anchors are the previously approved short real-podcast reference excerpts." + }, + { + "pack": "en-real-2", + "language": "en", + "speaker_files": [ + "en_s1.mp3", + "en_s2.mp3" + ], + "codes": "en_anchors.npz", + "conditioning_frames": { + "S1": 117, + "S2": 145 + }, + "source_terms": "Original source terms; this model release does not relicense source recordings. German anchors were supplied by the experiment owner; English anchors are the previously approved short real-podcast reference excerpts." + } +] \ No newline at end of file diff --git a/examples/references/de_anchors.npz b/examples/references/de_anchors.npz new file mode 100644 index 0000000000000000000000000000000000000000..5944a18682bf0926215bd8320257f0fdd9c4c2f6 --- /dev/null +++ b/examples/references/de_anchors.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27c051d23d584df782cfcf4abd4051700838169d7bf2a0610b077ec1d30eccdf +size 6799 diff --git a/examples/references/de_s1.mp3 b/examples/references/de_s1.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..9fe326bfd498b942765becf32c2748bf77262743 --- /dev/null +++ b/examples/references/de_s1.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d5a7823fea82182d6a3ec378e15ae03b0bd61f028c6f50fb6c5b82fb1f1b7dd +size 232364 diff --git a/examples/references/de_s2.mp3 b/examples/references/de_s2.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..bc0dd8aee2b7d243029a5c39603e1547f5f01e73 --- /dev/null +++ b/examples/references/de_s2.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2da04db22aeb44206e4f935e95919846e3e5bb4cb116503a7a260c9f48752cd +size 209324 diff --git a/examples/references/en_anchors.npz b/examples/references/en_anchors.npz new file mode 100644 index 0000000000000000000000000000000000000000..57335f40bf14b9c463a262666780b1dcda984eb2 --- /dev/null +++ b/examples/references/en_anchors.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed071500398ed41980e5ddc81bfc4b928a1469a7e6874792af033b52b92af989 +size 5199 diff --git a/examples/references/en_s1.mp3 b/examples/references/en_s1.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..092bd68d4da1f9e1175b52bd263fd7428e2b1049 --- /dev/null +++ b/examples/references/en_s1.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b630face220f977dc36e01db02f22063b7f2e4188439e272dc3a02f552082722 +size 150188 diff --git a/examples/references/en_s2.mp3 b/examples/references/en_s2.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..d67be8a2f297ec8f1fbf799b1cca570dd89738de --- /dev/null +++ b/examples/references/en_s2.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:517e5ff6a62e393ac995985a03535ad367322aad14ac5caba3b7b2ee6d2daf92 +size 186284 diff --git a/examples/short_de.json b/examples/short_de.json new file mode 100644 index 0000000000000000000000000000000000000000..dced6d61f5cbd8adc2e7681c1c30bf7b0800ca1b --- /dev/null +++ b/examples/short_de.json @@ -0,0 +1,23 @@ +{ + "language": "de", + "references": { + "S1": "references/de_s1.mp3", + "S2": "references/de_s2.mp3" + }, + "reference_codes": "references/de_anchors.npz", + "general": "A very genuine, warm, realistic conversation, pleasant and nice to listen to. Respond naturally to the other host; speak only the scripted words.", + "turns": [ + { + "speaker": "S1", + "text": "Ich habe Humaneness Podcast gehört, eine Feinabstimmung von Humaneness Voice Large.", + "direction": "warm, curious, quietly excited, genuine and pleasant to listen to", + "seconds": 3.93 + }, + { + "speaker": "S2", + "text": "Du klingst verdächtig begeistert. Hat dich ein Sprachmodell wirklich überrascht?", + "direction": "skeptical, teasing, genuinely surprised, genuine and pleasant to listen to", + "seconds": 3.57 + } + ] +} \ No newline at end of file diff --git a/examples/short_en.json b/examples/short_en.json new file mode 100644 index 0000000000000000000000000000000000000000..1c6e0b89631a4b2d8052dc5b514c0a66f6f43304 --- /dev/null +++ b/examples/short_en.json @@ -0,0 +1,23 @@ +{ + "language": "en", + "references": { + "S1": "references/de_s1.mp3", + "S2": "references/de_s2.mp3" + }, + "reference_codes": "references/de_anchors.npz", + "general": "A very genuine, warm, realistic conversation, pleasant and nice to listen to. Respond naturally to the other host; speak only the scripted words.", + "turns": [ + { + "speaker": "S1", + "text": "I have been listening to Humaneness Podcast, a fine-tune of Humaneness Voice Large.", + "direction": "warm, curious, quietly excited, genuine and pleasant to listen to", + "seconds": 4.33 + }, + { + "speaker": "S2", + "text": "You sound suspiciously excited. Did a speech model actually surprise you?", + "direction": "skeptical, teasing, genuinely surprised, genuine and pleasant to listen to", + "seconds": 3.67 + } + ] +} \ No newline at end of file diff --git a/generation_config.json b/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5223f3a50fc9ddcde83df3e1293a2a08069692b5 --- /dev/null +++ b/generation_config.json @@ -0,0 +1,7 @@ +{ + "_from_model_config": true, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 151643, + "transformers_version": "5.14.1" +} diff --git a/gpt2_decoder.py b/gpt2_decoder.py new file mode 100644 index 0000000000000000000000000000000000000000..84c597cf1bcca240562dec1417a53fb19f47bfca --- /dev/null +++ b/gpt2_decoder.py @@ -0,0 +1,721 @@ +# coding=utf-8 +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +import torch +import torch.nn as nn +import torch.utils.checkpoint +from transformers.activations import ACT2FN +from transformers.modeling_outputs import BaseModelOutputWithPast +from transformers.models.gpt2.configuration_gpt2 import GPT2Config + +try: + from flash_attn import flash_attn_func, flash_attn_varlen_func + from flash_attn.bert_padding import pad_input, unpad_input + + _FLASH_ATTN_AVAILABLE = True +except Exception: + flash_attn_func = None + flash_attn_varlen_func = None + pad_input = None + unpad_input = None + _FLASH_ATTN_AVAILABLE = False + + +@dataclass +class PackedSequenceMetadata: + cu_seqlens: torch.Tensor + max_seqlen: int + indices: Optional[torch.Tensor] = None + batch_size: Optional[int] = None + seq_len: Optional[int] = None + + +def _is_static_kv_cache_layer(layer_past: object) -> bool: + return isinstance(layer_past, dict) and bool(layer_past.get("static_kv_cache", False)) + + +class MossTTSNanoGPT2RotaryEmbedding(nn.Module): + def __init__(self, dim: int, base: float = 10000.0) -> None: + super().__init__() + if dim % 2 != 0: + raise ValueError(f"RoPE head_dim must be even, got {dim}") + self.dim = int(dim) + self.base = float(base) + self.register_buffer("inv_freq", self._compute_inv_freq(), persistent=False) + + def _compute_inv_freq(self, device: Optional[torch.device] = None) -> torch.Tensor: + return 1.0 / ( + self.base ** (torch.arange(0, self.dim, 2, device=device, dtype=torch.float32) / self.dim) + ) + + def forward( + self, + position_ids: torch.LongTensor, + *, + device: torch.device, + dtype: torch.dtype, + ) -> tuple[torch.Tensor, torch.Tensor]: + if position_ids.ndim == 1: + position_ids = position_ids.unsqueeze(0) + inv_freq = self._compute_inv_freq(device=device) + freqs = torch.einsum("bs,d->bsd", position_ids.to(device=device, dtype=inv_freq.dtype), inv_freq) + cos = freqs.cos().repeat_interleave(2, dim=-1).unsqueeze(2).to(dtype=dtype) + sin = freqs.sin().repeat_interleave(2, dim=-1).unsqueeze(2).to(dtype=dtype) + return cos, sin + + +def rotate_half(hidden_states: torch.Tensor) -> torch.Tensor: + even = hidden_states[..., ::2] + odd = hidden_states[..., 1::2] + return torch.stack((-odd, even), dim=-1).reshape_as(hidden_states) + + +def apply_rotary_pos_emb( + hidden_states: torch.Tensor, + cos: torch.Tensor, + sin: torch.Tensor, +) -> torch.Tensor: + return (hidden_states * cos) + (rotate_half(hidden_states) * sin) + + +class MossTTSNanoGPT2MLP(nn.Module): + def __init__(self, config: GPT2Config) -> None: + super().__init__() + hidden_size = int(config.hidden_size) + inner_size = int(config.n_inner or 4 * hidden_size) + self.fc_in = nn.Linear(hidden_size, inner_size) + self.fc_out = nn.Linear(inner_size, hidden_size) + self.act = ACT2FN[config.activation_function] + self.dropout = nn.Dropout(config.resid_pdrop) + + def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: + hidden_states = self.fc_in(hidden_states) + hidden_states = self.act(hidden_states) + hidden_states = self.fc_out(hidden_states) + return self.dropout(hidden_states) + + +class MossTTSNanoGPT2Attention(nn.Module): + def __init__(self, config: GPT2Config, layer_idx: int, attn_implementation: str) -> None: + super().__init__() + hidden_size = int(config.hidden_size) + num_heads = int(config.num_attention_heads) + if hidden_size % num_heads != 0: + raise ValueError(f"hidden_size={hidden_size} must be divisible by num_attention_heads={num_heads}") + + self.num_heads = num_heads + self.head_dim = hidden_size // num_heads + self.embed_dim = hidden_size + self.layer_idx = layer_idx + self.attn_implementation = attn_implementation + self.attn_dropout = float(config.attn_pdrop) + self.resid_dropout = nn.Dropout(config.resid_pdrop) + self.scale_attn_weights = bool(getattr(config, "scale_attn_weights", True)) + self.scale_attn_by_inverse_layer_idx = bool(getattr(config, "scale_attn_by_inverse_layer_idx", False)) + self.position_embedding_type = str(getattr(config, "position_embedding_type", "absolute")).lower() + if self.position_embedding_type not in {"absolute", "rope"}: + raise ValueError(f"Unsupported position_embedding_type={self.position_embedding_type!r}") + + self.c_attn = nn.Linear(hidden_size, 3 * hidden_size) + self.c_proj = nn.Linear(hidden_size, hidden_size) + self.rotary_emb = None + if self.position_embedding_type == "rope": + self.rotary_emb = MossTTSNanoGPT2RotaryEmbedding( + self.head_dim, + base=float(getattr(config, "rope_base", 10000.0)), + ) + + def _split_heads(self, tensor: torch.Tensor) -> torch.Tensor: + if tensor.ndim == 3: + batch_size, seq_len, _ = tensor.shape + return tensor.view(batch_size, seq_len, self.num_heads, self.head_dim) + if tensor.ndim == 2: + total_tokens, _ = tensor.shape + return tensor.view(total_tokens, self.num_heads, self.head_dim) + raise ValueError(f"Unsupported tensor rank for attention split: {tensor.ndim}") + + def _merge_heads(self, tensor: torch.Tensor) -> torch.Tensor: + if tensor.ndim == 4: + batch_size, seq_len, _, _ = tensor.shape + return tensor.reshape(batch_size, seq_len, self.embed_dim) + if tensor.ndim == 3: + total_tokens, _, _ = tensor.shape + return tensor.reshape(total_tokens, self.embed_dim) + raise ValueError(f"Unsupported tensor rank for attention merge: {tensor.ndim}") + + def _causal_attention_mask( + self, + attention_mask: Optional[torch.Tensor], + query_length: int, + key_length: int, + device: torch.device, + ) -> torch.Tensor: + query_positions = torch.arange(query_length, device=device, dtype=torch.long) + query_positions = query_positions + max(key_length - query_length, 0) + key_positions = torch.arange(key_length, device=device, dtype=torch.long) + causal = key_positions.unsqueeze(0) <= query_positions.unsqueeze(1) + causal = causal.unsqueeze(0).unsqueeze(0) + if attention_mask is None: + return causal + key_mask = attention_mask[:, None, None, :].to(dtype=torch.bool) + return causal & key_mask + + def _eager_attention( + self, + query: torch.Tensor, + key: torch.Tensor, + value: torch.Tensor, + attention_mask: Optional[torch.Tensor], + ) -> torch.Tensor: + query = query.transpose(1, 2) + key = key.transpose(1, 2) + value = value.transpose(1, 2) + + scale = 1.0 + if self.scale_attn_weights: + scale /= self.head_dim ** 0.5 + if self.scale_attn_by_inverse_layer_idx: + scale /= float(self.layer_idx + 1) + + scores = torch.matmul(query, key.transpose(-1, -2)) * scale + causal_mask = self._causal_attention_mask( + attention_mask=attention_mask, + query_length=query.shape[-2], + key_length=key.shape[-2], + device=query.device, + ) + scores = scores.masked_fill(~causal_mask, torch.finfo(scores.dtype).min) + probs = torch.softmax(scores, dim=-1) + if self.training and self.attn_dropout > 0: + probs = torch.dropout(probs, self.attn_dropout, train=True) + output = torch.matmul(probs, value) + return output.transpose(1, 2).contiguous() + + def _sdpa_attention( + self, + query: torch.Tensor, + key: torch.Tensor, + value: torch.Tensor, + attention_mask: Optional[torch.Tensor], + ) -> torch.Tensor: + query = query.transpose(1, 2) + key = key.transpose(1, 2) + value = value.transpose(1, 2) + mask = None + if attention_mask is not None or query.shape[-2] != key.shape[-2]: + mask = self._causal_attention_mask( + attention_mask=attention_mask, + query_length=query.shape[-2], + key_length=key.shape[-2], + device=query.device, + ) + output = torch.nn.functional.scaled_dot_product_attention( + query, + key, + value, + attn_mask=mask, + dropout_p=self.attn_dropout if self.training else 0.0, + is_causal=mask is None, + ) + return output.transpose(1, 2).contiguous() + + def _flash_attention( + self, + query: torch.Tensor, + key: torch.Tensor, + value: torch.Tensor, + attention_mask: Optional[torch.Tensor], + packed_metadata: Optional[PackedSequenceMetadata], + ) -> torch.Tensor: + if not _FLASH_ATTN_AVAILABLE: + raise ImportError("flash_attn is not installed, but attn_implementation='flash_attention_2' was requested.") + if query.device.type != "cuda": + raise ValueError("flash_attention_2 requires CUDA tensors.") + if query.dtype not in (torch.float16, torch.bfloat16): + raise ValueError( + f"flash_attention_2 requires fp16/bf16 tensors, but received dtype={query.dtype}." + ) + + dropout_p = self.attn_dropout if self.training else 0.0 + if packed_metadata is not None: + if packed_metadata.indices is not None: + query = query.reshape(-1, self.num_heads, self.head_dim).index_select(0, packed_metadata.indices) + key = key.reshape(-1, self.num_heads, self.head_dim).index_select(0, packed_metadata.indices) + value = value.reshape(-1, self.num_heads, self.head_dim).index_select(0, packed_metadata.indices) + output = flash_attn_varlen_func( + query, + key, + value, + packed_metadata.cu_seqlens, + packed_metadata.cu_seqlens, + packed_metadata.max_seqlen, + packed_metadata.max_seqlen, + dropout_p=dropout_p, + causal=True, + ) + if packed_metadata.indices is None: + return output + return pad_input( + output, + packed_metadata.indices, + packed_metadata.batch_size, + packed_metadata.seq_len, + ) + + if attention_mask is None or bool(attention_mask.all()): + return flash_attn_func( + query, + key, + value, + dropout_p=dropout_p, + causal=True, + ) + + if query.shape[1] != key.shape[1]: + query_attention_mask = attention_mask[:, -query.shape[1] :] + unpadded_query, query_indices, cu_seqlens_q, max_seqlen_q, _ = unpad_input( + query, + query_attention_mask, + ) + unpadded_key, _, cu_seqlens_k, max_seqlen_k, _ = unpad_input(key, attention_mask) + unpadded_value, _, _, _, _ = unpad_input(value, attention_mask) + output = flash_attn_varlen_func( + unpadded_query, + unpadded_key, + unpadded_value, + cu_seqlens_q, + cu_seqlens_k, + max_seqlen_q, + max_seqlen_k, + dropout_p=dropout_p, + causal=True, + ) + return pad_input(output, query_indices, query.shape[0], query.shape[1]) + + unpadded_query, indices, cu_seqlens, max_seqlen, _ = unpad_input(query, attention_mask) + unpadded_key, _, _, _, _ = unpad_input(key, attention_mask) + unpadded_value, _, _, _, _ = unpad_input(value, attention_mask) + output = flash_attn_varlen_func( + unpadded_query, + unpadded_key, + unpadded_value, + cu_seqlens, + cu_seqlens, + max_seqlen, + max_seqlen, + dropout_p=dropout_p, + causal=True, + ) + return pad_input(output, indices, query.shape[0], query.shape[1]) + + def forward( + self, + hidden_states: torch.Tensor, + attention_mask: Optional[torch.Tensor] = None, + position_ids: Optional[torch.LongTensor] = None, + packed_metadata: Optional[PackedSequenceMetadata] = None, + layer_past: Optional[tuple[torch.Tensor, torch.Tensor]] = None, + use_cache: bool = False, + ) -> tuple[torch.Tensor, Optional[tuple[torch.Tensor, torch.Tensor]]]: + qkv = self.c_attn(hidden_states) + query, key, value = qkv.split(self.embed_dim, dim=-1) + query = self._split_heads(query) + key = self._split_heads(key) + value = self._split_heads(value) + + if self.rotary_emb is not None: + if position_ids is None: + raise ValueError("position_ids must be provided when position_embedding_type='rope'.") + cos, sin = self.rotary_emb( + position_ids.to(device=query.device), + device=query.device, + dtype=query.dtype, + ) + query = apply_rotary_pos_emb(query, cos, sin) + key = apply_rotary_pos_emb(key, cos, sin) + + static_layer_past = layer_past is not None and _is_static_kv_cache_layer(layer_past) + if static_layer_past: + past_length = int(layer_past.get("length", 0)) + new_length = past_length + int(key.shape[1]) + key_cache = layer_past["key"] + value_cache = layer_past["value"] + if new_length > int(key_cache.shape[1]): + raise ValueError( + f"Static KV cache is too short: need {new_length}, capacity={int(key_cache.shape[1])}." + ) + key_cache[:, past_length:new_length].copy_(key) + value_cache[:, past_length:new_length].copy_(value) + key = key_cache[:, :new_length] + value = value_cache[:, :new_length] + layer_past["length"] = new_length + elif layer_past is not None: + past_key, past_value = layer_past + key = torch.cat([past_key.to(device=key.device, dtype=key.dtype), key], dim=1) + value = torch.cat([past_value.to(device=value.device, dtype=value.dtype), value], dim=1) + + present = layer_past if (use_cache and static_layer_past) else ((key, value) if use_cache else None) + + if self.attn_implementation == "flash_attention_2": + attn_output = self._flash_attention( + query=query, + key=key, + value=value, + attention_mask=attention_mask, + packed_metadata=packed_metadata, + ) + elif self.attn_implementation == "sdpa": + attn_output = self._sdpa_attention( + query=query, + key=key, + value=value, + attention_mask=attention_mask, + ) + else: + attn_output = self._eager_attention( + query=query, + key=key, + value=value, + attention_mask=attention_mask, + ) + + attn_output = self._merge_heads(attn_output) + attn_output = self.c_proj(attn_output) + return self.resid_dropout(attn_output), present + + +class MossTTSNanoGPT2Block(nn.Module): + def __init__(self, config: GPT2Config, layer_idx: int, attn_implementation: str) -> None: + super().__init__() + hidden_size = int(config.hidden_size) + self.ln_1 = nn.LayerNorm(hidden_size, eps=config.layer_norm_epsilon) + self.attn = MossTTSNanoGPT2Attention(config, layer_idx=layer_idx, attn_implementation=attn_implementation) + self.ln_2 = nn.LayerNorm(hidden_size, eps=config.layer_norm_epsilon) + self.mlp = MossTTSNanoGPT2MLP(config) + + def forward( + self, + hidden_states: torch.Tensor, + attention_mask: Optional[torch.Tensor] = None, + position_ids: Optional[torch.LongTensor] = None, + packed_metadata: Optional[PackedSequenceMetadata] = None, + layer_past: Optional[tuple[torch.Tensor, torch.Tensor]] = None, + use_cache: bool = False, + ) -> tuple[torch.Tensor, Optional[tuple[torch.Tensor, torch.Tensor]]]: + attn_output, present = self.attn( + self.ln_1(hidden_states), + attention_mask=attention_mask, + position_ids=position_ids, + packed_metadata=packed_metadata, + layer_past=layer_past, + use_cache=use_cache, + ) + hidden_states = hidden_states + attn_output + hidden_states = hidden_states + self.mlp(self.ln_2(hidden_states)) + return hidden_states, present + + +class MossTTSNanoGPT2Model(nn.Module): + def __init__(self, config: GPT2Config, attn_implementation: str = "eager") -> None: + super().__init__() + self.config = config + self.attn_implementation = attn_implementation + self.position_embedding_type = str(getattr(config, "position_embedding_type", "absolute")).lower() + if self.position_embedding_type not in {"absolute", "rope"}: + raise ValueError(f"Unsupported position_embedding_type={self.position_embedding_type!r}") + hidden_size = int(config.hidden_size) + self.wte = nn.Embedding(config.vocab_size, hidden_size) + self.wpe = nn.Embedding(config.n_positions, hidden_size) if self.position_embedding_type == "absolute" else nn.Identity() + self.drop = nn.Dropout(config.embd_pdrop) + self.h = nn.ModuleList( + [MossTTSNanoGPT2Block(config, layer_idx=index, attn_implementation=attn_implementation) for index in range(config.n_layer)] + ) + self.ln_f = nn.LayerNorm(hidden_size, eps=config.layer_norm_epsilon) + self.gradient_checkpointing = False + self._reset_parameters() + + def _reset_parameters(self) -> None: + init_std = float(self.config.initializer_range) + for module in self.modules(): + if isinstance(module, nn.Linear): + nn.init.normal_(module.weight, mean=0.0, std=init_std) + if module.bias is not None: + nn.init.zeros_(module.bias) + elif isinstance(module, nn.Embedding): + nn.init.normal_(module.weight, mean=0.0, std=init_std) + elif isinstance(module, nn.LayerNorm): + nn.init.ones_(module.weight) + nn.init.zeros_(module.bias) + + @staticmethod + def _normalize_num_sequences( + cu_seqlens: torch.Tensor, + num_sequences: Optional[torch.Tensor], + device: torch.device, + ) -> torch.Tensor: + if cu_seqlens.ndim == 1: + cu_seqlens = cu_seqlens.unsqueeze(0) + if num_sequences is None: + diffs = cu_seqlens[:, 1:] - cu_seqlens[:, :-1] + return diffs.gt(0).sum(dim=-1).to(device=device, dtype=torch.long) + if num_sequences.ndim == 0: + num_sequences = num_sequences.unsqueeze(0) + return num_sequences.to(device=device, dtype=torch.long) + + @staticmethod + def _packed_segments_from_cu_seqlens( + cu_seqlens: torch.Tensor, + num_sequences: Optional[torch.Tensor], + device: torch.device, + ) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + if cu_seqlens.ndim == 1: + cu_seqlens = cu_seqlens.unsqueeze(0) + cu_seqlens = cu_seqlens.to(device=device) + batch_size, boundary_count = cu_seqlens.shape + segment_slots = boundary_count - 1 + if segment_slots <= 0: + empty = torch.empty(0, dtype=torch.long, device=device) + return empty, empty, empty + + counts = MossTTSNanoGPT2Model._normalize_num_sequences(cu_seqlens, num_sequences, device=device) + counts = counts.clamp(min=0, max=segment_slots) + segment_slots = int(counts.max().item()) if counts.numel() > 0 else 0 + if segment_slots <= 0: + empty = torch.empty(0, dtype=torch.long, device=device) + return empty, empty, empty + cu_seqlens = cu_seqlens[:, : segment_slots + 1] + slot_ids = torch.arange(segment_slots, device=device).unsqueeze(0) + valid_slots = slot_ids < counts.unsqueeze(1) + + starts = cu_seqlens[:, :-1].to(dtype=torch.long) + ends = cu_seqlens[:, 1:].to(dtype=torch.long) + lengths = (ends - starts).clamp_min(0) + lengths = torch.where(valid_slots, lengths, torch.zeros((), dtype=torch.long, device=device)) + + batch_ids = torch.arange(batch_size, device=device, dtype=torch.long).unsqueeze(1).expand(batch_size, segment_slots) + batch_ids = batch_ids.reshape(-1) + starts = starts.reshape(-1) + lengths = lengths.reshape(-1) + + valid_segments = lengths.gt(0) + valid_count = int(valid_segments.to(dtype=torch.long).sum().item()) + if valid_count <= 0: + empty = torch.empty(0, dtype=torch.long, device=device) + return empty, empty, empty + if valid_count == lengths.numel(): + return batch_ids, starts, lengths + + valid_order = torch.argsort(valid_segments.to(dtype=torch.long), descending=True, stable=True)[:valid_count] + return ( + batch_ids.index_select(0, valid_order), + starts.index_select(0, valid_order), + lengths.index_select(0, valid_order), + ) + + @staticmethod + def _packed_token_indices( + batch_ids: torch.Tensor, + starts: torch.Tensor, + lengths: torch.Tensor, + seq_len: int, + ) -> tuple[torch.Tensor, torch.Tensor]: + total_tokens = int(lengths.sum().item()) + if total_tokens <= 0: + empty = torch.empty(0, dtype=torch.long, device=lengths.device) + return empty, empty + + segment_ids = torch.repeat_interleave( + torch.arange(lengths.numel(), device=lengths.device, dtype=torch.long), + lengths, + output_size=total_tokens, + ) + segment_starts = torch.cumsum(lengths, dim=0) - lengths + positions = torch.arange(total_tokens, device=lengths.device, dtype=torch.long) - segment_starts[segment_ids] + indices = batch_ids[segment_ids] * seq_len + starts[segment_ids] + positions + return indices, positions + + @staticmethod + def build_packed_position_ids( + attention_mask: Optional[torch.Tensor], + cu_seqlens: torch.Tensor, + num_sequences: Optional[torch.Tensor], + sequence_length: Optional[int] = None, + ) -> torch.Tensor: + if cu_seqlens.ndim == 1: + cu_seqlens = cu_seqlens.unsqueeze(0) + batch_size = cu_seqlens.shape[0] + seq_len = int(sequence_length or (cu_seqlens.shape[1] - 1)) + device = cu_seqlens.device + position_ids = torch.zeros((batch_size, seq_len), dtype=torch.long, device=device) + batch_ids, starts, lengths = MossTTSNanoGPT2Model._packed_segments_from_cu_seqlens( + cu_seqlens, + num_sequences, + device, + ) + if lengths.numel() > 0: + indices, positions = MossTTSNanoGPT2Model._packed_token_indices(batch_ids, starts, lengths, seq_len) + position_ids.view(-1).scatter_(0, indices, positions) + if attention_mask is not None: + position_ids = position_ids * attention_mask.to(dtype=position_ids.dtype) + return position_ids + + @staticmethod + def build_packed_metadata( + hidden_states: torch.Tensor, + cu_seqlens: torch.Tensor, + num_sequences: Optional[torch.Tensor], + ) -> PackedSequenceMetadata: + if cu_seqlens.ndim == 1: + cu_seqlens = cu_seqlens.unsqueeze(0) + device = hidden_states.device + seq_len = hidden_states.shape[1] + batch_ids, starts, lengths = MossTTSNanoGPT2Model._packed_segments_from_cu_seqlens( + cu_seqlens, + num_sequences, + device, + ) + if lengths.numel() == 0: + raise ValueError("cu_seqlens did not describe any non-empty packed sequences.") + + indices, _ = MossTTSNanoGPT2Model._packed_token_indices(batch_ids, starts, lengths, seq_len) + cumulative = torch.empty(lengths.numel() + 1, dtype=torch.int32, device=device) + cumulative[0] = 0 + cumulative[1:] = lengths.to(dtype=torch.int32).cumsum(dim=0) + return PackedSequenceMetadata( + cu_seqlens=cumulative, + max_seqlen=int(lengths.max().item()), + indices=indices, + batch_size=hidden_states.shape[0], + seq_len=hidden_states.shape[1], + ) + + def forward( + self, + input_ids: Optional[torch.LongTensor] = None, + past_key_values: Optional[tuple[tuple[torch.Tensor, torch.Tensor], ...]] = None, + attention_mask: Optional[torch.Tensor] = None, + position_ids: Optional[torch.LongTensor] = None, + inputs_embeds: Optional[torch.FloatTensor] = None, + use_cache: Optional[bool] = None, + output_attentions: Optional[bool] = None, + output_hidden_states: Optional[bool] = None, + return_dict: bool = True, + cu_seqlens: Optional[torch.Tensor] = None, + num_sequences: Optional[torch.Tensor] = None, + ) -> BaseModelOutputWithPast: + del input_ids, output_attentions + + if inputs_embeds is None: + raise ValueError("inputs_embeds must be provided.") + + use_cache = bool(use_cache) + if use_cache and cu_seqlens is not None: + raise ValueError("use_cache=True is not supported together with cu_seqlens packing.") + + hidden_states = inputs_embeds + query_attention_mask = None + if attention_mask is not None: + attention_mask = attention_mask.to(dtype=torch.bool, device=hidden_states.device) + query_attention_mask = attention_mask[:, -hidden_states.shape[1] :] + + packed_metadata = None + if position_ids is None: + if cu_seqlens is not None: + if attention_mask is None: + raise ValueError("attention_mask must be provided with cu_seqlens packing.") + position_ids = self.build_packed_position_ids( + attention_mask=attention_mask, + cu_seqlens=cu_seqlens.to(device=hidden_states.device), + num_sequences=num_sequences.to(device=hidden_states.device) if num_sequences is not None else None, + sequence_length=hidden_states.shape[1], + ) + elif attention_mask is not None: + position_ids = attention_mask.long().cumsum(dim=-1) - 1 + position_ids = position_ids.masked_fill(~attention_mask, 0) + position_ids = position_ids[:, -hidden_states.shape[1] :] + else: + past_length = 0 + if past_key_values is not None and len(past_key_values) > 0: + first_layer_past = past_key_values[0] + if _is_static_kv_cache_layer(first_layer_past): + past_length = int(first_layer_past.get("length", 0)) + else: + past_length = first_layer_past[0].shape[1] + position_ids = torch.arange(hidden_states.shape[1], device=hidden_states.device, dtype=torch.long) + position_ids = position_ids + past_length + position_ids = position_ids.unsqueeze(0).expand(hidden_states.shape[0], -1) + + if cu_seqlens is not None and self.attn_implementation == "flash_attention_2": + packed_metadata = self.build_packed_metadata( + hidden_states=hidden_states, + cu_seqlens=cu_seqlens.to(device=hidden_states.device), + num_sequences=num_sequences.to(device=hidden_states.device) if num_sequences is not None else None, + ) + + if self.position_embedding_type == "absolute": + hidden_states = hidden_states + self.wpe(position_ids) + hidden_states = self.drop(hidden_states) + if query_attention_mask is not None: + hidden_states = hidden_states * query_attention_mask.unsqueeze(-1).to(dtype=hidden_states.dtype) + + all_hidden_states = () if output_hidden_states else None + presents = [] if use_cache else None + for layer_index, block in enumerate(self.h): + if output_hidden_states: + all_hidden_states = all_hidden_states + (hidden_states,) + + if self.gradient_checkpointing and self.training: + if use_cache: + raise ValueError("use_cache=True is not supported when gradient checkpointing is enabled during training.") + + def custom_forward(*inputs): + output, _ = block( + inputs[0], + attention_mask=inputs[1], + position_ids=inputs[2], + packed_metadata=packed_metadata, + layer_past=None, + use_cache=False, + ) + return output + + hidden_states = torch.utils.checkpoint.checkpoint( + custom_forward, + hidden_states, + attention_mask, + position_ids, + use_reentrant=False, + ) + present = None + else: + hidden_states, present = block( + hidden_states, + attention_mask=attention_mask, + position_ids=position_ids, + packed_metadata=packed_metadata, + layer_past=None if past_key_values is None else past_key_values[layer_index], + use_cache=use_cache, + ) + if query_attention_mask is not None: + hidden_states = hidden_states * query_attention_mask.unsqueeze(-1).to(dtype=hidden_states.dtype) + if presents is not None: + presents.append(present) + + hidden_states = self.ln_f(hidden_states) + if query_attention_mask is not None: + hidden_states = hidden_states * query_attention_mask.unsqueeze(-1).to(dtype=hidden_states.dtype) + if output_hidden_states: + all_hidden_states = all_hidden_states + (hidden_states,) + + if not return_dict: + return (hidden_states, tuple(presents) if presents is not None else None, all_hidden_states, None) + + return BaseModelOutputWithPast( + last_hidden_state=hidden_states, + past_key_values=tuple(presents) if presents is not None else None, + hidden_states=all_hidden_states, + attentions=None, + ) diff --git a/guides/AGENT_GUIDE.md b/guides/AGENT_GUIDE.md new file mode 100644 index 0000000000000000000000000000000000000000..474a1c147e8708de80163f89c8716691f6853456 --- /dev/null +++ b/guides/AGENT_GUIDE.md @@ -0,0 +1,15 @@ +# Agent reference — current Podcast default + +1. Read the main README, [PROMPTING.md](PROMPTING.md) and [PIPELINE.md](PIPELINE.md). Current default is `spontaneous`, approved by the listener on 8 November 2026. Do not confuse it with the earlier exaggerated sentence-emotion variant. +2. Use the full `laion/Humanness-Voice-Podcast` checkpoint, pinned weight revision 91f8110cd815f2233301a8b1dd16dbbf3fae8e05, not the parent Large 1.7 weights and not a LoRA. Download the separately linked codec and judges. +3. Have an API or local LLM write literal dialogue and sparse cues as validated JSON. It is much less laborious than hand-authoring every cue. TTS itself needs no LLM API key. Preserve supplied literal text exactly. +4. Recommended multi-speaker episodes consist of independently conditioned turns. Keep one fixed reference per speaker. Use `--script` and `--references` for custom input. Update/remove cached codes when changing reference audio. +5. Temperature 1.0, CFG 2.5, top-p 0.95, top-k 50, BF16, free timing. At most 25.6 s per turn; split long text. No VC, DPO or added LoRA. +6. Default N4 ranks each raw candidate with .5*clip(native Ears genuineness/6)+.5*clip(ECAPA reference cosine), both clipped to [0,1]. No CE or WER factor/gate. N2 uses the same formula. N1 keeps the sole take and skips online scoring. +7. Audit selected output independently with Parakeet v3 and Qwen forced alignment. Qwen does not support Dutch: that language, or a failed Qwen alignment, uses explicitly labeled Parakeet TDT boundary estimates only with <=15% transcript WER and matching first/last two words. Keep 80 ms lead / 150 ms tail and fades outside words; uncertain alignment remains untrimmed and flagged. Assemble 400 ms gaps between estimated word boundaries (unverified clips fall back to clip edges). Do not silently repair strict benchmark output or turn N1 into retries. +8. Best-of4 English turn 6 exposed a real content omission. The public documentation distinguishes strict selection from an extra listening copy repaired with a content check. A high reward is not a complete-script guarantee. +9. Use `infer.py`/`optimized_pipeline/produce.py` for the current route; `infer_legacy.py` explicitly preserves native pairs, old identity×inverse-WER selection and optional VC. Use separate environments for their recorded Torch stacks. +10. Save every candidate, seeds, source/reference hashes and timing receipts. Do not include warmup or export in a generation-only claim, confuse candidate throughput with delivered audio, or call model scores human preference evidence. Record batch grouping and compiler-cache state. + +11. Fresh EN/DE N1/N2 measurements and per-turn scores are linked from the README. N2/N1 ran in separate policy/codec phases because another GPU user started training; no unrelated process was stopped. Compare timing scope and GPU load. None of those 80 selected turns crossed the configured review threshold, but model metrics are not a guarantee. +12. The [public listening Space](https://huggingface.co/spaces/laion/Humanness-Voice-Podcast) adds Dutch, French and Spanish translations at N4/N2/N1. Scripts are `script-spontaneous-{en,de,nl,fr,es}.json`; pass repeated `--script` arguments, preserving explicit language codes. The same fixed reference pair is used in all five languages. Review flags are shown on the relevant sample cards. `low_memory_compare.py --n-values 4 2 1 --candidates 8` plus `finish_comparison.py` reproduces the additional run; see the pipeline guide. diff --git a/guides/LEGACY_PIPELINE.md b/guides/LEGACY_PIPELINE.md new file mode 100644 index 0000000000000000000000000000000000000000..8d47749e592f7cbc0f8db7e1d257bceab2f4597d --- /dev/null +++ b/guides/LEGACY_PIPELINE.md @@ -0,0 +1,102 @@ +> Archived pre-8-November pipeline. Its rewards and defaults differ from the current recommended pipeline. See the main README and current guides. + +# Episode-generation pipeline + +## The complete sequence + +1. Read an episode JSON with language, S1/S2 reference files and ordered literal turns. Optional cached anchor codes avoid repeated reference encoding. +2. Divide into one-turn or two-turn units. Keep the same voice-to-reference assignment for the complete episode. +3. Generate one, two, four or eight seeded candidates per unit. Microbatches can contain different units and prompts. Stop/candidate histories are separate for every row. +4. Commit raw generated audio to SQLite before ASR or scoring. Interrupted generated-but-unscored candidates are evaluated on resume. +5. Run word-timestamp ASR, match the requested literal script, require both boundaries and sufficient coverage, and reject excessive internal WER. +6. Rank passing candidates with identity contrast × inverse WER, or the documented alternative rewards. +7. Optionally split and voice-convert each intended turn, then rerun ASR and content checks on the converted output. +8. Optionally shorten long near-silent word gaps. This is **UNVALIDATED** and off by default. +9. Keep 80-ms pre-word / 150-ms post-word guards and gentle outside-word fades. +10. Assemble lossless waveforms with an exact configurable word-clock gap. Write episode.wav, its timeline, the SQLite audit journal and a continuously updated listening.html. + +## Commands + +~~~bash +# Fastest: one take per individual speaker turn, content-only selection. +python infer.py --model . --script examples/episode_en.json \ + --output runs/one-take --mode turns --candidates 1 --batch-size 2 \ + --reward asr + +# Two candidates per unit, default EARS identity contrast and inverse WER. +python infer.py --model . --script examples/episode_de.json \ + --output runs/two-takes --mode pairs --candidates 2 --batch-size 2 + +# Extra pleasantness preference. This combined recipe is proposed/unvalidated. +python infer.py --model . --script examples/episode_en.json \ + --output runs/pleasant --mode turns --candidates 2 --batch-size 2 \ + --reward pleasant --compact-pauses --pause-keep 0.18 +~~~ + +Use a separate output directory for a different recipe, prompt, reference or seed. The contract binds script contents, reference bytes/cached codes, runtime code and model snapshot. Resume the **same command** to reuse existing raw candidates and selected units. A different contract fails explicitly. Partial ASR/scoring interruption does not turn a runtime error into a content rejection. + +## ASR interface + +The built-in default is moondream/parakeet-redux, revision 2bf128600aac4b16946f7ed8372e56117fe5e23b in the source evaluation. The package uses Photon word timestamps. For a downloaded model, pass --asr-model-path /models/parakeet-redux. CPU is the portable default; --asr-device cuda uses GPU Photon. + +No official multilingual Parakeet V4 ID was verified. To use your own ASR process, put its argument vector in a JSON file: + +~~~json +["/opt/asr-env/bin/python", "/opt/asr/transcribe_json.py"] +~~~ + +Then pass --asr-command asr_command.json. The process receives JSON on stdin: + +~~~json +{"audio": "/absolute/current.wav", "timestamps": "word"} +~~~ + +It must return one JSON object on stdout: + +~~~json +{ + "text": "Hello world", + "segments": [ + {"words": [ + {"word": "Hello", "start": 0.12, "end": 0.51}, + {"word": "world", "start": 0.55, "end": 0.94} + ]} + ] +} +~~~ + +Times must already be global seconds in that waveform. Write process logs to stderr, not stdout. Untimed, nonfinite, backwards or out-of-range words cause failure rather than invented timestamps. The command is executed as an argument vector, without a shell. + +## Content QA and rewards + +Default maximum WER is .30 and per-turn token coverage is .80, with both outer script endpoints required. Strict QA also needs at least two matched tokens per turn; one-word backchannels are currently rejected. Adjust these only as an explicit new recipe; inspect their effect on your languages and ASR. A boundary check can fail because ASR missed a real word. Conversely, low WER cannot establish good acting or correct identity. + +Identity reward uses mean intended-reference cosine C and a positive own-versus-other contrast M, normalized by the separation of the two references. Its speaker-balanced definition prevents a long speaker dominating a short one. Missing short/unscorable identity windows contribute zero. Windows below 1.2 seconds cannot be reliably scored here; longer identity windows are limited to twelve seconds. + +The optional pleasant recipe gives .4 C, .2 M, .2 normalized Genuineness and .2 actual Audiobox CE, multiplied by 1/(1+WER). It uses fixed EARS training normalization, not a min/max fitted independently to each candidate group. Candidate scoring precedes waveform edits and optional VC; it is not a reported score for the final episode. + +## Internal quiet-pause compaction + +--compact-pauses is **UNVALIDATED**. Eligible gaps are at least --pause-trigger seconds, normally .8. Each gap is tested against both --quiet-dbfs, normally -45 dBFS, and a threshold 30 dB below the median recognized-speech RMS. The more conservative threshold wins. A gap is shortened only if every tested 10-ms frame of the removal region is quiet. + +Retained word-to-word pause is --pause-keep, between .15 and .20 seconds. A 10-ms cosine-squared/sine-squared crossfade is placed within the quiet material. Its gains sum to one, avoiding a correlated-background gain bump. Splices stay inside the quiet region, away from word boundaries. Recognized-word samples are checked for equality after the splice; timestamps are updated. + +This is not a speech/nonverbal classifier. Faint missed speech, breaths, laughter or a deliberately dramatic pause can still be harmed. Disable compaction to keep those timings. The outer tail cut can also remove intentional wordless sounds after the final scripted word. + +## Optional per-turn conversion + +Install the complete Humaneness Voice Converter in a separate environment following its own README, then pass --vc-model-dir and --vc-python. The converter receives generated speech as source and the matching S1/S2 anchor as target. It uses source emotion/style and target speaker/timbre conditioning internally. + +For two-turn blocks, buffer each aligned turn by up to 100 ms and cap the buffers at neighboring-turn midpoints. Overlapping or insufficiently aligned speech is not silently assigned a speaker. Re-transcribe every converted output and apply the same content QA. A converted voice is a proposed output, not a certified identity match. + +Conversion can change duration. The pipeline rebuilds a chronological timeline rather than blindly reusing old offsets, then applies edge fades and the chosen final gap. The conversion route is experimental and was not included in the earlier editing-grid scores. + +## Batching and throughput + +Use BF16 with the provided SDPA path. --batch-size counts independent generation requests, not entire episodes. Different speaker turns, texts and candidate seeds can share a batch. Each row retains its own RNG; fixed seeds still need fixed hardware, software, precision and batch grouping for reproducibility. + +One candidate is cheapest. Two candidates roughly double acoustic generation work; batching may amortize it. Larger pools additionally require more ASR/EARS work. This package makes no fresh cross-hardware speed claim. Lower the batch size if model + codec + judge memory is too large. Optional VC is a separate phase, after releasing the TTS model from GPU memory; it can run in another environment. + +Use the same prepared reference codes and loaded model for the complete run. The default does not repeatedly download or reload the TTS model per turn. The raw SQLite journal avoids thousands of separate candidate files; selected unit WAVs and four rolling raw previews support the listening page. + +The optional VC adapter currently invokes the converter CLI once per turn, so its models are reloaded for each conversion. Budget additional latency for this prototype path; the heterogeneous batching described above applies to TTS generation. A persistent converter service is a future optimization, not a measured feature of this release. diff --git a/guides/LEGACY_README.md b/guides/LEGACY_README.md new file mode 100644 index 0000000000000000000000000000000000000000..64126c6b6873b099414df8b4cf3ac5bb67394fb3 --- /dev/null +++ b/guides/LEGACY_README.md @@ -0,0 +1,173 @@ +> Archived pre-8-November pipeline. Its rewards and defaults differ from the current recommended pipeline. See the main README and current guides. + +--- +license: cc-by-4.0 +language: [en, de, fr, es, nl] +pipeline_tag: text-to-speech +library_name: transformers +base_model: laion/Humaneness-Voice-Large-1.7 +tags: [podcast, multi-speaker, voice-cloning, expressive-speech, custom-code, research] +--- + +# Humanness Voice Podcast + +Generate a scripted podcast using two reference voices. This is the complete real-podcast full fine-tune of **Humaneness Voice Large 1.7 at update 9,874**, heard in our segment/block listening experiment. It includes the full model weights, portable inference and training code, example reference voices, and a pipeline for turning separately generated speech into longer episodes. + +**[Listen: raw, trimmed and reassembled conversations](https://laion-humaneness-podcast-segment-block-pilot.static.hf.space/editing/index.html)** · **[Original measured comparison](https://laion-humaneness-podcast-segment-block-pilot.static.hf.space/index.html)** · **[Single-speaker prompting guide](../guides/SINGLE_SPEAKER.md)** · **[Multi-speaker prompting guide](../guides/MULTI_SPEAKER.md)** · **[Pipeline guide](../guides/PIPELINE.md)** · **[Training and provenance](../TRAINING.md)** · **[Agent reference](../guides/AGENT_GUIDE.md)** + +Model weights and newly authored LAION release materials: **CC BY 4.0**. This is a full checkpoint; no LoRA needs to be merged. The external MOSS audio codec, upstream software and reference recordings retain their own terms. See [NOTICE.md](../NOTICE.md). + +## What it does + +You supply the dialogue, its speaker labels and emotion directions, plus one clean reference recording for each voice. The model produces speech; the surrounding pipeline checks the spoken words, trims unused audio and assembles the episode. It does not write the podcast text. + +Two generation paths are included: + +| Path | Generation unit | Why use it? | Main limitation | +|---|---|---|---| +| **turns** | One speaker's turn per call, with only that person's anchor | More direct control over the intended identity; easy to replace an individual turn | Separately generated turns may feel less acoustically connected | +| **pairs** | Two consecutive turns together, normally S1 then S2, with both anchors | Preserves the local interaction and one speaker change within a generation | The two identities can still merge or switch incorrectly | + +Both paths can batch **different texts, prompts, speakers and candidate seeds**. Use one candidate for speed or two candidates for a small selection pool; four and eight are also supported. A run keeps every raw candidate and its acceptance/rejection record in a SQLite journal. Prefer a downloaded local model directory or pin --revision when resuming: a later repository documentation commit can otherwise resolve to a different snapshot. + +The model was trained on English, German, French, Spanish and Dutch material. The current detailed reference/segment comparison covers **English and German**, using the same listener-approved German voices for both. Do not assume equally established quality in all five languages. + +## Quick start + +Use a CUDA-capable machine. The recorded software stack is Python 3.13.5, PyTorch 2.9.1 and Transformers 5.14.1; install matching CUDA Torch and torchaudio 2.9.1 builds appropriate for your machine first. The new portable driver has CPU contract tests; consult [VALIDATION.md](../VALIDATION.md) for the exact GPU test status and known limits. + +The quick-start commands below enable **unvalidated automatic quiet-pause trimming** as an experiment. Omit --compact-pauses to retain internal timing. + +~~~bash +hf download laion/Humanness-Voice-Podcast --local-dir humanness-podcast +cd humanness-podcast +python -m pip install -r requirements.txt + +# One referenced speaker per generation; two seeded candidates per turn. +python infer.py --model . \ + --script examples/short_en.json --output runs/en-turns \ + --mode turns --candidates 2 --batch-size 2 --compact-pauses + +# Generate two turns at once, then assemble the chosen blocks. +python infer.py --model . \ + --script examples/episode_de.json --output runs/de-pairs \ + --mode pairs --candidates 2 --batch-size 2 --compact-pauses +~~~ + +Open runs/en-turns/listening.html or runs/de-pairs/listening.html. It updates as candidates and selected units appear. The completed episode is episode.wav; episode_timeline.json records the assembly clock. + +The script examples use the same two German voices as the listening experiment. [Four short input references and exact cached MOSS anchor codes](../examples/references/) are included: a German pair and the earlier English pair. The English and German example scripts deliberately share the German anchors. Edit their references and reference_codes fields to use the English pair, or remove reference_codes when supplying new audio. Use clean, single-speaker references of approximately **5–15 seconds**; the codec limit is 63–187 frames, or 5.04–14.96 seconds. The old three-second truncation is not used. + +The speech decoder uses the separately downloaded [MOSS Audio Tokenizer v2](https://huggingface.co/OpenMOSS-Team/MOSS-Audio-Tokenizer-v2). The package downloads it when needed. Pass --codec /local/codec to reuse an existing copy. The repository is self-contained for the TTS weights and code; codec and optional scoring/conversion dependencies are separate downloads. + +## Automatic trimming and episode assembly + +The default speech cut keeps up to **80 ms before the first verified script word and 150 ms after the last**. Gentle fades of up to 20 ms at the start and 50 ms at the end stay outside those words. The first/last **requested script words** define the cut, rather than any later ASR words from mumbling. + +Selected units are assembled from lossless 48-kHz masters and encoded/written as one episode. The default **400-ms word-to-word gap** includes retained tail/head padding. It does not add another 400 ms on top of those guards. + +**Additional long-pause trimming is experimental and UNVALIDATED.** Enable it explicitly: + +~~~bash +python infer.py --model . \ + --script examples/episode_en.json --output runs/en-quiet-trim \ + --mode turns --candidates 2 --batch-size 2 \ + --tail-ms 150 --compact-pauses --pause-trigger 0.8 --pause-keep 0.18 +~~~ + +This option tests gaps between recognized words, preserves the words themselves, and shortens only long gaps that are quiet under both an absolute and a relative RMS threshold. Eligible pauses become approximately **180 ms**, with a 10-ms constant-gain crossfade to avoid a background-level bump. It can still remove faint speech or intentional nonverbal sounds that ASR misses. It has signal-level tests but no listening validation. Keep it off when preserving those details is more important than shortening pauses. + +The listening grid demonstrates the earlier script-boundary editing workflow, **not this new internal-pause compaction**. Its diagnostic examples compare 100/150/200-ms tails. Source quality and WER values are not copied onto newly edited outputs. + +## Candidate selection and content checks + +These rewards select fixed-model candidates; the episode CLI does not update model weights. The default reward is: + +~~~text +R = (0.5 × C + 0.5 × M) / (1 + WER) + +C: speaker-balanced mean cosine to the intended EARS identity embedding. +M: positive own-reference versus other-reference contrast, normalized by + max(1 - reference_cross_cosine, 0.05), then clipped to [0,1]. +~~~ + +Missing/scant aligned speech contributes zero to identity ranking. Speaker labels are never swapped to improve the score. The inverse-WER factor is bounded at zero WER. + +Before ranking, candidates must have verified script endpoints, sufficient literal-word coverage for every intended turn, and WER below the configured threshold inside the kept script span. Extra post-script material is removed; hallucinated words **inside** the kept span still count as errors. If no candidate passes, the pipeline stops with its journal and listening page intact. It does not silently publish an incomplete episode or loosen QA. + +--reward pleasant adds a **proposed, unvalidated** pleasantness preference: + +~~~text +R = (0.4 × C + 0.2 × M + 0.2 × Genuine_CDF + 0.2 × CE_CDF) / (1 + WER) +~~~ + +Genuine and actual Audiobox CE use the fixed EARS training-distribution Gaussian-CDF normalization. --reward asr skips identity scoring and ranks by 1/(1+WER); it is a faster content-only option, not an identity check. + +The default judge is [Humaneness EARS Medium](https://huggingface.co/laion/humaneness-ears-base-medium). Identity ranking uses its 250-dimensional identity embedding; the separate 128-dimensional timbre embedding should not be confused with it. + +## ASR: exact implementation + +The verified default is **[Parakeet Redux](https://huggingface.co/moondream/parakeet-redux)** through Photon, with actual word timestamps. Its timestamps are already global; the code does not add segment offsets twice. + +An official multilingual “Parakeet V4” checkpoint could not be verified when this package was prepared. We do not invent a model ID or call Redux “V4.” Use --asr-model for a compatible Photon model or --asr-command asr_command.json for a separately installed ASR service. The command receives JSON on stdin and must return text plus globally timestamped words under segments[].words[]. See [the pipeline guide](../guides/PIPELINE.md). --asr-model-path supports an already downloaded Photon checkpoint. + +## Optional identity conversion + +The [Humaneness Voice Converter](https://huggingface.co/laion/Humaneness-Voice-Converter) can be used as an **experimental optional post-processing stage**: + +~~~bash +# Install the converter separately, following its own README. +hf download laion/Humaneness-Voice-Converter --local-dir ../humaneness-vc + +python infer.py --model . \ + --script examples/short_en.json --output runs/en-pairs-vc \ + --mode pairs --candidates 2 --batch-size 2 \ + --vc-model-dir ../humaneness-vc \ + --vc-python /path/to/converter-venv/bin/python \ + --vc-buffer-ms 100 --tail-ms 150 +~~~ + +For a paired block, ASR locates each intended turn. Up to 100 ms of source buffer is kept on either side, limited by the midpoint to neighboring turns. Each speaker is converted separately to **their own** reference. Converted speech is resampled, transcribed again, checked against its intended text, trimmed and reassembled in chronological order. Source turns must fit the converter's tested 1–30-second range. An unsafe split or failed post-conversion check stops the run. + +Conversion can change duration and expression; this route does not pretend that converted audio can always be pasted back at the old sample offsets. It rebuilds the timeline with controlled word-clock gaps and edge fades. It has not been validated end to end as a podcast production workflow and does not guarantee correct identity. + +## Training, architecture and reproducibility + +This is a full supervised fine-tune of [Humaneness Voice Large 1.7](https://huggingface.co/laion/Humaneness-Voice-Large-1.7). The MOSS Local Transformer architecture uses a Qwen-family semantic backbone and a local acoustic transformer to generate twelve codec channels per 80-ms frame. The external MOSS-v2 decoder renders 48-kHz mono speech. + +Training used two epochs, approximately 80% real-podcast / 20% original-format acting replay by presentation count, 32 GPUs and 9,874 optimizer updates. Peak learning rates were 2e-5 for the semantic backbone and 4e-5 for the local/acoustic parameters; 5% warm-up followed by cosine decay to 10% of the peak. The final measured development loss was **4.4653**, versus **4.5745** before training. This alone is not a human listening-quality result. + +See [TRAINING.md](../TRAINING.md) for the actual counts, data contract, original frozen launch archive, portable continued-SFT entry point and checkpoint/resume instructions. This repository contains deployment weights, not the 32-rank historical optimizer state. Starting a new fine-tune from these BF16 weights is not an exact optimizer resume of the completed training run. + +## Earlier measured segment/block comparison + +These values describe the earlier fixed-400-ms, natural-timing montages with ten scripts per condition. They do not score the new internal-pause compaction or optional VC. The parent1.7 block wrapper was exploratory. All automatic metrics come from EARS Medium and Parakeet Redux, not a blinded listening study. + +| Model | Generation | N | CE ↑ | Genuine ↑ | Intended identity cosine ↑ | WER ↓ | +|---|---|---:|---:|---:|---:|---:| +|Parent Large 1.7|segment|1|5.872|3.614|0.477|34.7%| +|Parent Large 1.7|block|8|6.103|3.719|0.429|10.2%| +|Podcast step 9874|segment|1|6.051|3.532|0.560|37.4%| +|Podcast step 9874|block|8|6.328|3.373|0.730|2.2%| + +Speaker cosine averages available aligned turns. Missing-coverage effects and per-metric denominators remain in the full [summary](../stats/segment_block_pilot.json). A higher cosine is not a percentage of correct identity. + +## Examples and prompting references + +- [English episode example](../examples/episode_en.json), [German episode example](../examples/episode_de.json), and shorter two-turn examples. +- [Four generated, reassembled listening examples](../examples/audio/) with exact source-condition provenance. +- [Single-speaker GENERAL/SCRIPT guide](../guides/SINGLE_SPEAKER.md). +- [Multi-speaker labels, two anchors and optional past context](../guides/MULTI_SPEAKER.md). +- [Batching, rewards, pause editing and optional VC](../guides/PIPELINE.md). +- [Machine-readable recipe](../guides/recipe.json) and [compact agent guide](../guides/AGENT_GUIDE.md). +- [Underlying Large 1.7 manual](https://laion-humaneness-voice-large-1-7-prompting-manual.static.hf.space/) and [Large 1.7 model repository](https://huggingface.co/laion/Humaneness-Voice-Large-1.7). + +## Fresh functional smoke + +The corrected portable driver passed an allocated four-GPU smoke: English/German, one-turn/two-turn paths, different-text batches, two candidates per unit, ASR checks, identity ranking and assembly. [Listen to the four fresh outputs](../validation/gpu-smoke/) and read [the exact acceptance counts](../stats/gpu_smoke_details.json). This is a functional check, not a listening study; optional VC remains untested and the quiet-pause shortening remains unvalidated. + +## Known limitations and intended use + +Speaker identities can collapse, switches can be late, and generation can continue into silence or mumbling. Duration requests are approximate, not millisecond-accuracy guarantees. ASR-based checks and automatic identity/quality scores can be wrong. Batched generation changes floating-point arithmetic; fixed seeds do not promise bit-identical results across hardware, precision or batch size. + +This is a research and dataset-augmentation release. Test your own languages, voices and content before deployment. Use reference voices with appropriate permission, disclose synthetic speech where appropriate, and do not use it for deceptive impersonation. LAION does not endorse misuse. This research guidance does not replace or amend the CC BY 4.0 license or applicable third-party rights. diff --git a/guides/MULTI_SPEAKER.md b/guides/MULTI_SPEAKER.md new file mode 100644 index 0000000000000000000000000000000000000000..c934a23ad9f2571d6f461fd463267cf0a65298e2 --- /dev/null +++ b/guides/MULTI_SPEAKER.md @@ -0,0 +1,32 @@ +# Multi-speaker episodes and native two-speaker blocks + +## Recommended: independently generated turns, assembled into a conversation + +Write ordered JSON turns with stable `speaker` IDs and separate literal text/directions. The optimized pipeline routes each turn to its matching fixed reference. Different speakers and scripts can share a GPU batch; each candidate keeps its own history. Winners are assembled with a 400-ms word-to-word gap after conservative boundary alignment/fades. This is the listener-approved, measured route. + +Use the [prompting/JSON guide](PROMPTING.md) and [pipeline guide](PIPELINE.md). The supplied German and English episodes share the same S1/S2 references. The labels are routing IDs, not spoken words. N counts candidates per turn, while groups counts independent turns per policy batch: N4×groups2 gives eight candidate streams plus their CFG branches. + +## Preserved alternative: native S1/S2 two-turn generation + +`infer_legacy.py --mode pairs` uses the trained native two-speaker wrapper. It is an explicit alternative with different rewards, ASR checks and software requirements; its timings are not the optimized table. See [the legacy pipeline](LEGACY_PIPELINE.md). Recommended sparse style cues also work as instructions, but the new quality comparison evaluates independent turns. + +```text +GENERAL: A warm, authentic and genuine conversation. Keep S1 and S2 distinct, each matching its own reference. Speak only the scripted words, naturally, gently and spontaneously. +SCRIPT: +(speaker=S1, curious; relaxed and spontaneous) Could meaning begin with a small act of care? +(speaker=S2, reflective; gently spoken) Yes. It need not look impressive to matter. +``` + +The literal text passed separately joins the two sentences without labels/directions. `podcast.prompting.build_user` attaches two correctly labeled codec anchors: + +```text +- Reference(s): +Speaker S1 identity reference: +<|audio|> +Speaker S2 identity reference: +<|audio|> +``` + +Each placeholder contains the matching MOSS codes. Do not simply prepend a label to an audio filename. Native pair anchors are 63–187 frames each; optional chronologically prior conversation context plus anchors has a 750-frame/60-second combined limit. History must be one continuously encoded assembled waveform, not concatenated independently encoded token arrays, and must never contain the target. Automatic generated-history feedback is not evaluated. The optimized route does not use it. + +Three-speaker native joint generation is outside the trained wrapper’s demonstrated contract. A separately assembled episode can route more IDs, but the benchmark evaluates two voices. Speaker collapse and late switches remain possible; inspect identity and transcript diagnostics and listen. diff --git a/guides/PIPELINE.md b/guides/PIPELINE.md new file mode 100644 index 0000000000000000000000000000000000000000..bf27a6199796901bfdedf04d75520af195357503 --- /dev/null +++ b/guides/PIPELINE.md @@ -0,0 +1,187 @@ +# Podcast generation pipeline — reproducible Best-of-N + +This recipe uses the **Podcast full fine-tune**, not the general Large 1.7 checkpoint. It generates complete independent speaker turns, samples N takes per turn in parallel, ranks them, and assembles the winners into a two-host episode. Voice conversion is disabled. English, German, Dutch, French and Spanish use the same two reference recordings. + +**[Public listening room: references and Best-of-4 / Best-of-2 / Single Take in five languages](https://huggingface.co/spaces/laion/Humanness-Voice-Podcast).** The page includes the exact scripts, prompt example, per-turn audit and measured generation times. The English N4 complete listening copy has one explicitly documented candidate replacement; its strict original remains downloadable. + +## Current best practice: sparse spontaneous, relaxed and gentle delivery + +On 8 November 2026 the listener approved the **sparse spontaneous/relaxed/gentle inline variant** and requested it as the standard. `--prompt-style spontaneous` is now the default. The earlier restrained `legacy` prompt remains available, while the exaggerated per-sentence emotion experiment is retained only for reproduction. This is a listener preference, not a universal or blinded-study optimum. + +Read the [exact prompting guide and LLM-writing template](../optimized_pipeline/PROMPTING.md). An API-based or local LLM is recommended for writing the script and sparse cues: hand-authoring every turn and direction is unnecessarily laborious. The TTS itself does not write the dialogue and needs no LLM API key. + +Exact GENERAL: + +> A warm, emotionally thoughtful two-host podcast conversation. Very authentic, very genuine. Natural, intimate, spontaneous spoken delivery with clear words, subtle emotion, relaxed conversational pacing and brief meaningful pauses. Be sincere, without an exaggerated announcer voice or forced laughter. Perform only the current speaker turn and speak exactly the SCRIPT. Keep the same speaker identity as the reference audio. + +Use **one moderate parenthesized direction plus a short spontaneous/gentle cue per turn**, and at most one extra cue at an existing sentence boundary, e.g. `(warm, intimate welcome; gently curious)`, followed by the literal transcript. Do not repeatedly demand strong emotions, forced laughter, or exaggerated acting. “Very pleasant to listen to” is deliberately absent. The experimental per-sentence style remains available only for reproducing the rejected comparison. + +Temperature **1.0**, CFG **2.5**, top-p **0.95**, top-k **50**, BF16, free timing (`tokens=None`), 320 semantic frames / 25.6 s maximum per turn. Split longer scripts into shorter turns. No DPO, additional LoRAs, or voice conversion. These settings apply to this Podcast checkpoint, not all Humaneness models. + +## Exact reward and quality audit + +``` +G = clip(native Humaneness Ears genuineness / 6, 0, 1) +S = clip(cosine(ECAPA(candidate), ECAPA(correct reference)), 0, 1) +reward = 0.5 * G + 0.5 * S +``` + +There is **no Content Enjoyment term and no WER multiplier or WER selection gate**. Fixed scales avoid unstable per-batch min/max normalization. Exact ties select the lowest candidate index. Score complete raw candidates; audit the edited winner separately. ECAPA is an approximate identity cue, not a guarantee of successful cloning. A high reward does not guarantee correct words. + +After selection, Qwen forced alignment supplies approximate word boundaries for its supported languages (EN/DE/FR/ES here); keep 80 ms before the first word and 150 ms after the last, with small fades outside the aligned words. Dutch is **not** a supported Qwen alignment language. For Dutch, or unusable Qwen boundaries, Parakeet TDT estimates boundaries only when its transcript has at most 15% WER and matches the script's first and last two normalized words. These are explicitly labeled **ASR token boundary estimates**, not forced alignment. Uncertain cases remain untrimmed and flagged. Reassembly targets a 400 ms **word-to-word** gap using those estimates; for an unverified clip it falls back to clip edges. Final Parakeet WER is diagnostic only; never silently replace the reward winner. Export mono 48 kHz / 192 kbps MP3 plus lossless source, subtitles, per-turn scores, review flags, and listening HTML. No internal pause compaction. + +## Weights and references + +| Component | Published source | Pinned revision | +|---|---|---| +| Podcast policy, full FT step 9874, 4.13B | [laion/Humanness-Voice-Podcast](https://huggingface.co/laion/Humanness-Voice-Podcast) | `91f8110cd815f2233301a8b1dd16dbbf3fae8e05` | +| MOSS v2 codec | [OpenMOSS-Team/MOSS-Audio-Tokenizer-v2](https://huggingface.co/OpenMOSS-Team/MOSS-Audio-Tokenizer-v2) | `f6e20e543b33d2c252a7ef71bdf8aa71e5ff9169` | +| Genuineness judge | [Humaneness Ears Medium](https://huggingface.co/laion/humaneness-ears-base-medium) | `818506970d93c809a3295a0a02c40dee8ff2bfc3` | +| Speaker similarity, 192D | [SpeechBrain ECAPA VoxCeleb](https://huggingface.co/speechbrain/spkrec-ecapa-voxceleb) | `0f99f2d0ebe89ac095bcc5903c4dd8f72b367286` | +| Final transcript diagnostic | [Parakeet TDT 0.6B v3](https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3) | `541d1f99c6b0c3cd0b11a95167540bb8edefd82b` | +| Final alignment | [Qwen3 ForcedAligner](https://huggingface.co/Qwen/Qwen3-ForcedAligner-0.6B-hf) | `c07281df297b9905d24a508279258cccf987a064` | + +All five languages condition S1 on `de_s1.mp3` and S2 on `de_s2.mp3`, from the Podcast repository's [reference release](https://huggingface.co/laion/Humanness-Voice-Podcast/tree/0947ffdcedf85705683b256ccc310c90ccf3b6a9/examples/references). Recordings are approximately 14.52 / 13.08 s; cached codec conditioning contains 181 / 163 frames (14.48 / 13.04 s). `references.json` contains SHA-256 checks. Do not confuse fictional host labels with real identities. Source recordings retain original terms; this code package downloads them rather than relicensing them. The listening Space includes byte-identical copies with provenance. + +## Run on another machine + +The [standalone code](../optimized_pipeline/) includes the optimized policy/codec runtime, scoring, example scripts, alignment and reassembly. It does not import the Robby server, depend on private absolute paths, or require API keys. NVIDIA CUDA with BF16 support is required for this optimized path. Tested environment: RTX 3090 24 GB, Python 3.12, PyTorch 2.6.0+cu124, Transformers 5.15.0. Install system `ffmpeg` and `libsndfile` first. Use an empty GPU; unrelated workloads can cause OOM or change timings. The policy alone occupies about 8.26 GB; codec, judges, KV caches and graph capture need additional memory. + +```bash +cd optimized_pipeline +python3.12 -m venv .venv +source .venv/bin/activate +pip install torch==2.6.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124 +pip install -r requirements.txt +# Optionally set HF_HOME and PODCAST_CACHE on a drive with sufficient free space. +python prepare.py +MODEL=$(python -c 'import json; print(json.load(open("assets.local.json"))["model"])') +python -m unittest test_contracts test_speaker_recipe +python speaker_run.py --model "$MODEL" --device cuda:0 --n 4 \ + --prompt-style spontaneous --output outputs/approved/generation +python speaker_finish.py --runs outputs/approved/generation \ + --output outputs/approved --device cuda:0 +# Open outputs/approved/index.html. +``` + +`--n 1` keeps its only take and skips online scoring; final audit still measures its quality. `--n 2` uses the same 50/50 selection as N=4. N is takes **per segment**; the automatic pilot chooses one or two independent segments per policy batch, at most 16 simultaneous candidates. With two segments and N=4 the policy handles eight candidate histories, plus their CFG branches. The sample scripts have 20 turns per language. Supply custom JSON with `--script` (repeatable) and `--references`; see the prompting guide. `produce.py` runs generation plus audit/export in one command. `--limit 2` is a useful first smoke test. Re-run exactly the same configuration to resume completed turns; use a fresh directory when prompts/references/settings change. A live local Parakeet service is optional via the finisher's `--asr-url`; the default audit loads it locally after generation releases the policy. + +Code includes checks that reused prompt prefill has identical hidden states and valid KV entries, that batched generation reproduces the prior one-segment runner, and that codec encoder offloading preserves decoding. If prefill equivalence fails, reuse is disabled. CUDA/Triton compilation is cold-start work and can take minutes. Same seeds do not promise identical outputs across hardware, libraries or batch grouping. Preserve all recorded scripts, source hashes, seeds and candidate scores. + +The archived causal chunk search lives in `generation.py`; the default command above is **offline complete-turn selection**, not real-time Best-of-N streaming. Its legacy search reward differs; do not present it as the 50/50 experiment. + +## Measured approved Best-of-4 baseline + +Hardware: one RTX 3090 24 GB on a shared host; BF16, two turns × four takes per batch, 512-position semantic buckets, 26-frame internal waveform blocks, existing compiler cache. Both languages use the same fixed reference pair and approved sparse spontaneous directions. + +| Language | Final audio | Generation + ranking | Useful RTF ↓ | Genuineness / 6 ↑ | ECAPA cosine ↑ | Mean turn WER ↓ | +|---|---:|---:|---:|---:|---:|---:| +| German | 219.38 s | 179.98 s | 0.821 | 3.943 | 0.640 | 1.98% | +| English, strict selection | 193.30 s | 195.83 s | 1.013 | 3.880 | 0.407 | 5.50% | + +Useful RTF divides generation/ranking time by **final edited audio duration**, not total candidate audio. It excludes loading, correctness probes, final audit and export. Combined production including archival/cleanup took 380.10 s; process start to MP3 exports took 645.59 s, excluding service restoration and the additional listening repair. + +Across both episodes: policy prediction 324.85 s, waveform decoding 24.85 s, ranking/preprocessing 21.25 s, remaining generation overhead 4.86 s. Ears forward work 4.35 s and ECAPA 3.08 s are included in ranking. Archival used 24.87 CPU seconds but blocked GPU production for just 1.08 s. These are measured stages, not promises for another machine. + +**Content failure retained:** strict English turn 6 stopped after the first sentence. A separate complete listening copy replaces only that turn with existing candidate 1 (reward 0.499669; diagnostic WER 3.33%) and lasts 201.22 s. No new synthesis was used. This explicitly adds a content eligibility check; it is not the original strict 50/50 result. The default pipeline keeps strict winners and flags problems instead of silently repairing them. The listener approved the sparse style including that complete listening copy. + +See [baseline machine-readable results](../optimized_pipeline/benchmarks/spontaneous-2026-11-08.json) and [historical experiments](PODCAST_EXPERIMENT_HISTORY.md). Metrics are fallible model estimates, not blinded human ratings. + +## Implemented speed optimizations + +- BF16 policy, reusable semantic and local-decoder CUDA graphs, fast token sampling and tested fused codec operations. +- Multiple independent turns in one batch. Histories remain separate; candidate selection is local to each turn. +- Identical candidate prompts reuse prefill only after hidden-state and valid-KV equality checks. A two-group check measured 2.009 s normally versus 0.518 s with reuse. +- Cache reference acoustic codes and speaker embeddings. Keep the unused codec encoder in CPU RAM after reference preparation. +- Batch the Ears/ECAPA judges. Skip online ranking for N=1; reserve Parakeet for final audit. +- Archive every candidate with one bounded CPU writer while the next GPU batch runs. Propagate write failures before publishing a completed-turn receipt. +- Reuse an explicitly selected `--groups` value, a warmed worker and compiler caches instead of repeating setup and timing sweeps for every episode. + +`--groups 2 --n 4`, `--groups 4 --n 2`, and `--groups 8 --n 1` each maintain eight candidates per policy batch, plus CFG branches. These layouts change RNG trajectories; N1/N2 are not necessarily subsets of an N4 run. Resume requires unchanged settings and stable batch grouping. + +### When VRAM is shared or limited + +`low_memory_compare.py` separates **policy token generation → release policy → waveform decoding and ranking**. It saves acoustic tokens for every candidate, retains the same token sampling loop, checks shared/full prefill equality and tests optional fused decoding. It requires prepared reference codes. This is an offline comparison runner, not a streaming service and not a general low-memory implementation for arbitrary recordings. + +```bash +python low_memory_compare.py --model "$MODEL" --device cuda:0 --output outputs/n-comparison +for N in 2 1; do + python speaker_finish.py --runs "outputs/n-comparison/n$N/generation" \ + --output "outputs/n-comparison/n$N" --device cuda:0 + python verify_artifacts.py "outputs/n-comparison/n$N" +done +python compare_report.py --n4 outputs/spontaneous --n2 outputs/n-comparison/n2 \ + --n1 outputs/n-comparison/n1 --output outputs/n-comparison +``` + +Stage sums exclude shared loading and inter-phase waiting; the parent receipt records total generation-job time. Do not label their sum request latency. An integrated attempt ran out of memory when another user's training job appeared; no unrelated job was stopped. The phased comparison uses the same shared GPU under that extra load. A fair speed ablation should repeat N=1/2/4 with identical warm-up and an otherwise idle GPU. + +### Reproduce the additional Dutch, French and Spanish episodes + +The bundled `script-spontaneous-{en,de,nl,fr,es}.json` files contain the same twenty-turn conversation, translated by a language model and preserving the sparse directions. Language routing is explicit throughout the processor and alignment stages. Default scripts remain EN/DE for compatibility; supply the other files explicitly. The example below maintains up to eight candidates per policy batch: two turns at N4, four at N2, eight at N1. It needs a fresh output directory and prepared reference codes. + +```bash +python low_memory_compare.py --model "$MODEL" --device cuda:0 \ + --script script-spontaneous-nl.json \ + --script script-spontaneous-fr.json \ + --script script-spontaneous-es.json \ + --n-values 4 2 1 --candidates 8 --output outputs/five-language-extension +python finish_comparison.py --runs outputs/five-language-extension --device cuda:0 +for N in 4 2 1; do + python verify_artifacts.py "outputs/five-language-extension/n$N" +done +``` + +`finish_comparison.py` shares frozen scoring/alignment models across the three modes and writes its parent completion receipt only after all exports finish. This run produces 420 candidates and nine episodes (180 selected turns). It is not a nested re-ranking of one N4 pool: N2/N1 are separate runs with their own recorded seeds and batch grouping. Publication retains strict reward winners and exposes review flags, including uncertain boundaries and possible omitted words. Machine ASR is an audit aid, not a native-speaker listening verdict. The same fixed German references deliberately test cross-language voice conditioning. + +## Next speed improvements to measure + +Policy prediction dominates. In N4, 37/160 candidates hit the 25.6-s cap and 19/20 batches waited for a capped candidate. Length-aware grouping and safe finished-row compaction may reduce wasted work, but require verified CFG/cache remapping and complete-script checks. Do not simply reduce the ceiling or remove words to improve RTF. A persistent dedicated worker is the lowest-risk way to avoid loading and compilation latency. + +Reassembly and scoring are much smaller costs. Optimizing the codec alone cannot remove the policy bottleneck. Keep truthful per-stage, per-episode and end-to-end timings; preserve all candidate files so selection experiments need no fresh synthesis. + +## Fresh N=1 and N=2 comparison with the approved prompts + +Both episodes were freshly generated at N=2 and N=1 after publishing the new defaults. Same literal scripts, cues, reference pair, temperature 1.0 and CFG 2.5. N1 keeps its sole take and skips online ranking. N2 uses the same 50/50 reward as N4; there is no WER gate or hidden retry. + +| Language | N | Final audio | Generate + rank | Useful RTF ↓ | Genuineness / 6 ↑ | ECAPA cosine ↑ | Mean turn WER ↓ | +|---|---:|---:|---:|---:|---:|---:|---:| +| DE | 1 | 220.75 s | 55.24 s | 0.250 | 3.916 | 0.553 | 1.21% | +| DE | 2 | 222.26 s | 115.80 s | 0.521 | 3.897 | 0.630 | 2.56% | +| DE | 4 | 219.38 s | 179.98 s | 0.821 | 3.943 | 0.640 | 1.98% | +| EN | 1 | 199.30 s | 68.56 s | 0.344 | 3.863 | 0.352 | 2.12% | +| EN | 2 | 199.54 s | 122.77 s | 0.615 | 3.904 | 0.383 | 2.93% | +| EN | 4 | 193.30 s | 195.83 s | 1.013 | 3.880 | 0.407 | 5.50% | + +In this sample, **N=2 is a useful speed/identity compromise**: German speaker cosine rises from 0.553 at N1 to 0.630 at N2, close to N4's 0.640. English rises from 0.352 to 0.383; N4 is 0.407. Genuineness stays roughly 3.9/6. N1 is faster but less consistent in speaker identity. These are twenty turns per language, not evidence of a universal optimum. The old English N4 row includes its documented incomplete turn; the repaired listening copy is separate. + +All 80 new selected turns passed the configured review checks (per-turn WER threshold 15% and usable forced alignment); none was regenerated or replaced. This is not a guarantee of perfect speech. Both candidate counts passed artifact validation, exact prompt/reference routing, strict selection and PCM equality checks. The token/full-prefill checks and optional fused decoding were bit-identical on their tested inputs. Fourteen CPU tests pass. + +**Timing scope:** N2 production across both languages totals 238.57 s; N1 totals 123.80 s; old N4 totals 375.80 s. Token prediction accounts for 209.57 / 113.22 / 324.85 s respectively. N2 codec/ranking take 18.18/10.07 s; N1 codec takes 9.91 s and online ranking zero. Loading, correctness probes, final audit and export are excluded from these production sums. The complete successful N2+N1 experiment, from process start to all four MP3s, took **660.70 s**. The failed earlier OOM attempt and live-service restoration are excluded. + +N2/N1 used phased execution under additional unrelated GPU training; N4 used integrated execution with a different background load. The other training ended before final auditing. Do not claim these are controlled percentage speedups from N alone. N2 uses four turns per batch and N1 eight (final partial batches smaller), maintaining up to eight simultaneous candidates. Different groups/seeds mean these are fresh runs, not nested subsets of the N4 pool. + +See [aggregate results](../optimized_pipeline/benchmarks/n-comparison-2026-11-08.json) and [all per-turn candidate scores, seeds and audits](../optimized_pipeline/benchmarks/n-comparison-2026-11-08-turns.json). Recreate the listening HTML with `compare_report.py`; the six strict episodes and additional labeled N4 English listening copy are independently selectable. + + +## Five-language listening release: additional NL / FR / ES results + +[Open the public listening Space](https://huggingface.co/spaces/laion/Humanness-Voice-Podcast). The nine additional episodes use the same fixed reference pair, approved sparse prompting and translated twenty-turn story as the DE/EN examples. All N2/N4 reward winners and all N1 sole takes are retained; no retries, content re-selection or voice conversion. + +| Language | N | Final audio | Production | Useful RTF | Genuineness / 6 | ECAPA cosine | Mean turn WER | Transcript / boundary flags, of 20 | +|---|---:|---:|---:|---:|---:|---:|---:|---:| +| NL | 4 | 303.00 s | 261.95 s | 0.865 | 3.969 | 0.388 | 14.4% | 8 / 10 | +| NL | 2 | 298.90 s | 134.25 s | 0.449 | 3.884 | 0.352 | 13.5% | 5 / 8 | +| NL | 1 | 280.82 s | 73.28 s | 0.261 | 3.897 | 0.333 | 15.1% | 6 / 9 | +| FR | 4 | 238.82 s | 242.20 s | 1.014 | 4.021 | 0.420 | 21.9% | 8 / 4 | +| FR | 2 | 231.62 s | 131.62 s | 0.568 | 4.032 | 0.385 | 14.2% | 6 / 3 | +| FR | 1 | 238.10 s | 65.74 s | 0.276 | 3.906 | 0.362 | 14.5% | 5 / 4 | +| ES | 4 | 234.02 s | 250.40 s | 1.070 | 4.008 | 0.450 | 2.2% | 0 / 0 | +| ES | 2 | 233.78 s | 134.51 s | 0.575 | 4.018 | 0.385 | 2.6% | 0 / 0 | +| ES | 1 | 232.66 s | 57.90 s | 0.249 | 4.020 | 0.392 | 2.1% | 1 / 0 | + +Flags are materially more frequent in Dutch and French than Spanish in this fixed-reference run. Some recognized transcripts omit words or drift across languages. ASR itself is fallible, and a boundary warning alone does not imply missing speech. Dutch uses conservative Parakeet TDT boundaries because the Qwen aligner does not support Dutch. Uncertain clips remain untrimmed, so some episodes include longer tails. These examples are not endorsed as error-free multilingual outputs. Scripts and detailed diagnostics are available next to every player. + +Production is the sum of policy, codec and online selection time, excluding loading, correctness probes, final audit and encoding. Phased inference used one RTX 3090 alongside unrelated jobs; cross-run GPU loads differ. N4/N2/N1 use separate draws and grouping, not nested subsets. Do not interpret these measurements as a controlled speed or quality ablation. + +[Aggregate measurements](../optimized_pipeline/benchmarks/five-language-extension-2026-11-08.json) · [All candidate scores and selected-turn audits](../optimized_pipeline/benchmarks/five-language-extension-2026-11-08-turns.json). diff --git a/guides/PODCAST_EXPERIMENT_HISTORY.md b/guides/PODCAST_EXPERIMENT_HISTORY.md new file mode 100644 index 0000000000000000000000000000000000000000..8c41709268cab607d9a03cd3e8b3eba84c266e64 --- /dev/null +++ b/guides/PODCAST_EXPERIMENT_HISTORY.md @@ -0,0 +1,67 @@ +# Earlier Podcast experiments and measurements + +Historical record. For current defaults use [Podcast Generation Pipeline](PIPELINE.md). Earlier styles, rewards and hardware conditions differ; labels below preserve those distinctions. + +## Measurements and interpretation + +Single RTX 3090, BF16. The earlier fresh 50/50 experiment used the subsequently rejected per-sentence emotion prompts; these figures measure throughput, not approval of that style. + +| Fresh Best-of-4 run | Final audio | Generation + ranking | Useful RTF | +|---|---:|---:|---:| +| German | 236 s | 179.13 s | 0.760 | +| English | 212 s | 174.23 s | 0.820 | + +RTF = generation/ranking / final edited duration, not all candidate audio. Combined production including archival and cleanup was 380.65 s; generation/ranking accounted for 353.36 s. Cold setup, tests and timing probes took 356.52 s. Final audit load 30.10 s, audit 45.10 s, parallel CPU export 49.01 s; full experiment to exports 894.12 s. Do not call these request-to-first-audio latencies. + +Shared prefill measured 0.273 vs 1.125 s for one group and 0.544 vs 2.110 s for two groups, with exact equality. A warm 104-frame probe took 3.572 s for one segment and 5.238 s for two (2.619 s/segment). The latter is an approximate workload comparison: two different scripts and different RNG batch shapes. An earlier run shared the card with a training job; speed differences cannot all be assigned to code. + +The **earlier approved restrained rerank** reused 160 saved candidates, generated no new TTS, and changed 15/20 German and 12/20 English winners. Final German / English means: genuineness 3.967 / 3.822 out of 6; ECAPA cosine 0.655 / 0.401; turn WER 1.01% / 1.79%. Reranking took 32.18 s; do not report that as synthesis throughput. These are model metrics, not human quality ratings. + +## Next efficiency experiments + +1. Already implemented: overlap bounded CPU candidate archival with the next GPU batch; preserve all takes and propagate write errors before declaring completion. The earlier run spent roughly 27 s outside measured generation/ranking, including archival and cleanup; that is a ceiling, not a promised speedup. +2. Reuse a warmed worker, cached reference embeddings and tested graph shapes across episodes. Report cold start separately. +3. Explicitly reuse a previously measured batch size instead of repeating timing sweeps every episode, while retaining correctness checks after runtime changes. +4. Bucket comparable turn lengths to reduce completed-row padding, but record batch assignment because it changes RNG histories. +5. Benchmark EOS/continuation behavior before shortening frame caps. Never accelerate by silently clipping words or dropping candidates. + +## Current standard: sparse spontaneous delivery + +`--prompt-style spontaneous` retains every spoken word and original moderate turn direction, adding a short relaxed/gentle/spontaneous cue. Alternating turns get at most one additional cue at an existing sentence boundary. It does not repeat a list of emotions before every sentence. The listener-approved `spontaneous` style is now the default; `legacy` reproduces the earlier restrained variant. + +```bash +python speaker_run.py --model "$MODEL" --device cuda:0 --n 4 --groups 2 \ + --prompt-style spontaneous --output outputs/spontaneous/generation +python speaker_finish.py --runs outputs/spontaneous/generation \ + --output outputs/spontaneous --device cuda:0 +python verify_artifacts.py outputs/spontaneous +``` + +The explicit `--groups 2` reuses the previously measured batch size and skips repeated timing sweeps. It retains the real-model codec, generation-equivalence and prefill checks. First production batches can include cold graph/compilation costs; those are not hidden. If comparing throughput, keep this warm-up policy identical. + +Candidate FLAC archival now runs on one bounded CPU thread alongside the next GPU batch. No candidates are discarded; write failures propagate, and a `result.json` is published only after its files exist. `archive-timing.json` distinguishes CPU work from the remaining blocking wait. Resume keeps stable batch grouping and replaces the same batch timing record rather than double-counting it. + +The listener approved these samples and requested this prompt style as the default. Model-score changes alone still do not establish general superiority. + + +## New spontaneous variant: measured outcome, 8 November 2026 + +The portable package generated and scored all **160 candidates** (40 turns × 4), passed exact GPU codec/token/PCM and prefill checks, and exported both episodes. The eleven CPU tests cover prefix selection, CFG state copying, prompt word preservation, exact reward and incomplete archival receipts. + +| Strict 50/50 selection | Final duration | Generation + ranking | Useful RTF | Genuineness / 6 | ECAPA cosine | Mean turn WER | +|---|---:|---:|---:|---:|---:|---:| +| German | 219.38 s | 179.98 s | 0.821 | 3.943 | 0.640 | 1.98% | +| English | 193.30 s | 195.83 s | 1.013 | 3.880 | 0.407 | 5.50% | + +**Important observed failure:** the highest-reward take for English turn 6 ends after its first sentence (4 s instead of the complete turn). Its reward is 0.500111; the next candidate scores 0.499803. The strict experiment is kept unchanged and explicitly flagged. A separately labeled content-repaired listening copy can use a complete alternative, but that adds a content eligibility check and must not be reported as unconstrained 50/50 argmax. This illustrates why genuineness and speaker similarity alone cannot certify a complete script. The sparse spontaneous style is now the listener-approved default. The earlier restrained variant remains available for comparison. + +Across both episodes, generation/ranking took 375.80 s: policy token prediction 324.85 s, codec decoding 24.85 s, scoring including preprocessing 21.25 s, and approximately 4.86 s in remaining generation overhead. Ears forward work (4.35 s) and ECAPA work (3.08 s) are **included** in scoring, not extra. Archived audio writing consumed 24.87 CPU seconds but blocked production for only 1.08 s; almost all writing overlapped GPU work. Total production including final archival/cleanup was 380.10 s. Process start to both MP3 exports was 645.59 s, excluding service restoration and the additional listening repair. + +Do not attribute the entire startup reduction from the earlier 894.12 s experiment to code: this run reused an existing compiler cache, skipped repeated speed probes, used different prompts and inherited 512-position semantic buckets rather than the earlier 256. Overall production time was about the same as the earlier 380.65 s run; the archival overlap itself is measured, but a controlled aggregate speedup has not been established. + +The largest remaining opportunity is **long-tail candidate computation**: 37 of 160 takes reached the 25.6 s cap and 19 of 20 batches waited for at least one capped take. Only 2,726.64 s of candidate audio were produced versus 4,096 s if all rows ran to the cap, but a batched policy can still spend time on already finished rows. Next, test conservative text-completion checks for lagging candidates, length-aware grouping, or active-row compaction with verified CFG/codec cache copying. Require complete-script checks and keep the original outputs for comparison; simply shortening the cap risks losing real speech. Keeping a warmed dedicated worker is the lowest-risk way to avoid repeated loading and compilation. + +Machine-readable measurements: [spontaneous-2026-11-08.json](../optimized_pipeline/benchmarks/spontaneous-2026-11-08.json). + + +The additional English listening copy is **201.22 s** long. It replaces only turn 6 with existing candidate 1 (raw reward 0.499669, ASR WER 3.33%, plausible forced alignment). Candidate 3 was also checked first in reward order. Nothing was regenerated; the strict episode and its scores remain unchanged. `repair_listening.py OUTPUT --turn 6 --language en --asr-url http://127.0.0.1:8801/transcribe/parakeet_v3` reproduces this explicit repair with the recorded loopback ASR service; the default generation/audit commands never apply this content gate. Its HTTP ASR contract is mono 16 kHz float32 bytes in, JSON containing `text` out. CPU alignment uses FP32 to avoid slow BF16 emulation on older CPUs. diff --git a/guides/PROMPTING.md b/guides/PROMPTING.md new file mode 100644 index 0000000000000000000000000000000000000000..17c077695a67e82be7b8b718ea8f4176cf3b8a75 --- /dev/null +++ b/guides/PROMPTING.md @@ -0,0 +1,95 @@ +# Prompting guide: spontaneous, relaxed and gentle + +This is the listener-approved default as of 8 November 2026 (`--prompt-style spontaneous`). It keeps the original restrained delivery and adds sparse inline cues for spontaneous, easy, gently spoken conversation. The listener preferred these samples; that does not establish a universal optimum for all voices or scripts. The older `legacy` turn-level style and exaggerated `sentence` experiment remain explicit reproduction options. + +## Use an LLM as the script and direction writer + +Writing every literal turn and every carefully placed acting cue by hand is unnecessarily laborious. We recommend asking an API-based or local language model to produce the JSON script. The LLM writes the dialogue and sparse directions; this Podcast model speaks them. No particular LLM vendor, API key, or network service is required by inference. Review factual content before synthesis. + +Give the writing model this instruction: + +> Write a natural, thoughtful spoken conversation in the requested language. Use the requested speakers, with stable IDs. Separate literal spoken text from performance cues. Keep each turn short enough to fit comfortably below 25.6 seconds; split long explanations into turns. Make the exchange spontaneous, relaxed, gentle and genuine, with modest contextual emotion rather than theatrical intensity. Use one short cue at the start of a turn and at most one additional cue at a meaningful existing sentence boundary. Do not label every sentence with a strong emotion. Do not request forced laughter, excessive breathiness, exaggerated slowness, or “very pleasant/nice to listen to.” Do not insert speaker labels, directions or duration requests into the spoken text. Output valid JSON with `language` and an ordered `turns` array. Each turn has `index`, `speaker`, `text`, `direction`, and optionally one or two `delivery_chunks`, each containing `text` and `cue`. Joining chunk texts with one space must exactly reproduce the turn's literal `text`. Do not change a supplied transcript. Use no generated audio as a reference; references are selected separately. + +Include the topic, factual constraints, speaker roles, intended audience and desired approximate episode length in the writing request. For the evaluated example, two hosts discuss meaning, Viktor Frankl, everyday care and connection. A calm question, gentle curiosity, understated warmth or mild amusement usually suffice. Strong emotions should arise from actual content and an explicit request. + +## Exact approved GENERAL + +```text +A warm, emotionally thoughtful two-host podcast conversation. Very authentic, very genuine. Natural, intimate, spontaneous spoken delivery with clear words, subtle emotion, relaxed conversational pacing and brief meaningful pauses. Be sincere, without an exaggerated announcer voice or forced laughter. Perform only the current speaker turn and speak exactly the SCRIPT. Keep the same speaker identity as the reference audio. +``` + +GENERAL remains constant across the tested episodes. It does not include a voice gender, age, timbre redesign, or “very pleasant to listen to.” Identity comes from the fixed reference audio. For a turn within a podcast, use this exact text even though the individual call contains only one speaker. + +## Single-speaker call template + +```text +GENERAL: [exact GENERAL above] +SCRIPT: +(warm, gently curious; relaxed, spontaneous, gently spoken) What if meaning is something we practise? +(gently, as a spontaneous thought) Maybe it begins with noticing who needs us today. +``` + +The processor receives the separate literal text `What if meaning is something we practise? Maybe it begins with noticing who needs us today.` and **only this speaker's** reference codes. Inline directions belong in `instruction`, not in the literal transcript. Use `tokens=None` and no inline duration brackets: the 320-frame generation ceiling is a limit, not a requested duration. + +Prefer cues such as: + +- `easy, spontaneous, gently spoken` +- `relaxed, unforced, like talking to a friend` +- `soft natural delivery, thinking aloud` +- `casual and sincere, unhurried` +- `gentle conversational flow, in the moment` + +Do not stack all of them onto one sentence. The approved example files rotate a single short cue and add one extra cue inside alternating turns. Most emotion remains subtle. The second cue is optional. + +## JSON accepted by the optimized pipeline + +```json +{ + "language": "en", + "turns": [ + { + "index": 0, + "speaker": "S1", + "text": "What if meaning is something we practise? Maybe it begins with noticing who needs us today.", + "direction": "warm, gently curious", + "delivery_chunks": [ + {"text": "What if meaning is something we practise?", "cue": "warm, gently curious; relaxed, spontaneous, gently spoken"}, + {"text": "Maybe it begins with noticing who needs us today.", "cue": "gently, as a spontaneous thought"} + ] + }, + { + "index": 1, + "speaker": "S2", + "text": "Yes. Perhaps it begins with a small gesture that makes a real difference to someone.", + "direction": "warm and reflective" + } + ] +} +``` + +Use one consistent language per file. Supported codes are `en`, `de`, `nl`, `fr` and `es`; the bundled spontaneous scripts cover all five. Set `language` to `de` and write all turns in German for a German episode. A simpler turn with only `speaker`, `text` and `direction` is valid: the default adds one sparse spontaneous cue without changing the literal words. `index` defaults to its position. Pass one `--script` argument per language in a job. Explicit routing preserves the requested language instead of treating non-German text as English. The CLI validates the exact chunk-to-text reconstruction and rejects ambiguous duplicate language/index pairs. + +Pass a separate reference mapping with `--references` when changing voices: + +```json +{ + "S1": {"path": "audio/voice-one.wav"}, + "S2": {"path": "audio/voice-two.wav"} +} +``` + +Paths are relative to this reference JSON. Audio SHA-256 values are recorded automatically when absent, and verified when supplied. The bundled mapping additionally provides pinned cached MOSS codes. Remove or regenerate `codes` and `code_key` when replacing audio: otherwise the old codes remain the actual conditioning input. Use clean single-speaker references around 5–15 seconds and reuse them for the entire episode. + +## Multi-speaker episodes versus native two-speaker blocks + +The recommended optimized route generates each speaker turn separately, always with its correct reference, and then assembles the turns chronologically. A GPU batch can contain different speakers and texts, but their generated histories and rewards stay separate. This is a multi-speaker **episode**, not two speakers mixed into one model call. Any supported speaker ID in the reference mapping can route an independently generated turn; only the two-voice example has been evaluated here. + +The preserved native pair route (`infer_legacy.py --mode pairs`) instead uses the trained S1/S2 reference wrapper and `(speaker=S1, ...)` / `(speaker=S2, ...)` instructions within one call. Labels must not appear in the literal transcript. This route has different content checks and rewards, and is not covered by the new optimized Best-of-N timing table. See the model repository's multi-speaker guide before using it. Do not pass two references to the optimized single-turn call and assume it will switch identities correctly. + +## Settings and selection + +BF16 policy, temperature **1.0**, CFG **2.5**, top-p **0.95**, top-k **50**, free timing, up to **320 × 80 ms = 25.6 s per turn**. No voice conversion, DPO or extra LoRA. Default N=4; use `--n 2` or `--n 1` to trade selection opportunity for less compute. + +For N>1, choose the maximum of `0.5*clip(Ears native genuineness/6,0,1) + 0.5*clip(ECAPA reference cosine,0,1)` per complete raw turn. This is fixed normalization, not candidate-wise min/max. WER and Content Enjoyment are not selection terms. N=1 retains its sole take and skips online scoring. All modes receive the same independent final audit. + +Quality checks are essential: a highly genuine, similar-sounding take can still omit words. The experiment keeps strict ranking results and flags such failures. If a complete listening copy is repaired using another candidate, document that additional content eligibility check explicitly; never present it as unconstrained reward argmax or as an unchanged Single Take. diff --git a/guides/SINGLE_SPEAKER.md b/guides/SINGLE_SPEAKER.md new file mode 100644 index 0000000000000000000000000000000000000000..cc51e8253f636ec52689f58628b9b4e43d269fa2 --- /dev/null +++ b/guides/SINGLE_SPEAKER.md @@ -0,0 +1,17 @@ +# Single-speaker inference and prompting + +The default optimized pipeline generates one speaker per turn. Supply only that speaker’s reference for the call; the code selects it from the fixed reference map. A one-turn script produces one utterance; several same-speaker turns can form a monologue. + +Use the [exact GENERAL/SCRIPT template and JSON contract](PROMPTING.md). Literal words belong in `text`; acting directions belong in `direction` or `delivery_chunks[].cue`. Joining chunk texts with one space must equal `text` exactly. The default adds a short spontaneous/gentle cue when none is supplied. Keep one cue per turn, optionally one more at a meaningful existing sentence boundary. Do not repeatedly exaggerate emotion or add speaker labels to the literal words. + +```text +GENERAL: A warm, emotionally thoughtful two-host podcast conversation. Very authentic, very genuine. Natural, intimate, spontaneous spoken delivery with clear words, subtle emotion, relaxed conversational pacing and brief meaningful pauses. Be sincere, without an exaggerated announcer voice or forced laughter. Perform only the current speaker turn and speak exactly the SCRIPT. Keep the same speaker identity as the reference audio. +SCRIPT: +(warm, curious; relaxed, spontaneous, gently spoken) What if meaning begins with paying attention? +``` + +For a pure monologue, changing the first GENERAL sentence to describe a monologue is a reasonable adaptation, but the published benchmark uses the exact podcast GENERAL above. + +Settings: BF16, temperature 1.0, CFG 2.5, top-p 0.95, top-k 50, `tokens=None`, no inline duration brackets. Generation stops at EOS or the 320-frame/25.6-second ceiling. Split longer text. Use clean 5–15-second references; never silently truncate them to three seconds. The approved examples use 181/163 codec frames. + +Run `python infer.py --model . --script my-script.json --references my-references.json --n 1 --output runs/single` after the README setup. N=1 keeps the first and only take; use N=2/4 for candidate selection. An LLM can produce the script JSON using [the writing instruction](PROMPTING.md#use-an-llm-as-the-script-and-direction-writer), but the inference runtime does not require one. diff --git a/guides/recipe.json b/guides/recipe.json new file mode 100644 index 0000000000000000000000000000000000000000..0a61da33311c18f92bdd132607d7567bc1b4dc3d --- /dev/null +++ b/guides/recipe.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "default_prompt_style": "spontaneous", + "listener_approved": true, + "model": "laion/Humanness-Voice-Podcast", + "revision": "91f8110cd815f2233301a8b1dd16dbbf3fae8e05", + "temperature": 1.0, + "cfg": 2.5, + "top_p": 0.95, + "top_k": 50, + "n": 4, + "mode": "independent turns", + "max_frames": 320, + "free_timing": true, + "voice_conversion": false, + "reward": "0.5*clip(genuineness/6,0,1)+0.5*clip(ecapa_cosine,0,1)", + "wer_role": "audit only", + "n1": "first and only take; online ranking skipped", + "prompt_guide": "guides/PROMPTING.md", + "pipeline_guide": "guides/PIPELINE.md" +} \ No newline at end of file diff --git a/infer.py b/infer.py new file mode 100644 index 0000000000000000000000000000000000000000..0fafebf6d9b6e194af0001870072cd23c703884d --- /dev/null +++ b/infer.py @@ -0,0 +1,12 @@ +"""Current default: optimized spontaneous Podcast generation, audit and export. +For the preserved native pair/legacy workflow use infer_legacy.py. +""" +from pathlib import Path +import sys +ROOT=Path(__file__).resolve().parent +sys.path.insert(0,str(ROOT/'optimized_pipeline')) +from produce import main +if __name__=='__main__': + args=sys.argv[1:] + if '--model' not in args:args=['--model',str(ROOT),*args] + main(args) diff --git a/infer_legacy.py b/infer_legacy.py new file mode 100644 index 0000000000000000000000000000000000000000..cf5217b6b110d81f898460056179bce867d1bcb2 --- /dev/null +++ b/infer_legacy.py @@ -0,0 +1,3 @@ +"""Entry point: python infer.py --script examples/short_en.json --output run.""" +from podcast.pipeline import main +if __name__=='__main__':main() diff --git a/model-00001-of-00005.safetensors b/model-00001-of-00005.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..af0b42e32ed0603f0e670d946d89ebf1de03284b --- /dev/null +++ b/model-00001-of-00005.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:791c61b2bcad322b58fbac3d0d24174014bb49acad2a52fb581cf96074381675 +size 1997031256 diff --git a/model-00002-of-00005.safetensors b/model-00002-of-00005.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..9268cf2bb170ff5cd162030abfec9e07c0577e38 --- /dev/null +++ b/model-00002-of-00005.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1be302af66c882ec7f6ef35954c76b0e55436911596b1602627d53cfbaed1dca +size 1997658024 diff --git a/model-00003-of-00005.safetensors b/model-00003-of-00005.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..c6175953025476adc2f74454d6abdb6682579a4c --- /dev/null +++ b/model-00003-of-00005.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d65aa4709289a60e18fc7d7a3fa75c3357755707b167df62e9512c94a3a69c0 +size 1997657656 diff --git a/model-00004-of-00005.safetensors b/model-00004-of-00005.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..474f3706c470128eced3fb2706a073077b0f23a5 --- /dev/null +++ b/model-00004-of-00005.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f8a6db71e26dc79f3f5f0562bf0320f51f1d83fdec0db7b2ca74206f170dde2 +size 1963573536 diff --git a/model-00005-of-00005.safetensors b/model-00005-of-00005.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..26ff5f796f73c35a50e8b77d8e9ed91f3aee4a3e --- /dev/null +++ b/model-00005-of-00005.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8033d7393e3d846a6740f041992fa449d2a017613a9130ab5ab0df9d3a15d91 +size 304110984 diff --git a/model.safetensors.index.json b/model.safetensors.index.json new file mode 100644 index 0000000000000000000000000000000000000000..56e67c8ec57a7a2734a54af588e1fda79f191ee1 --- /dev/null +++ b/model.safetensors.index.json @@ -0,0 +1,432 @@ +{ + "metadata": { + "total_size": 8259980288 + }, + "weight_map": { + "audio_embeddings.0.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.1.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.10.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.11.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.2.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.3.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.4.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.5.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.6.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.7.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.8.weight": "model-00001-of-00005.safetensors", + "audio_embeddings.9.weight": "model-00001-of-00005.safetensors", + "local_text_lm_head.weight": "model-00001-of-00005.safetensors", + "local_transformer.h.0.attn.c_attn.bias": "model-00001-of-00005.safetensors", + "local_transformer.h.0.attn.c_attn.weight": "model-00001-of-00005.safetensors", + "local_transformer.h.0.attn.c_proj.bias": "model-00001-of-00005.safetensors", + "local_transformer.h.0.attn.c_proj.weight": "model-00001-of-00005.safetensors", + "local_transformer.h.0.ln_1.bias": "model-00001-of-00005.safetensors", + "local_transformer.h.0.ln_1.weight": "model-00001-of-00005.safetensors", + "local_transformer.h.0.ln_2.bias": "model-00001-of-00005.safetensors", + "local_transformer.h.0.ln_2.weight": "model-00001-of-00005.safetensors", + "local_transformer.h.0.mlp.fc_in.bias": "model-00001-of-00005.safetensors", + "local_transformer.h.0.mlp.fc_in.weight": "model-00001-of-00005.safetensors", + "local_transformer.h.0.mlp.fc_out.bias": "model-00001-of-00005.safetensors", + "local_transformer.h.0.mlp.fc_out.weight": "model-00001-of-00005.safetensors", + "local_transformer.ln_f.bias": "model-00001-of-00005.safetensors", + "local_transformer.ln_f.weight": "model-00001-of-00005.safetensors", + "transformer.embed_tokens.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.input_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.mlp.down_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.mlp.gate_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.mlp.up_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.post_attention_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.self_attn.k_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.self_attn.k_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.self_attn.o_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.self_attn.q_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.self_attn.q_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.0.self_attn.v_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.input_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.mlp.down_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.mlp.gate_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.mlp.up_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.post_attention_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.self_attn.k_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.self_attn.k_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.self_attn.o_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.self_attn.q_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.self_attn.q_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.1.self_attn.v_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.input_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.mlp.down_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.mlp.gate_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.mlp.up_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.post_attention_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.self_attn.k_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.self_attn.k_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.self_attn.o_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.self_attn.q_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.self_attn.q_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.10.self_attn.v_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.input_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.mlp.down_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.mlp.gate_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.mlp.up_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.post_attention_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.self_attn.k_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.self_attn.k_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.self_attn.o_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.self_attn.q_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.self_attn.q_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.11.self_attn.v_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.input_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.mlp.down_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.mlp.gate_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.mlp.up_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.post_attention_layernorm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.self_attn.k_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.self_attn.k_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.self_attn.o_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.self_attn.q_norm.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.self_attn.q_proj.weight": "model-00001-of-00005.safetensors", + "transformer.layers.12.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.self_attn.q_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.13.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.self_attn.q_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.14.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.self_attn.q_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.15.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.self_attn.q_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.16.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.self_attn.q_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.17.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.self_attn.q_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.18.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.self_attn.q_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.19.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.self_attn.q_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.2.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.self_attn.q_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.20.self_attn.v_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.input_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.mlp.down_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.mlp.gate_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.mlp.up_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.post_attention_layernorm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.self_attn.k_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.self_attn.k_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.self_attn.o_proj.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.self_attn.q_norm.weight": "model-00002-of-00005.safetensors", + "transformer.layers.21.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.21.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.self_attn.o_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.self_attn.q_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.22.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.self_attn.o_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.self_attn.q_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.23.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.self_attn.o_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.self_attn.q_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.24.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.self_attn.o_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.self_attn.q_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.25.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.self_attn.o_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.self_attn.q_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.26.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.self_attn.o_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.self_attn.q_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.27.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.self_attn.o_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.self_attn.q_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.28.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.self_attn.o_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.self_attn.q_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.29.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.self_attn.o_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.self_attn.q_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.self_attn.q_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.3.self_attn.v_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.30.input_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.30.mlp.down_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.30.mlp.gate_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.30.mlp.up_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.30.post_attention_layernorm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.30.self_attn.k_norm.weight": "model-00003-of-00005.safetensors", + "transformer.layers.30.self_attn.k_proj.weight": "model-00003-of-00005.safetensors", + "transformer.layers.30.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.30.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.30.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.30.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.mlp.up_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.post_attention_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.self_attn.k_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.self_attn.k_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.31.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.mlp.up_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.post_attention_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.self_attn.k_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.self_attn.k_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.32.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.mlp.up_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.post_attention_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.self_attn.k_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.self_attn.k_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.33.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.mlp.up_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.post_attention_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.self_attn.k_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.self_attn.k_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.34.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.mlp.up_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.post_attention_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.self_attn.k_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.self_attn.k_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.35.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.mlp.up_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.post_attention_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.self_attn.k_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.self_attn.k_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.4.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.mlp.up_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.post_attention_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.self_attn.k_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.self_attn.k_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.5.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.mlp.up_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.post_attention_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.self_attn.k_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.self_attn.k_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.6.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.mlp.up_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.post_attention_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.self_attn.k_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.self_attn.k_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.self_attn.o_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.self_attn.q_norm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.self_attn.q_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.7.self_attn.v_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.8.input_layernorm.weight": "model-00004-of-00005.safetensors", + "transformer.layers.8.mlp.down_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.8.mlp.gate_proj.weight": "model-00004-of-00005.safetensors", + "transformer.layers.8.mlp.up_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.8.post_attention_layernorm.weight": "model-00005-of-00005.safetensors", + "transformer.layers.8.self_attn.k_norm.weight": "model-00005-of-00005.safetensors", + "transformer.layers.8.self_attn.k_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.8.self_attn.o_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.8.self_attn.q_norm.weight": "model-00005-of-00005.safetensors", + "transformer.layers.8.self_attn.q_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.8.self_attn.v_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.input_layernorm.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.mlp.down_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.mlp.gate_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.mlp.up_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.post_attention_layernorm.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.self_attn.k_norm.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.self_attn.k_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.self_attn.o_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.self_attn.q_norm.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.self_attn.q_proj.weight": "model-00005-of-00005.safetensors", + "transformer.layers.9.self_attn.v_proj.weight": "model-00005-of-00005.safetensors", + "transformer.norm.weight": "model-00005-of-00005.safetensors" + } +} \ No newline at end of file diff --git a/modeling_moss_tts.py b/modeling_moss_tts.py new file mode 100644 index 0000000000000000000000000000000000000000..4891b570440663b44f0304fe44e6df3d9baf55f8 --- /dev/null +++ b/modeling_moss_tts.py @@ -0,0 +1,623 @@ +# coding=utf-8 +"""Modeling code for the MOSS-TTS-Local-Transformer-v1.5 HuggingFace release.""" + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Optional, Union + +import torch +import torch.nn as nn +from transformers.modeling_outputs import BaseModelOutputWithPast +from transformers.modeling_utils import PreTrainedModel +from transformers.models.gpt2.configuration_gpt2 import GPT2Config +from transformers.utils import ModelOutput + +from .configuration_moss_tts import MossTTSLocalConfig +from .gpt2_decoder import MossTTSNanoGPT2Model +from .qwen3_decoder import MossQwen3Model + + +@dataclass +class MossTTSLocalOutput(ModelOutput): + last_hidden_state: Optional[torch.FloatTensor] = None + past_key_values: Optional[tuple[tuple[torch.Tensor, torch.Tensor], ...]] = None + hidden_states: Optional[tuple[torch.FloatTensor, ...]] = None + attentions: Optional[tuple[torch.FloatTensor, ...]] = None + + +def _find_last_equal(input_ids: torch.LongTensor, value: int) -> torch.LongTensor: + matches = input_ids.eq(int(value)) + if not bool(matches.any(dim=1).all().item()): + raise ValueError(f"Every sample must contain token id {int(value)}.") + positions = torch.arange(input_ids.shape[1], device=input_ids.device, dtype=torch.long) + masked_positions = positions.unsqueeze(0).masked_fill(~matches, -1) + return masked_positions.max(dim=1).values + + +class MossTTSLocalPreTrainedModel(PreTrainedModel): + config_class = MossTTSLocalConfig + base_model_prefix = "transformer" + supports_gradient_checkpointing = True + _no_split_modules = ["MossTTSNanoGPT2Block", "MossQwen3DecoderLayer"] + _supports_flash_attn_2 = True + _supports_sdpa = True + _supports_cache_class = True + + def _set_gradient_checkpointing(self, module: nn.Module, value: bool = False) -> None: + if isinstance(module, MossTTSNanoGPT2Model) or isinstance(module, MossQwen3Model): + module.gradient_checkpointing = value + + +class MossTTSLocalModel(MossTTSLocalPreTrainedModel): + _tied_weights_keys = None + + def __init__(self, config: MossTTSLocalConfig) -> None: + super().__init__(config) + self._tied_weights_keys = self._build_tied_weights_keys(config) + + config.qwen3_config.pad_token_id = config.pad_token_id + config.qwen3_config._attn_implementation = config.attn_implementation + local_gpt2_config = config.gpt2_config.to_dict() + local_gpt2_config["n_layer"] = int(getattr(config, "local_transformer_layers", config.gpt2_config.n_layer)) + local_gpt2_config["n_positions"] = int(config.n_vq) + 1 + local_gpt2_config["n_ctx"] = int(config.n_vq) + 1 + local_gpt2_config = GPT2Config(**local_gpt2_config) + local_gpt2_config.pad_token_id = config.pad_token_id + local_gpt2_config._attn_implementation = config.local_transformer_attn_implementation + + self.transformer = MossQwen3Model(config.qwen3_config) + self.local_transformer = MossTTSNanoGPT2Model( + local_gpt2_config, + attn_implementation=config.local_transformer_attn_implementation, + ) + self.local_transformer.wte = nn.Identity() + + hidden_size = int(config.hidden_size) + self.audio_embeddings = nn.ModuleList( + [ + nn.Embedding(int(config.audio_codebook_sizes[index]), hidden_size) + for index in range(config.n_vq) + ] + ) + self.text_lm_head = nn.Linear(hidden_size, int(config.vocab_size), bias=False) + self.audio_lm_heads = nn.ModuleList( + [ + nn.Linear(hidden_size, int(config.audio_codebook_sizes[index]), bias=False) + for index in range(config.n_vq) + ] + ) + self.local_text_lm_head = ( + nn.Linear(hidden_size, 2, bias=False) + if self._use_binary_local_text_head() + else None + ) + + self.post_init() + self.tie_weights() + self.initialize_local_text_lm_head_from_text_lm_head() + + def can_generate(self) -> bool: + return True + + @staticmethod + def _build_tied_weights_keys(config: MossTTSLocalConfig) -> dict[str, str]: + tied_weights = {"text_lm_head.weight": "transformer.embed_tokens.weight"} + tied_weights.update( + { + f"audio_lm_heads.{index}.weight": f"audio_embeddings.{index}.weight" + for index in range(config.n_vq) + } + ) + return tied_weights + + def tie_weights(self, *args, **kwargs) -> None: + del args, kwargs + self.text_lm_head.weight = self.transformer.embed_tokens.weight + for embedding, head in zip(self.audio_embeddings, self.audio_lm_heads): + head.weight = embedding.weight + + def get_input_embeddings(self) -> nn.Embedding: + return self.transformer.embed_tokens + + def set_input_embeddings(self, value: nn.Embedding) -> None: + self.transformer.embed_tokens = value + self.tie_weights() + self.initialize_local_text_lm_head_from_text_lm_head() + + def get_output_embeddings(self) -> nn.Linear: + return self.text_lm_head + + def set_output_embeddings(self, new_embeddings: nn.Linear) -> None: + self.text_lm_head = new_embeddings + self.tie_weights() + self.initialize_local_text_lm_head_from_text_lm_head() + + def _use_binary_local_text_head(self) -> bool: + return str(getattr(self.config, "local_text_head_mode", "full_vocab")).strip().lower() == "binary" + + def _local_text_candidate_ids(self, device: torch.device) -> torch.LongTensor: + return torch.tensor( + [ + int(self.config.audio_assistant_slot_token_id), + int(self.config.audio_end_token_id), + ], + dtype=torch.long, + device=device, + ) + + def initialize_local_text_lm_head_from_text_lm_head(self) -> None: + if not self._use_binary_local_text_head() or self.local_text_lm_head is None: + return + candidate_ids = self._local_text_candidate_ids(self.text_lm_head.weight.device) + with torch.no_grad(): + source_weight = self.text_lm_head.weight.index_select(0, candidate_ids) + if tuple(source_weight.shape) == tuple(self.local_text_lm_head.weight.shape): + self.local_text_lm_head.weight.copy_( + source_weight.to( + device=self.local_text_lm_head.weight.device, + dtype=self.local_text_lm_head.weight.dtype, + ) + ) + + def _resolve_fixed_nq( + self, + n_vq_for_inference: Optional[int] = None, + nq: Optional[int] = None, + ) -> int: + requested = n_vq_for_inference if n_vq_for_inference is not None else nq + config_nq = int(self.config.n_vq) + if requested is not None and int(requested) != config_nq: + raise ValueError( + "This MOSS-TTS-Local-Transformer-v1.5 release is trained with a fixed RVQ depth. " + f"Expected n_vq={config_nq}, got {int(requested)}." + ) + return config_nq + + def _build_inputs_embeds(self, input_ids: torch.LongTensor) -> torch.FloatTensor: + if input_ids.ndim != 3 or input_ids.shape[-1] != self.config.n_vq + 1: + raise ValueError( + f"Expected input_ids shape [batch, seq, {self.config.n_vq + 1}], " + f"got {tuple(input_ids.shape)}." + ) + text_ids = input_ids[..., 0] + inputs_embeds = self.transformer.embed_tokens(text_ids) + for channel_index, embedding in enumerate(self.audio_embeddings): + channel_ids = input_ids[..., channel_index + 1] + valid_mask = channel_ids.ne(self.config.audio_pad_token_id) + safe_ids = channel_ids.masked_fill(~valid_mask, 0) + audio_embeds = embedding(safe_ids) * valid_mask.unsqueeze(-1) + inputs_embeds = inputs_embeds + audio_embeds + return inputs_embeds + + def _global_hidden_to_local(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor: + return hidden_states + + @staticmethod + def _local_past_length(past_key_values: Optional[tuple[Any, ...]]) -> int: + if past_key_values is None or len(past_key_values) == 0: + return 0 + first_layer_past = past_key_values[0] + if isinstance(first_layer_past, dict) and bool(first_layer_past.get("static_kv_cache", False)): + return int(first_layer_past.get("length", 0)) + return int(first_layer_past[0].shape[1]) + + def _new_static_local_past_key_values( + self, + batch_size: int, + max_length: int, + device: torch.device, + dtype: torch.dtype, + ) -> tuple[dict[str, Any], ...]: + layers = [] + for block in self.local_transformer.h: + attn = block.attn + cache_shape = ( + int(batch_size), + int(max_length), + int(attn.num_heads), + int(attn.head_dim), + ) + layers.append( + { + "static_kv_cache": True, + "key": torch.empty(cache_shape, device=device, dtype=dtype), + "value": torch.empty(cache_shape, device=device, dtype=dtype), + "length": 0, + } + ) + return tuple(layers) + + def _decode_local_hidden_states_with_cache( + self, + local_inputs_embeds: torch.FloatTensor, + past_key_values: Optional[tuple[Any, ...]] = None, + ) -> tuple[torch.FloatTensor, Optional[tuple[Any, ...]]]: + if ( + past_key_values is None + and not self.training + and bool(getattr(self.config, "use_static_local_kv_cache", True)) + ): + max_length = max(int(getattr(self.config, "n_vq", 0)) + 1, int(local_inputs_embeds.shape[1])) + past_key_values = self._new_static_local_past_key_values( + batch_size=int(local_inputs_embeds.shape[0]), + max_length=max_length, + device=local_inputs_embeds.device, + dtype=local_inputs_embeds.dtype, + ) + past_length = self._local_past_length(past_key_values) + local_seq_len = int(local_inputs_embeds.shape[1]) + local_position_ids = torch.arange( + past_length, + past_length + local_seq_len, + device=local_inputs_embeds.device, + dtype=torch.long, + ).unsqueeze(0) + if int(local_inputs_embeds.shape[0]) != 1: + local_position_ids = local_position_ids.expand(int(local_inputs_embeds.shape[0]), -1) + local_outputs = self.local_transformer( + input_ids=None, + past_key_values=past_key_values, + attention_mask=None, + position_ids=local_position_ids, + inputs_embeds=local_inputs_embeds, + use_cache=True, + output_attentions=False, + output_hidden_states=False, + return_dict=True, + cu_seqlens=None, + num_sequences=None, + ) + return local_outputs.last_hidden_state, local_outputs.past_key_values + + def forward( + self, + input_ids: Optional[torch.LongTensor] = None, + attention_mask: Optional[torch.Tensor] = None, + position_ids: Optional[torch.LongTensor] = None, + past_key_values: Optional[tuple[tuple[torch.Tensor, torch.Tensor], ...]] = None, + inputs_embeds: Optional[torch.FloatTensor] = None, + use_cache: Optional[bool] = None, + output_attentions: Optional[bool] = None, + output_hidden_states: Optional[bool] = None, + return_dict: Optional[bool] = True, + **kwargs, + ) -> Union[tuple, MossTTSLocalOutput]: + del kwargs + if inputs_embeds is None: + if input_ids is None: + raise ValueError("Either input_ids or inputs_embeds must be provided.") + inputs_embeds = self._build_inputs_embeds(input_ids) + outputs = self.transformer( + input_ids=None, + attention_mask=attention_mask, + position_ids=position_ids, + past_key_values=past_key_values, + inputs_embeds=inputs_embeds, + use_cache=use_cache, + output_attentions=output_attentions, + output_hidden_states=output_hidden_states, + return_dict=True, + cu_seqlens=None, + num_sequences=None, + ) + if not return_dict: + return ( + outputs.last_hidden_state, + outputs.past_key_values, + outputs.hidden_states, + outputs.attentions, + ) + return MossTTSLocalOutput( + last_hidden_state=outputs.last_hidden_state, + past_key_values=outputs.past_key_values, + hidden_states=outputs.hidden_states, + attentions=outputs.attentions, + ) + + def _decode_local_last_hidden_state( + self, + local_inputs_embeds: torch.FloatTensor, + ) -> torch.FloatTensor: + local_seq_len = int(local_inputs_embeds.shape[1]) + local_position_ids = torch.arange( + 0, + local_seq_len, + device=local_inputs_embeds.device, + dtype=torch.long, + ).unsqueeze(0) + if int(local_inputs_embeds.shape[0]) != 1: + local_position_ids = local_position_ids.expand(int(local_inputs_embeds.shape[0]), -1) + local_outputs = self.local_transformer( + input_ids=None, + attention_mask=None, + position_ids=local_position_ids, + inputs_embeds=local_inputs_embeds, + use_cache=False, + output_attentions=False, + output_hidden_states=False, + return_dict=True, + cu_seqlens=None, + num_sequences=None, + ) + return local_outputs.last_hidden_state[:, -1, :] + + def _filter_logits( + self, + logits: torch.FloatTensor, + top_k: Optional[int], + top_p: Optional[float], + ) -> torch.FloatTensor: + scores = logits + if top_k is not None and int(top_k) > 0 and int(top_k) < scores.shape[-1]: + kth = torch.topk(scores, int(top_k), dim=-1).values[..., -1, None] + scores = scores.masked_fill(scores < kth, -torch.inf) + if top_p is not None and 0.0 < float(top_p) < 1.0: + sorted_scores, sorted_indices = torch.sort(scores, descending=True, dim=-1) + sorted_probs = torch.softmax(sorted_scores, dim=-1) + cumulative_probs = sorted_probs.cumsum(dim=-1) + sorted_mask = cumulative_probs > float(top_p) + sorted_mask[..., 1:] = sorted_mask[..., :-1].clone() + sorted_mask[..., 0] = False + remove_mask = torch.zeros_like(scores, dtype=torch.bool) + remove_mask.scatter_(dim=-1, index=sorted_indices, src=sorted_mask) + scores = scores.masked_fill(remove_mask, -torch.inf) + return scores + + def _apply_repetition_penalty( + self, + scores: torch.FloatTensor, + previous_token_ids: Optional[torch.LongTensor], + penalty: float, + ) -> torch.FloatTensor: + if previous_token_ids is None or float(penalty) == 1.0: + return scores + if previous_token_ids.ndim == 1: + previous_token_ids = previous_token_ids.unsqueeze(0) + updated = scores.clone() + for batch_index in range(updated.shape[0]): + unique_token_ids = torch.unique(previous_token_ids[batch_index]) + unique_token_ids = unique_token_ids[ + (unique_token_ids >= 0) & (unique_token_ids < updated.shape[-1]) + ] + if unique_token_ids.numel() == 0: + continue + token_scores = updated[batch_index].index_select(0, unique_token_ids) + token_scores = torch.where( + token_scores < 0, + token_scores * float(penalty), + token_scores / float(penalty), + ) + updated[batch_index].scatter_(0, unique_token_ids, token_scores) + return updated + + def _sample_next_token( + self, + logits: torch.FloatTensor, + do_sample: bool, + temperature: float, + top_k: Optional[int], + top_p: Optional[float], + previous_token_ids: Optional[torch.LongTensor] = None, + repetition_penalty: float = 1.0, + ) -> torch.LongTensor: + scores = logits.float() + scores = self._apply_repetition_penalty(scores, previous_token_ids, repetition_penalty) + if not do_sample: + return torch.argmax(scores, dim=-1) + if float(temperature) <= 0: + raise ValueError("temperature must be positive when do_sample=True.") + scores = scores / float(temperature) + scores = self._filter_logits(scores, top_k=top_k, top_p=top_p) + probs = torch.softmax(scores, dim=-1) + return torch.multinomial(probs, num_samples=1).squeeze(-1) + + def _sample_next_assistant_text_token( + self, + local_hidden_states: torch.FloatTensor, + do_sample: bool, + temperature: float, + top_k: Optional[int], + top_p: Optional[float], + ) -> torch.LongTensor: + if self._use_binary_local_text_head() and self.local_text_lm_head is not None: + logits = self.local_text_lm_head(local_hidden_states) + sampled_indices = self._sample_next_token( + logits=logits, + do_sample=do_sample, + temperature=temperature, + top_k=top_k, + top_p=top_p, + ) + candidate_ids = self._local_text_candidate_ids(logits.device) + return candidate_ids[sampled_indices] + + candidate_ids = self._local_text_candidate_ids(local_hidden_states.device) + logits = self.text_lm_head(local_hidden_states).index_select(dim=-1, index=candidate_ids) + sampled_indices = self._sample_next_token( + logits=logits, + do_sample=do_sample, + temperature=temperature, + top_k=top_k, + top_p=top_p, + ) + return candidate_ids[sampled_indices] + + def _build_generation_row( + self, + batch_size: int, + device: torch.device, + audio_token_ids: torch.LongTensor, + ) -> torch.LongTensor: + row = torch.full( + (batch_size, 1, self.config.n_vq + 1), + int(self.config.audio_pad_token_id), + dtype=torch.long, + device=device, + ) + row[:, :, 0] = int(self.config.audio_assistant_slot_token_id) + row[:, :, 1:] = audio_token_ids.unsqueeze(1) + return row + + @torch.inference_mode() + def generate( + self, + input_ids: torch.LongTensor, + attention_mask: Optional[torch.Tensor] = None, + max_new_tokens: Optional[int] = None, + max_new_frames: Optional[int] = None, + do_sample: bool = True, + text_temperature: float = 1.0, + text_top_p: float = 1.0, + text_top_k: int = 50, + audio_temperature: Optional[float] = None, + audio_top_p: Optional[float] = None, + audio_top_k: Optional[int] = None, + audio_repetition_penalty: Optional[float] = None, + temperature: float = 1.0, + top_p: float = 0.95, + top_k: int = 50, + repetition_penalty: float = 1.0, + use_kv_cache: bool = True, + n_vq_for_inference: Optional[int] = None, + nq: Optional[int] = None, + **kwargs, + ) -> list[tuple[int, torch.LongTensor]]: + del kwargs + self._resolve_fixed_nq(n_vq_for_inference=n_vq_for_inference, nq=nq) + + if input_ids.ndim == 2: + input_ids = input_ids.unsqueeze(0) + if input_ids.ndim != 3: + raise ValueError(f"Expected input_ids with 3 dims, got {tuple(input_ids.shape)}.") + if input_ids.shape[-1] != self.config.n_vq + 1: + raise ValueError( + f"Expected {self.config.n_vq + 1} channels from config.n_vq, got {input_ids.shape[-1]}." + ) + if attention_mask is None: + attention_mask = torch.ones(input_ids.shape[:2], dtype=torch.bool, device=input_ids.device) + elif attention_mask.ndim == 1: + attention_mask = attention_mask.unsqueeze(0) + attention_mask = attention_mask.to(device=input_ids.device, dtype=torch.bool) + + frame_budget = max_new_frames if max_new_frames is not None else max_new_tokens + if frame_budget is None: + frame_budget = 4096 + frame_budget = int(frame_budget) + + audio_temperature = float(temperature if audio_temperature is None else audio_temperature) + audio_top_p = float(top_p if audio_top_p is None else audio_top_p) + audio_top_k = int(top_k if audio_top_k is None else audio_top_k) + audio_repetition_penalty = float( + repetition_penalty if audio_repetition_penalty is None else audio_repetition_penalty + ) + + batch_size = input_ids.shape[0] + input_ids_length = input_ids.shape[1] + current_input_ids = input_ids + current_attention_mask = attention_mask + current_model_input_ids = current_input_ids + generated_frames: list[torch.LongTensor] = [] + finished = torch.zeros(batch_size, dtype=torch.bool, device=input_ids.device) + past_key_values = None + local_dtype = self.local_transformer.ln_f.weight.dtype + + for _ in range(frame_budget): + generated_audio_history = torch.stack(generated_frames, dim=1) if generated_frames else None + global_inputs_embeds = self._build_inputs_embeds(current_model_input_ids) + global_outputs = self.transformer( + input_ids=None, + past_key_values=past_key_values, + attention_mask=current_attention_mask, + position_ids=None, + inputs_embeds=global_inputs_embeds, + use_cache=use_kv_cache, + output_attentions=False, + output_hidden_states=False, + return_dict=True, + cu_seqlens=None, + num_sequences=None, + ) + global_hidden_states = global_outputs.last_hidden_state[:, -1, :] + local_global_hidden_states = self._global_hidden_to_local(global_hidden_states).to(dtype=local_dtype) + + local_prefix_hidden_states, local_prefix_past_key_values = self._decode_local_hidden_states_with_cache( + local_global_hidden_states.unsqueeze(1) + ) + local_hidden_states = local_prefix_hidden_states[:, -1, :] + next_text_tokens = self._sample_next_assistant_text_token( + local_hidden_states=local_hidden_states, + do_sample=do_sample, + temperature=text_temperature, + top_k=text_top_k, + top_p=text_top_p, + ) + should_continue = next_text_tokens.eq(int(self.config.audio_assistant_slot_token_id)) & ~finished + finished = finished | next_text_tokens.eq(int(self.config.audio_end_token_id)) + if not bool(should_continue.any().item()): + break + + next_frame_tokens = [] + for channel_index in range(int(self.config.n_vq)): + channel_logits = self.audio_lm_heads[channel_index](local_hidden_states) + channel_token = self._sample_next_token( + logits=channel_logits, + do_sample=do_sample, + temperature=audio_temperature, + top_k=audio_top_k, + top_p=audio_top_p, + previous_token_ids=( + None + if generated_audio_history is None + else generated_audio_history[:, :, channel_index] + ), + repetition_penalty=audio_repetition_penalty, + ) + next_frame_tokens.append(channel_token) + if channel_index + 1 < int(self.config.n_vq): + current_local_input = self.audio_embeddings[channel_index](channel_token).to(dtype=local_dtype) + local_token_hidden_states, local_prefix_past_key_values = ( + self._decode_local_hidden_states_with_cache( + current_local_input.unsqueeze(1), + past_key_values=local_prefix_past_key_values, + ) + ) + local_hidden_states = local_token_hidden_states[:, -1, :] + + next_frame = torch.stack(next_frame_tokens, dim=-1) + next_frame = next_frame.masked_fill( + ~should_continue.unsqueeze(-1), + int(self.config.audio_pad_token_id), + ) + generated_frames.append(next_frame) + + next_row = self._build_generation_row( + batch_size=batch_size, + device=input_ids.device, + audio_token_ids=next_frame, + ) + if bool((~should_continue).any().item()): + next_row[~should_continue, 0, 0] = int(self.config.pad_token_id) + next_row[~should_continue, 0, 1:] = int(self.config.audio_pad_token_id) + + current_input_ids = torch.cat([current_input_ids, next_row], dim=1) + current_attention_mask = torch.cat( + [current_attention_mask, should_continue.unsqueeze(1)], + dim=1, + ) + if use_kv_cache: + current_model_input_ids = next_row + past_key_values = global_outputs.past_key_values + else: + current_model_input_ids = current_input_ids + + start_indices = _find_last_equal(input_ids[..., 0], int(self.config.audio_start_token_id)) + start_lengths = input_ids_length - start_indices - 1 + outputs: list[tuple[int, torch.LongTensor]] = [] + for start_index, start_length, generation_ids in zip( + start_indices.tolist(), + start_lengths.tolist(), + current_input_ids, + ): + outputs.append((int(start_length), generation_ids[int(start_index):].detach().cpu())) + return outputs diff --git a/optimized_pipeline/.gitignore b/optimized_pipeline/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..c5a12c425b757efbf0ea0571f177117810bc71dd --- /dev/null +++ b/optimized_pipeline/.gitignore @@ -0,0 +1,10 @@ +__pycache__/ +*.pyc +.private/ +runs/ +outputs/ +*.log +*.pid +references/*.mp3 +references/*.npz +assets.local.json diff --git a/optimized_pipeline/PROMPTING.md b/optimized_pipeline/PROMPTING.md new file mode 100644 index 0000000000000000000000000000000000000000..17c077695a67e82be7b8b718ea8f4176cf3b8a75 --- /dev/null +++ b/optimized_pipeline/PROMPTING.md @@ -0,0 +1,95 @@ +# Prompting guide: spontaneous, relaxed and gentle + +This is the listener-approved default as of 8 November 2026 (`--prompt-style spontaneous`). It keeps the original restrained delivery and adds sparse inline cues for spontaneous, easy, gently spoken conversation. The listener preferred these samples; that does not establish a universal optimum for all voices or scripts. The older `legacy` turn-level style and exaggerated `sentence` experiment remain explicit reproduction options. + +## Use an LLM as the script and direction writer + +Writing every literal turn and every carefully placed acting cue by hand is unnecessarily laborious. We recommend asking an API-based or local language model to produce the JSON script. The LLM writes the dialogue and sparse directions; this Podcast model speaks them. No particular LLM vendor, API key, or network service is required by inference. Review factual content before synthesis. + +Give the writing model this instruction: + +> Write a natural, thoughtful spoken conversation in the requested language. Use the requested speakers, with stable IDs. Separate literal spoken text from performance cues. Keep each turn short enough to fit comfortably below 25.6 seconds; split long explanations into turns. Make the exchange spontaneous, relaxed, gentle and genuine, with modest contextual emotion rather than theatrical intensity. Use one short cue at the start of a turn and at most one additional cue at a meaningful existing sentence boundary. Do not label every sentence with a strong emotion. Do not request forced laughter, excessive breathiness, exaggerated slowness, or “very pleasant/nice to listen to.” Do not insert speaker labels, directions or duration requests into the spoken text. Output valid JSON with `language` and an ordered `turns` array. Each turn has `index`, `speaker`, `text`, `direction`, and optionally one or two `delivery_chunks`, each containing `text` and `cue`. Joining chunk texts with one space must exactly reproduce the turn's literal `text`. Do not change a supplied transcript. Use no generated audio as a reference; references are selected separately. + +Include the topic, factual constraints, speaker roles, intended audience and desired approximate episode length in the writing request. For the evaluated example, two hosts discuss meaning, Viktor Frankl, everyday care and connection. A calm question, gentle curiosity, understated warmth or mild amusement usually suffice. Strong emotions should arise from actual content and an explicit request. + +## Exact approved GENERAL + +```text +A warm, emotionally thoughtful two-host podcast conversation. Very authentic, very genuine. Natural, intimate, spontaneous spoken delivery with clear words, subtle emotion, relaxed conversational pacing and brief meaningful pauses. Be sincere, without an exaggerated announcer voice or forced laughter. Perform only the current speaker turn and speak exactly the SCRIPT. Keep the same speaker identity as the reference audio. +``` + +GENERAL remains constant across the tested episodes. It does not include a voice gender, age, timbre redesign, or “very pleasant to listen to.” Identity comes from the fixed reference audio. For a turn within a podcast, use this exact text even though the individual call contains only one speaker. + +## Single-speaker call template + +```text +GENERAL: [exact GENERAL above] +SCRIPT: +(warm, gently curious; relaxed, spontaneous, gently spoken) What if meaning is something we practise? +(gently, as a spontaneous thought) Maybe it begins with noticing who needs us today. +``` + +The processor receives the separate literal text `What if meaning is something we practise? Maybe it begins with noticing who needs us today.` and **only this speaker's** reference codes. Inline directions belong in `instruction`, not in the literal transcript. Use `tokens=None` and no inline duration brackets: the 320-frame generation ceiling is a limit, not a requested duration. + +Prefer cues such as: + +- `easy, spontaneous, gently spoken` +- `relaxed, unforced, like talking to a friend` +- `soft natural delivery, thinking aloud` +- `casual and sincere, unhurried` +- `gentle conversational flow, in the moment` + +Do not stack all of them onto one sentence. The approved example files rotate a single short cue and add one extra cue inside alternating turns. Most emotion remains subtle. The second cue is optional. + +## JSON accepted by the optimized pipeline + +```json +{ + "language": "en", + "turns": [ + { + "index": 0, + "speaker": "S1", + "text": "What if meaning is something we practise? Maybe it begins with noticing who needs us today.", + "direction": "warm, gently curious", + "delivery_chunks": [ + {"text": "What if meaning is something we practise?", "cue": "warm, gently curious; relaxed, spontaneous, gently spoken"}, + {"text": "Maybe it begins with noticing who needs us today.", "cue": "gently, as a spontaneous thought"} + ] + }, + { + "index": 1, + "speaker": "S2", + "text": "Yes. Perhaps it begins with a small gesture that makes a real difference to someone.", + "direction": "warm and reflective" + } + ] +} +``` + +Use one consistent language per file. Supported codes are `en`, `de`, `nl`, `fr` and `es`; the bundled spontaneous scripts cover all five. Set `language` to `de` and write all turns in German for a German episode. A simpler turn with only `speaker`, `text` and `direction` is valid: the default adds one sparse spontaneous cue without changing the literal words. `index` defaults to its position. Pass one `--script` argument per language in a job. Explicit routing preserves the requested language instead of treating non-German text as English. The CLI validates the exact chunk-to-text reconstruction and rejects ambiguous duplicate language/index pairs. + +Pass a separate reference mapping with `--references` when changing voices: + +```json +{ + "S1": {"path": "audio/voice-one.wav"}, + "S2": {"path": "audio/voice-two.wav"} +} +``` + +Paths are relative to this reference JSON. Audio SHA-256 values are recorded automatically when absent, and verified when supplied. The bundled mapping additionally provides pinned cached MOSS codes. Remove or regenerate `codes` and `code_key` when replacing audio: otherwise the old codes remain the actual conditioning input. Use clean single-speaker references around 5–15 seconds and reuse them for the entire episode. + +## Multi-speaker episodes versus native two-speaker blocks + +The recommended optimized route generates each speaker turn separately, always with its correct reference, and then assembles the turns chronologically. A GPU batch can contain different speakers and texts, but their generated histories and rewards stay separate. This is a multi-speaker **episode**, not two speakers mixed into one model call. Any supported speaker ID in the reference mapping can route an independently generated turn; only the two-voice example has been evaluated here. + +The preserved native pair route (`infer_legacy.py --mode pairs`) instead uses the trained S1/S2 reference wrapper and `(speaker=S1, ...)` / `(speaker=S2, ...)` instructions within one call. Labels must not appear in the literal transcript. This route has different content checks and rewards, and is not covered by the new optimized Best-of-N timing table. See the model repository's multi-speaker guide before using it. Do not pass two references to the optimized single-turn call and assume it will switch identities correctly. + +## Settings and selection + +BF16 policy, temperature **1.0**, CFG **2.5**, top-p **0.95**, top-k **50**, free timing, up to **320 × 80 ms = 25.6 s per turn**. No voice conversion, DPO or extra LoRA. Default N=4; use `--n 2` or `--n 1` to trade selection opportunity for less compute. + +For N>1, choose the maximum of `0.5*clip(Ears native genuineness/6,0,1) + 0.5*clip(ECAPA reference cosine,0,1)` per complete raw turn. This is fixed normalization, not candidate-wise min/max. WER and Content Enjoyment are not selection terms. N=1 retains its sole take and skips online scoring. All modes receive the same independent final audit. + +Quality checks are essential: a highly genuine, similar-sounding take can still omit words. The experiment keeps strict ranking results and flags such failures. If a complete listening copy is repaired using another candidate, document that additional content eligibility check explicitly; never present it as unconstrained reward argmax or as an unchanged Single Take. diff --git a/optimized_pipeline/README.md b/optimized_pipeline/README.md new file mode 100644 index 0000000000000000000000000000000000000000..de8f786121d7e57e7e9d48f9b1d7218e7006f416 --- /dev/null +++ b/optimized_pipeline/README.md @@ -0,0 +1,11 @@ +# Optimized Podcast pipeline + +Default: listener-approved sparse spontaneous, relaxed and gentle prompting, fixed references, and 50/50 Ears genuineness + ECAPA similarity for N>1. N=1 keeps its only take and skips online ranking. + +[Full pipeline and measured performance](../guides/PIPELINE.md) · [Prompting and LLM-writing templates](../guides/PROMPTING.md) · [Agent guide](../guides/AGENT_GUIDE.md). + +Use `produce.py` for generation, audit and MP3/HTML export; `speaker_run.py` and `speaker_finish.py` expose the phases. `compare_n.py` shares loaded weights across N=2 and N=1. The memory-constrained `low_memory_compare.py` instead releases the policy before decoding and judging; it accepts configurable N values and scripts in EN/DE/NL/FR/ES. `finish_comparison.py` shares frozen audit models across all requested modes. `compare_report.py` retains the earlier EN/DE listening comparison. Read the timing and hardware caveats before comparing runs. + +[Public five-language listening room](https://huggingface.co/spaces/laion/Humanness-Voice-Podcast): fixed references, exact prompts and Best-of-4 / Best-of-2 / Single Take episodes. + +No LLM API key is needed. Third-party notices remain in source. Reference recordings retain their source terms and are downloaded separately. diff --git a/optimized_pipeline/SPEAKER_RECIPE.md b/optimized_pipeline/SPEAKER_RECIPE.md new file mode 100644 index 0000000000000000000000000000000000000000..62453f6ff5043a3d3404883b1296f64c0966190f --- /dev/null +++ b/optimized_pipeline/SPEAKER_RECIPE.md @@ -0,0 +1,187 @@ +# Podcast generation pipeline — reproducible Best-of-N + +This recipe uses the **Podcast full fine-tune**, not the general Large 1.7 checkpoint. It generates complete independent speaker turns, samples N takes per turn in parallel, ranks them, and assembles the winners into a two-host episode. Voice conversion is disabled. English, German, Dutch, French and Spanish use the same two reference recordings. + +**[Public listening room: references and Best-of-4 / Best-of-2 / Single Take in five languages](https://huggingface.co/spaces/laion/Humanness-Voice-Podcast).** The page includes the exact scripts, prompt example, per-turn audit and measured generation times. The English N4 complete listening copy has one explicitly documented candidate replacement; its strict original remains downloadable. + +## Current best practice: sparse spontaneous, relaxed and gentle delivery + +On 8 November 2026 the listener approved the **sparse spontaneous/relaxed/gentle inline variant** and requested it as the standard. `--prompt-style spontaneous` is now the default. The earlier restrained `legacy` prompt remains available, while the exaggerated per-sentence emotion experiment is retained only for reproduction. This is a listener preference, not a universal or blinded-study optimum. + +Read the [exact prompting guide and LLM-writing template](../optimized_pipeline/PROMPTING.md). An API-based or local LLM is recommended for writing the script and sparse cues: hand-authoring every turn and direction is unnecessarily laborious. The TTS itself does not write the dialogue and needs no LLM API key. + +Exact GENERAL: + +> A warm, emotionally thoughtful two-host podcast conversation. Very authentic, very genuine. Natural, intimate, spontaneous spoken delivery with clear words, subtle emotion, relaxed conversational pacing and brief meaningful pauses. Be sincere, without an exaggerated announcer voice or forced laughter. Perform only the current speaker turn and speak exactly the SCRIPT. Keep the same speaker identity as the reference audio. + +Use **one moderate parenthesized direction plus a short spontaneous/gentle cue per turn**, and at most one extra cue at an existing sentence boundary, e.g. `(warm, intimate welcome; gently curious)`, followed by the literal transcript. Do not repeatedly demand strong emotions, forced laughter, or exaggerated acting. “Very pleasant to listen to” is deliberately absent. The experimental per-sentence style remains available only for reproducing the rejected comparison. + +Temperature **1.0**, CFG **2.5**, top-p **0.95**, top-k **50**, BF16, free timing (`tokens=None`), 320 semantic frames / 25.6 s maximum per turn. Split longer scripts into shorter turns. No DPO, additional LoRAs, or voice conversion. These settings apply to this Podcast checkpoint, not all Humaneness models. + +## Exact reward and quality audit + +``` +G = clip(native Humaneness Ears genuineness / 6, 0, 1) +S = clip(cosine(ECAPA(candidate), ECAPA(correct reference)), 0, 1) +reward = 0.5 * G + 0.5 * S +``` + +There is **no Content Enjoyment term and no WER multiplier or WER selection gate**. Fixed scales avoid unstable per-batch min/max normalization. Exact ties select the lowest candidate index. Score complete raw candidates; audit the edited winner separately. ECAPA is an approximate identity cue, not a guarantee of successful cloning. A high reward does not guarantee correct words. + +After selection, Qwen forced alignment supplies approximate word boundaries for its supported languages (EN/DE/FR/ES here); keep 80 ms before the first word and 150 ms after the last, with small fades outside the aligned words. Dutch is **not** a supported Qwen alignment language. For Dutch, or unusable Qwen boundaries, Parakeet TDT estimates boundaries only when its transcript has at most 15% WER and matches the script's first and last two normalized words. These are explicitly labeled **ASR token boundary estimates**, not forced alignment. Uncertain cases remain untrimmed and flagged. Reassembly targets a 400 ms **word-to-word** gap using those estimates; for an unverified clip it falls back to clip edges. Final Parakeet WER is diagnostic only; never silently replace the reward winner. Export mono 48 kHz / 192 kbps MP3 plus lossless source, subtitles, per-turn scores, review flags, and listening HTML. No internal pause compaction. + +## Weights and references + +| Component | Published source | Pinned revision | +|---|---|---| +| Podcast policy, full FT step 9874, 4.13B | [laion/Humanness-Voice-Podcast](https://huggingface.co/laion/Humanness-Voice-Podcast) | `91f8110cd815f2233301a8b1dd16dbbf3fae8e05` | +| MOSS v2 codec | [OpenMOSS-Team/MOSS-Audio-Tokenizer-v2](https://huggingface.co/OpenMOSS-Team/MOSS-Audio-Tokenizer-v2) | `f6e20e543b33d2c252a7ef71bdf8aa71e5ff9169` | +| Genuineness judge | [Humaneness Ears Medium](https://huggingface.co/laion/humaneness-ears-base-medium) | `818506970d93c809a3295a0a02c40dee8ff2bfc3` | +| Speaker similarity, 192D | [SpeechBrain ECAPA VoxCeleb](https://huggingface.co/speechbrain/spkrec-ecapa-voxceleb) | `0f99f2d0ebe89ac095bcc5903c4dd8f72b367286` | +| Final transcript diagnostic | [Parakeet TDT 0.6B v3](https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3) | `541d1f99c6b0c3cd0b11a95167540bb8edefd82b` | +| Final alignment | [Qwen3 ForcedAligner](https://huggingface.co/Qwen/Qwen3-ForcedAligner-0.6B-hf) | `c07281df297b9905d24a508279258cccf987a064` | + +All five languages condition S1 on `de_s1.mp3` and S2 on `de_s2.mp3`, from the Podcast repository's [reference release](https://huggingface.co/laion/Humanness-Voice-Podcast/tree/0947ffdcedf85705683b256ccc310c90ccf3b6a9/examples/references). Recordings are approximately 14.52 / 13.08 s; cached codec conditioning contains 181 / 163 frames (14.48 / 13.04 s). `references.json` contains SHA-256 checks. Do not confuse fictional host labels with real identities. Source recordings retain original terms; this code package downloads them rather than relicensing them. The listening Space includes byte-identical copies with provenance. + +## Run on another machine + +The [standalone code](../optimized_pipeline/) includes the optimized policy/codec runtime, scoring, example scripts, alignment and reassembly. It does not import the Robby server, depend on private absolute paths, or require API keys. NVIDIA CUDA with BF16 support is required for this optimized path. Tested environment: RTX 3090 24 GB, Python 3.12, PyTorch 2.6.0+cu124, Transformers 5.15.0. Install system `ffmpeg` and `libsndfile` first. Use an empty GPU; unrelated workloads can cause OOM or change timings. The policy alone occupies about 8.26 GB; codec, judges, KV caches and graph capture need additional memory. + +```bash +cd optimized_pipeline +python3.12 -m venv .venv +source .venv/bin/activate +pip install torch==2.6.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124 +pip install -r requirements.txt +# Optionally set HF_HOME and PODCAST_CACHE on a drive with sufficient free space. +python prepare.py +MODEL=$(python -c 'import json; print(json.load(open("assets.local.json"))["model"])') +python -m unittest test_contracts test_speaker_recipe +python speaker_run.py --model "$MODEL" --device cuda:0 --n 4 \ + --prompt-style spontaneous --output outputs/approved/generation +python speaker_finish.py --runs outputs/approved/generation \ + --output outputs/approved --device cuda:0 +# Open outputs/approved/index.html. +``` + +`--n 1` keeps its only take and skips online scoring; final audit still measures its quality. `--n 2` uses the same 50/50 selection as N=4. N is takes **per segment**; the automatic pilot chooses one or two independent segments per policy batch, at most 16 simultaneous candidates. With two segments and N=4 the policy handles eight candidate histories, plus their CFG branches. The sample scripts have 20 turns per language. Supply custom JSON with `--script` (repeatable) and `--references`; see the prompting guide. `produce.py` runs generation plus audit/export in one command. `--limit 2` is a useful first smoke test. Re-run exactly the same configuration to resume completed turns; use a fresh directory when prompts/references/settings change. A live local Parakeet service is optional via the finisher's `--asr-url`; the default audit loads it locally after generation releases the policy. + +Code includes checks that reused prompt prefill has identical hidden states and valid KV entries, that batched generation reproduces the prior one-segment runner, and that codec encoder offloading preserves decoding. If prefill equivalence fails, reuse is disabled. CUDA/Triton compilation is cold-start work and can take minutes. Same seeds do not promise identical outputs across hardware, libraries or batch grouping. Preserve all recorded scripts, source hashes, seeds and candidate scores. + +The archived causal chunk search lives in `generation.py`; the default command above is **offline complete-turn selection**, not real-time Best-of-N streaming. Its legacy search reward differs; do not present it as the 50/50 experiment. + +## Measured approved Best-of-4 baseline + +Hardware: one RTX 3090 24 GB on a shared host; BF16, two turns × four takes per batch, 512-position semantic buckets, 26-frame internal waveform blocks, existing compiler cache. Both languages use the same fixed reference pair and approved sparse spontaneous directions. + +| Language | Final audio | Generation + ranking | Useful RTF ↓ | Genuineness / 6 ↑ | ECAPA cosine ↑ | Mean turn WER ↓ | +|---|---:|---:|---:|---:|---:|---:| +| German | 219.38 s | 179.98 s | 0.821 | 3.943 | 0.640 | 1.98% | +| English, strict selection | 193.30 s | 195.83 s | 1.013 | 3.880 | 0.407 | 5.50% | + +Useful RTF divides generation/ranking time by **final edited audio duration**, not total candidate audio. It excludes loading, correctness probes, final audit and export. Combined production including archival/cleanup took 380.10 s; process start to MP3 exports took 645.59 s, excluding service restoration and the additional listening repair. + +Across both episodes: policy prediction 324.85 s, waveform decoding 24.85 s, ranking/preprocessing 21.25 s, remaining generation overhead 4.86 s. Ears forward work 4.35 s and ECAPA 3.08 s are included in ranking. Archival used 24.87 CPU seconds but blocked GPU production for just 1.08 s. These are measured stages, not promises for another machine. + +**Content failure retained:** strict English turn 6 stopped after the first sentence. A separate complete listening copy replaces only that turn with existing candidate 1 (reward 0.499669; diagnostic WER 3.33%) and lasts 201.22 s. No new synthesis was used. This explicitly adds a content eligibility check; it is not the original strict 50/50 result. The default pipeline keeps strict winners and flags problems instead of silently repairing them. The listener approved the sparse style including that complete listening copy. + +See [baseline machine-readable results](../optimized_pipeline/benchmarks/spontaneous-2026-11-08.json) and [historical experiments](../guides/PODCAST_EXPERIMENT_HISTORY.md). Metrics are fallible model estimates, not blinded human ratings. + +## Implemented speed optimizations + +- BF16 policy, reusable semantic and local-decoder CUDA graphs, fast token sampling and tested fused codec operations. +- Multiple independent turns in one batch. Histories remain separate; candidate selection is local to each turn. +- Identical candidate prompts reuse prefill only after hidden-state and valid-KV equality checks. A two-group check measured 2.009 s normally versus 0.518 s with reuse. +- Cache reference acoustic codes and speaker embeddings. Keep the unused codec encoder in CPU RAM after reference preparation. +- Batch the Ears/ECAPA judges. Skip online ranking for N=1; reserve Parakeet for final audit. +- Archive every candidate with one bounded CPU writer while the next GPU batch runs. Propagate write failures before publishing a completed-turn receipt. +- Reuse an explicitly selected `--groups` value, a warmed worker and compiler caches instead of repeating setup and timing sweeps for every episode. + +`--groups 2 --n 4`, `--groups 4 --n 2`, and `--groups 8 --n 1` each maintain eight candidates per policy batch, plus CFG branches. These layouts change RNG trajectories; N1/N2 are not necessarily subsets of an N4 run. Resume requires unchanged settings and stable batch grouping. + +### When VRAM is shared or limited + +`low_memory_compare.py` separates **policy token generation → release policy → waveform decoding and ranking**. It saves acoustic tokens for every candidate, retains the same token sampling loop, checks shared/full prefill equality and tests optional fused decoding. It requires prepared reference codes. This is an offline comparison runner, not a streaming service and not a general low-memory implementation for arbitrary recordings. + +```bash +python low_memory_compare.py --model "$MODEL" --device cuda:0 --output outputs/n-comparison +for N in 2 1; do + python speaker_finish.py --runs "outputs/n-comparison/n$N/generation" \ + --output "outputs/n-comparison/n$N" --device cuda:0 + python verify_artifacts.py "outputs/n-comparison/n$N" +done +python compare_report.py --n4 outputs/spontaneous --n2 outputs/n-comparison/n2 \ + --n1 outputs/n-comparison/n1 --output outputs/n-comparison +``` + +Stage sums exclude shared loading and inter-phase waiting; the parent receipt records total generation-job time. Do not label their sum request latency. An integrated attempt ran out of memory when another user's training job appeared; no unrelated job was stopped. The phased comparison uses the same shared GPU under that extra load. A fair speed ablation should repeat N=1/2/4 with identical warm-up and an otherwise idle GPU. + +### Reproduce the additional Dutch, French and Spanish episodes + +The bundled `script-spontaneous-{en,de,nl,fr,es}.json` files contain the same twenty-turn conversation, translated by a language model and preserving the sparse directions. Language routing is explicit throughout the processor and alignment stages. Default scripts remain EN/DE for compatibility; supply the other files explicitly. The example below maintains up to eight candidates per policy batch: two turns at N4, four at N2, eight at N1. It needs a fresh output directory and prepared reference codes. + +```bash +python low_memory_compare.py --model "$MODEL" --device cuda:0 \ + --script script-spontaneous-nl.json \ + --script script-spontaneous-fr.json \ + --script script-spontaneous-es.json \ + --n-values 4 2 1 --candidates 8 --output outputs/five-language-extension +python finish_comparison.py --runs outputs/five-language-extension --device cuda:0 +for N in 4 2 1; do + python verify_artifacts.py "outputs/five-language-extension/n$N" +done +``` + +`finish_comparison.py` shares frozen scoring/alignment models across the three modes and writes its parent completion receipt only after all exports finish. This run produces 420 candidates and nine episodes (180 selected turns). It is not a nested re-ranking of one N4 pool: N2/N1 are separate runs with their own recorded seeds and batch grouping. Publication retains strict reward winners and exposes review flags, including uncertain boundaries and possible omitted words. Machine ASR is an audit aid, not a native-speaker listening verdict. The same fixed German references deliberately test cross-language voice conditioning. + +## Next speed improvements to measure + +Policy prediction dominates. In N4, 37/160 candidates hit the 25.6-s cap and 19/20 batches waited for a capped candidate. Length-aware grouping and safe finished-row compaction may reduce wasted work, but require verified CFG/cache remapping and complete-script checks. Do not simply reduce the ceiling or remove words to improve RTF. A persistent dedicated worker is the lowest-risk way to avoid loading and compilation latency. + +Reassembly and scoring are much smaller costs. Optimizing the codec alone cannot remove the policy bottleneck. Keep truthful per-stage, per-episode and end-to-end timings; preserve all candidate files so selection experiments need no fresh synthesis. + +## Fresh N=1 and N=2 comparison with the approved prompts + +Both episodes were freshly generated at N=2 and N=1 after publishing the new defaults. Same literal scripts, cues, reference pair, temperature 1.0 and CFG 2.5. N1 keeps its sole take and skips online ranking. N2 uses the same 50/50 reward as N4; there is no WER gate or hidden retry. + +| Language | N | Final audio | Generate + rank | Useful RTF ↓ | Genuineness / 6 ↑ | ECAPA cosine ↑ | Mean turn WER ↓ | +|---|---:|---:|---:|---:|---:|---:|---:| +| DE | 1 | 220.75 s | 55.24 s | 0.250 | 3.916 | 0.553 | 1.21% | +| DE | 2 | 222.26 s | 115.80 s | 0.521 | 3.897 | 0.630 | 2.56% | +| DE | 4 | 219.38 s | 179.98 s | 0.821 | 3.943 | 0.640 | 1.98% | +| EN | 1 | 199.30 s | 68.56 s | 0.344 | 3.863 | 0.352 | 2.12% | +| EN | 2 | 199.54 s | 122.77 s | 0.615 | 3.904 | 0.383 | 2.93% | +| EN | 4 | 193.30 s | 195.83 s | 1.013 | 3.880 | 0.407 | 5.50% | + +In this sample, **N=2 is a useful speed/identity compromise**: German speaker cosine rises from 0.553 at N1 to 0.630 at N2, close to N4's 0.640. English rises from 0.352 to 0.383; N4 is 0.407. Genuineness stays roughly 3.9/6. N1 is faster but less consistent in speaker identity. These are twenty turns per language, not evidence of a universal optimum. The old English N4 row includes its documented incomplete turn; the repaired listening copy is separate. + +All 80 new selected turns passed the configured review checks (per-turn WER threshold 15% and usable forced alignment); none was regenerated or replaced. This is not a guarantee of perfect speech. Both candidate counts passed artifact validation, exact prompt/reference routing, strict selection and PCM equality checks. The token/full-prefill checks and optional fused decoding were bit-identical on their tested inputs. Fourteen CPU tests pass. + +**Timing scope:** N2 production across both languages totals 238.57 s; N1 totals 123.80 s; old N4 totals 375.80 s. Token prediction accounts for 209.57 / 113.22 / 324.85 s respectively. N2 codec/ranking take 18.18/10.07 s; N1 codec takes 9.91 s and online ranking zero. Loading, correctness probes, final audit and export are excluded from these production sums. The complete successful N2+N1 experiment, from process start to all four MP3s, took **660.70 s**. The failed earlier OOM attempt and live-service restoration are excluded. + +N2/N1 used phased execution under additional unrelated GPU training; N4 used integrated execution with a different background load. The other training ended before final auditing. Do not claim these are controlled percentage speedups from N alone. N2 uses four turns per batch and N1 eight (final partial batches smaller), maintaining up to eight simultaneous candidates. Different groups/seeds mean these are fresh runs, not nested subsets of the N4 pool. + +See [aggregate results](../optimized_pipeline/benchmarks/n-comparison-2026-11-08.json) and [all per-turn candidate scores, seeds and audits](../optimized_pipeline/benchmarks/n-comparison-2026-11-08-turns.json). Recreate the listening HTML with `compare_report.py`; the six strict episodes and additional labeled N4 English listening copy are independently selectable. + + +## Five-language listening release: additional NL / FR / ES results + +[Open the public listening Space](https://huggingface.co/spaces/laion/Humanness-Voice-Podcast). The nine additional episodes use the same fixed reference pair, approved sparse prompting and translated twenty-turn story as the DE/EN examples. All N2/N4 reward winners and all N1 sole takes are retained; no retries, content re-selection or voice conversion. + +| Language | N | Final audio | Production | Useful RTF | Genuineness / 6 | ECAPA cosine | Mean turn WER | Transcript / boundary flags, of 20 | +|---|---:|---:|---:|---:|---:|---:|---:|---:| +| NL | 4 | 303.00 s | 261.95 s | 0.865 | 3.969 | 0.388 | 14.4% | 8 / 10 | +| NL | 2 | 298.90 s | 134.25 s | 0.449 | 3.884 | 0.352 | 13.5% | 5 / 8 | +| NL | 1 | 280.82 s | 73.28 s | 0.261 | 3.897 | 0.333 | 15.1% | 6 / 9 | +| FR | 4 | 238.82 s | 242.20 s | 1.014 | 4.021 | 0.420 | 21.9% | 8 / 4 | +| FR | 2 | 231.62 s | 131.62 s | 0.568 | 4.032 | 0.385 | 14.2% | 6 / 3 | +| FR | 1 | 238.10 s | 65.74 s | 0.276 | 3.906 | 0.362 | 14.5% | 5 / 4 | +| ES | 4 | 234.02 s | 250.40 s | 1.070 | 4.008 | 0.450 | 2.2% | 0 / 0 | +| ES | 2 | 233.78 s | 134.51 s | 0.575 | 4.018 | 0.385 | 2.6% | 0 / 0 | +| ES | 1 | 232.66 s | 57.90 s | 0.249 | 4.020 | 0.392 | 2.1% | 1 / 0 | + +Flags are materially more frequent in Dutch and French than Spanish in this fixed-reference run. Some recognized transcripts omit words or drift across languages. ASR itself is fallible, and a boundary warning alone does not imply missing speech. Dutch uses conservative Parakeet TDT boundaries because the Qwen aligner does not support Dutch. Uncertain clips remain untrimmed, so some episodes include longer tails. These examples are not endorsed as error-free multilingual outputs. Scripts and detailed diagnostics are available next to every player. + +Production is the sum of policy, codec and online selection time, excluding loading, correctness probes, final audit and encoding. Phased inference used one RTX 3090 alongside unrelated jobs; cross-run GPU loads differ. N4/N2/N1 use separate draws and grouping, not nested subsets. Do not interpret these measurements as a controlled speed or quality ablation. + +[Aggregate measurements](../optimized_pipeline/benchmarks/five-language-extension-2026-11-08.json) · [All candidate scores and selected-turn audits](../optimized_pipeline/benchmarks/five-language-extension-2026-11-08-turns.json). diff --git a/optimized_pipeline/archive.py b/optimized_pipeline/archive.py new file mode 100644 index 0000000000000000000000000000000000000000..861d334174464871c7c0fdf910cf71cf111707d8 --- /dev/null +++ b/optimized_pipeline/archive.py @@ -0,0 +1,25 @@ +"""Bounded CPU archival: publish a turn receipt only after every artifact exists.""" +import time +from pathlib import Path +import soundfile as sf +from safetensors.torch import save_file +from recipe import dump,specification + +def archive_batch(out,batch,waves,codes,scores,perf,refs,n,total_s): + tick=time.perf_counter() + for group,(lang,turn) in enumerate(batch): + local=scores[group*n:(group+1)*n] + winner=0 if n==1 else max(range(n),key=lambda i:(local[i]['reward'],-i));idx=group*n+winner + folder=Path(out)/f'bestof{n}-speaker5050'/f"{lang}-{turn['index']:02d}";folder.mkdir(parents=True,exist_ok=True) + for i in range(n):sf.write(folder/f'candidate-{i}.flac',waves[group*n+i],48000,subtype='PCM_24') + sf.write(folder/'raw.flac',waves[idx],48000,subtype='PCM_24') + assert not codes[idx].is_cuda,'Archival must not touch the GPU' + save_file({'codes':codes[idx]},str(folder/'selected-codes.safetensors')) + per=dict(**perf,mode='turn',first_commit_seconds=total_s,raw_seconds=len(waves[idx])/48000, + final_scores=local,winner=winner,group_index=group,group_count=len(batch), + timing_allocation='batch wall time divided equally among independent segments; first_commit is full batch latency') + dump(folder/'result.json',dict(language=lang,turn=turn,variant=f'bestof{n}-speaker5050', + reference=refs[turn['speaker']],performance=per,prompt=specification(turn,lang)['prompt'],generated_unix=time.time())) + print('TURN',lang,turn['index'],'winner',winner,'reward',local[winner]['reward'], + 'ranking_skipped',n==1,'batch_s',round(total_s,2),flush=True) + return dict(seconds=time.perf_counter()-tick,turns=[t['index'] for _,t in batch],language=batch[0][0]) diff --git a/optimized_pipeline/audit_alignment.py b/optimized_pipeline/audit_alignment.py new file mode 100644 index 0000000000000000000000000000000000000000..701e7bea5e537afd90c33ed88bc7aff0b407a399 --- /dev/null +++ b/optimized_pipeline/audit_alignment.py @@ -0,0 +1,48 @@ +"""Conservative boundaries: Qwen supported languages, Parakeet TDT otherwise. + +Parakeet fallback is ASR-based boundary estimation, not forced alignment. It must +recognize the script with <=15% WER and match its opening/closing two words before +we trim. Uncertain cases retain original audio. Neither path changes selection. +""" +import os +from recipe import errors,tokens +from languages import language_name,QWEN_ALIGNMENT_LANGUAGES + +def transcript_supports_edges(reference,hypothesis): + ref,hyp=tokens(reference),tokens(hypothesis);k=min(2,len(ref)) + return bool(ref and hyp and errors(reference,hypothesis)['wer']<=.15 and ref[:k]==hyp[:k] and ref[-k:]==hyp[-k:]) + +class BoundaryAligner: + def __init__(self,device): + from align_engine import QwenAligner + self.device=device;self.qwen=QwenAligner(device=device);self.ok=self.qwen.ok;self.model=None + def align(self,wave,words,language): + if language in QWEN_ALIGNMENT_LANGUAGES: + result=self.qwen.align(wave,words,language=language_name(language)) + if result and all(x[3]>.5 for x in result):return result,dict(method='qwen_forced_alignment',timing_basis='forced_alignment_estimate') + return self.parakeet(wave,' '.join(words)) + def parakeet(self,wave,reference): + import torch + from transformers import ParakeetProcessor,ParakeetForTDT + if self.model is None: + repo=os.environ.get('PODCAST_ASR','nvidia/parakeet-tdt-0.6b-v3') + self.proc=ParakeetProcessor.from_pretrained(repo,local_files_only=True) + self.model=ParakeetForTDT.from_pretrained(repo,dtype=torch.bfloat16,local_files_only=True).to(self.device).eval() + with torch.inference_mode(): + x=self.proc([wave],sampling_rate=16000,return_tensors='pt',padding=True) + x={k:v.to(self.device,dtype=torch.bfloat16 if v.is_floating_point() else v.dtype) for k,v in x.items()} + out=self.model.generate(**x,max_new_tokens=2048) + text=self.proc.batch_decode(out.sequences,skip_special_tokens=True)[0] + durations=out.durations[0].cpu();ids=out.sequences[0].cpu();starts=durations.cumsum(0)-durations + meta=dict(method='parakeet_tdt_boundaries',timing_basis='asr_token_boundary_estimate',recognized=text,script_wer=errors(reference,text)['wer'],supported_edges=transcript_supports_edges(reference,text)) + if not meta['supported_edges']:return None,meta + frame_s=self.proc.feature_extractor.hop_length/self.proc.feature_extractor.sampling_rate*8 + skip={self.proc.tokenizer.pad_token_id,self.proc.blank_token_id};result=[];limit=len(wave)/16000 + for token,start,duration in zip(ids.tolist(),starts.tolist(),durations.tolist()): + if token in skip:continue + piece=self.proc.tokenizer.decode([token],skip_special_tokens=True,group_tokens=False) + if not tokens(piece):continue + a=start*frame_s;b=min(limit,(start+max(1,duration))*frame_s) + if 0<=a=result[-1][2]:return None,meta + return result,meta diff --git a/optimized_pipeline/benchmarks/five-language-extension-2026-11-08-turns.json b/optimized_pipeline/benchmarks/five-language-extension-2026-11-08-turns.json new file mode 100644 index 0000000000000000000000000000000000000000..fa128797013ef37d94eda10bdfa9fd6d85db5ccf --- /dev/null +++ b/optimized_pipeline/benchmarks/five-language-extension-2026-11-08-turns.json @@ -0,0 +1,5762 @@ +[ + { + "language": "nl", + "n": 4, + "index": 0, + "speaker": "S1", + "text": "Welkom bij Kleine vragen, grote gevoelens. Vandaag: de zin van het leven. Idris, ik hoopte op een duidelijk antwoord. Het liefst iets wat ik kan onthouden terwijl ik mijn sleutels zoek.", + "seed": 202631080, + "winner": 2, + "candidates": [ + { + "reward": 0.4685422142113869, + "genuineness": 3.710290026385337, + "ecapa_cosine": 0.318702757358551, + "ranking_skipped": false + }, + { + "reward": 0.372660299607863, + "genuineness": 3.8044306244701147, + "ecapa_cosine": 0.11124882847070694, + "ranking_skipped": false + }, + { + "reward": 0.4914857199570785, + "genuineness": 3.892295182682574, + "ecapa_cosine": 0.334255576133728, + "ranking_skipped": false + }, + { + "reward": 0.3844995144366597, + "genuineness": 4.199821136426181, + "ecapa_cosine": 0.069028839468956, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.12903225806451613, + "transcript": "Welkom bij Kleine Vragen Groot de Gevoelens. Vandaag de zin van het leven. Idried, ik hoop op een duidelijk antwoord. Het liefst iets wat ik kan onthouden terwijl ik mijn sleutels zoek.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 1, + "speaker": "S2", + "text": "Ik heb koekjes meegenomen. Geen complete filosofie, maar ze maken onzekerheid een stuk gezelliger. Misschien kunnen we wat kleiner beginnen dan het hele universum uitleggen vóór de thee.", + "seed": 202631080, + "winner": 1, + "candidates": [ + { + "reward": 0.5251307557336986, + "genuineness": 4.055472219362855, + "ecapa_cosine": 0.3743494749069214, + "ranking_skipped": false + }, + { + "reward": 0.542477933767562, + "genuineness": 3.99271182063967, + "ecapa_cosine": 0.4195038974285126, + "ranking_skipped": false + }, + { + "reward": 0.5339499606440465, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.41290801763534546, + "ranking_skipped": false + }, + { + "reward": 0.5175279512768611, + "genuineness": 4.1119565782137215, + "ecapa_cosine": 0.3497298061847687, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.17857142857142858, + "transcript": "Ik heb koekjes meegenomen. Geen complete filosofie, maar ze maken onzekerheid een stuk gezelliger. Misschien kunnen we wat kleiner beginnen, beginnen dan het hele universum uit te leggen voor de thee.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 4, + "index": 2, + "speaker": "S1", + "text": "Goed dan. Waarom voelt een gewone middag soms zo waardevol, terwijl een dag vol prestaties vreemd leeg kan aanvoelen? Wat is het verschil tussen druk zijn en echt leven?", + "seed": 202631142, + "winner": 0, + "candidates": [ + { + "reward": 0.5376281632731359, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.42026442289352417, + "ranking_skipped": false + }, + { + "reward": 0.5331553938255336, + "genuineness": 3.9111233022995293, + "ecapa_cosine": 0.41445690393447876, + "ranking_skipped": false + }, + { + "reward": 0.518903946930853, + "genuineness": 3.9738837010227144, + "ecapa_cosine": 0.37549394369125366, + "ranking_skipped": false + }, + { + "reward": 0.5074552551377565, + "genuineness": 3.8671910231932998, + "ecapa_cosine": 0.37037867307662964, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.06896551724137931, + "transcript": "Goed dan! Waarom voelt een gewone middag soms zo waardevol, terwijl een dag voor prestaties vreemd pleeg kan aanvoelen? Wat is het verschil tussen druk zijn en echt leven?", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 3, + "speaker": "S2", + "text": "Viktor Frankl, de Oostenrijkse psychiater, stelde de zoektocht naar zin centraal in zijn benadering. Zijn vraag gaat verder dan plezier of succes: wat is belangrijk genoeg om erop te reageren?", + "seed": 202631142, + "winner": 3, + "candidates": [ + { + "reward": 0.5255675353885938, + "genuineness": 3.6914619067683816, + "ecapa_cosine": 0.43589141964912415, + "ranking_skipped": false + }, + { + "reward": 0.3651393173883359, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.07528673112392426, + "ranking_skipped": false + }, + { + "reward": 0.46638166531920433, + "genuineness": 3.8295347839593887, + "ecapa_cosine": 0.29450753331184387, + "ranking_skipped": false + }, + { + "reward": 0.5433497721484553, + "genuineness": 4.193545096553862, + "ecapa_cosine": 0.38777536153793335, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.16666666666666666, + "transcript": "Victor Frankel, de Oostenrijkse psychiater, stelde de zoektocht naar zin centraal in zijn benadering. Ze vraagt graag verder dan plezier of succes: wat is belangrijk genoeg om erop te reageren?", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 4, + "index": 4, + "speaker": "S1", + "text": "Dus we zoeken niet naar één schitterende zin die ieders leven verklaart? Geen universele handleiding met een ontbrekende bladzijde en zo een onmogelijk klein schroevendraaiertje?", + "seed": 202631204, + "winner": 2, + "candidates": [ + { + "reward": 0.49544575771627325, + "genuineness": 3.917399342171848, + "ecapa_cosine": 0.3379916250705719, + "ranking_skipped": false + }, + { + "reward": 0.3431818212072055, + "genuineness": 3.6287015080451965, + "ecapa_cosine": 0.08158005774021149, + "ranking_skipped": false + }, + { + "reward": 0.5210611177220319, + "genuineness": 3.747946265619248, + "ecapa_cosine": 0.4174645245075226, + "ranking_skipped": false + }, + { + "reward": 0.426300788919131, + "genuineness": 3.6287015080451965, + "ecapa_cosine": 0.2478179931640625, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.04, + "transcript": "Dus we zoeken niet naar één schitterende zin die ieders leven verklaart. Geen universele handleiding met een ontbrekende bladzijde en zo een onmogelijk klein schroevendraertje.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 5, + "speaker": "S2", + "text": "Gelukkig hoef je niets in elkaar te zetten. Volgens Frankl ontdekken mensen betekenis in concrete situaties. Wat vanochtend voor jou telt, kan heel anders zijn dan wat tien jaar geleden belangrijk was.", + "seed": 202631204, + "winner": 0, + "candidates": [ + { + "reward": 0.4780508540570736, + "genuineness": 3.8295347839593887, + "ecapa_cosine": 0.3178459107875824, + "ranking_skipped": false + }, + { + "reward": 0.44263464614050463, + "genuineness": 3.6130114083644003, + "ecapa_cosine": 0.2831007242202759, + "ranking_skipped": false + }, + { + "reward": 0.45865852090840536, + "genuineness": 3.6538056675344706, + "ecapa_cosine": 0.3083494305610657, + "ranking_skipped": false + }, + { + "reward": 0.4499294155199702, + "genuineness": 3.798154584597796, + "ecapa_cosine": 0.2668330669403076, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03125, + "transcript": "Gelukkig hoef je niets in elkaar te zetten. Volgens Frankel ontdekken mensen betekenis in concrete situaties. Wat vanochtend voor jou telt, kan heel anders zijn dan wat tien jaar geleden belangrijk was.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 6, + "speaker": "S1", + "text": "Dat klinkt vriendelijker dan één perfecte roeping moeten vinden. Stel dat iemand een middag een buur helpt om boodschappen te dragen. Er gebeurt niets spectaculairs. Maar iemand komt thuis en voelt zich minder alleen.", + "seed": 202631266, + "winner": 3, + "candidates": [ + { + "reward": 0.44703470550787944, + "genuineness": 3.6914619067683816, + "ecapa_cosine": 0.2788257598876953, + "ranking_skipped": false + }, + { + "reward": 0.43461406875091296, + "genuineness": 3.8169827042147517, + "ecapa_cosine": 0.23306435346603394, + "ranking_skipped": false + }, + { + "reward": 0.44654390526314575, + "genuineness": 3.7291181460022926, + "ecapa_cosine": 0.2715681195259094, + "ranking_skipped": false + }, + { + "reward": 0.48333347293858725, + "genuineness": 3.6538056675344706, + "ecapa_cosine": 0.35769933462142944, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.4411764705882353, + "transcript": "Dat klinkt vriendelijker dan één perfecte roeping moeten vinden. Stel dat iemand middag een buur helpt om boodschappen te dragen. Er gebeurt niets spectaculairs. Maar iemand komt thuis en voelt zich minder alleen. En daar en daar roos halt bij op een. Is litter in sine zin.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 4, + "index": 7, + "speaker": "S2", + "text": "Dat past bij een van Frankls wegen: wat we geven door ons handelen. Een andere is wat we ontvangen door ervaringen, schoonheid of liefde. Betekenis vraagt niet altijd dat we iets produceren.", + "seed": 202631266, + "winner": 3, + "candidates": [ + { + "reward": 0.5014276325237006, + "genuineness": 3.7918785447254777, + "ecapa_cosine": 0.3708755075931549, + "ranking_skipped": false + }, + { + "reward": 0.5136544360624005, + "genuineness": 4.143336777575314, + "ecapa_cosine": 0.3367527425289154, + "ranking_skipped": false + }, + { + "reward": 0.5301834502412628, + "genuineness": 4.11823261808604, + "ecapa_cosine": 0.3739947974681854, + "ranking_skipped": false + }, + { + "reward": 0.5367559304771323, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.38923177123069763, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.3125, + "transcript": "Dat past bij een van Frankelswegen, wat we geheven door ons handelen. Een andere is wat we ontvangen door ervaringen, schoonheid of liefde. Betekenis vraagt niet altijd dat we iets produceren. Van het altijd dat we iets produceren.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 4, + "index": 8, + "speaker": "S1", + "text": "Naar een lied luisteren zonder op mijn telefoon te kijken. De dwaze moed zien van een bloem die tussen de stoeptegels groeit. Echt naar iemand luisteren, in plaats van ondertussen mijn slimme antwoord te bedenken.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": 0.5315761824216072, + "genuineness": 3.710290026385337, + "ecapa_cosine": 0.4447706937789917, + "ranking_skipped": false + }, + { + "reward": 0.502963598119095, + "genuineness": 3.8671910231932998, + "ecapa_cosine": 0.36139535903930664, + "ranking_skipped": false + }, + { + "reward": 0.5008483309453975, + "genuineness": 3.7416702257469296, + "ecapa_cosine": 0.3780849575996399, + "ranking_skipped": false + }, + { + "reward": 0.5003195151997109, + "genuineness": 3.6538056675344706, + "ecapa_cosine": 0.39167141914367676, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.6285714285714286, + "transcript": "Naar niet luisteren zonder op mijn telefoon te kijken. Het is een moed zien van een bloem die tussen de stoeptegels groeit. Echt naar iemand luisteren in plaats van ondertussen mijn slimme antwoord te bedenken. Nept die intanne handel zal ik hamer wat hier? Neem aan de tu tijd het maare palma.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 4, + "index": 9, + "speaker": "S2", + "text": "Mijn slimme antwoorden staan op een wachtlijst. Maar ja. Aandacht kan een vorm van vrijgevigheid zijn. Je hoeft niet iemands hele leven op te lossen om ruimte te maken in het jouwe.", + "seed": 202631328, + "winner": 1, + "candidates": [ + { + "reward": 0.5679356176018093, + "genuineness": 4.199821136426181, + "ecapa_cosine": 0.43590104579925537, + "ranking_skipped": false + }, + { + "reward": 0.5718135679295908, + "genuineness": 4.193545096553862, + "ecapa_cosine": 0.44470295310020447, + "ranking_skipped": false + }, + { + "reward": 0.49921343025440973, + "genuineness": 4.005263900384307, + "ecapa_cosine": 0.33088287711143494, + "ranking_skipped": false + }, + { + "reward": 0.42416313919238746, + "genuineness": 4.093128458596766, + "ecapa_cosine": 0.1661382019519806, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.1875, + "transcript": "Mijn slimme antwoorden staan op een wachtlijst. Maar ja, aandacht kan een vorm van vrijgevigheid zijn. Je hoeft niet iemands hele leven op te lossen om ruimte te maken in het jouwe. En de ruite lood er unf.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 4, + "index": 10, + "speaker": "S1", + "text": "Nu het moeilijke deel. Hoe zit het met verdriet? Als degene die je wilt bellen er niet meer is, en een gewoon geluid in de keuken je die persoon ineens verschrikkelijk laat missen?", + "seed": 202631390, + "winner": 3, + "candidates": [ + { + "reward": 0.44162582617718726, + "genuineness": 3.622425468172878, + "ecapa_cosine": 0.2795140743255615, + "ranking_skipped": false + }, + { + "reward": 0.44693318180118996, + "genuineness": 3.8044306244701147, + "ecapa_cosine": 0.25979459285736084, + "ranking_skipped": false + }, + { + "reward": 0.4571884606266394, + "genuineness": 3.8483629035763443, + "ecapa_cosine": 0.2729831039905548, + "ranking_skipped": false + }, + { + "reward": 0.5180363365604232, + "genuineness": 4.11823261808604, + "ecapa_cosine": 0.34970057010650635, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.06060606060606061, + "transcript": "Nu het moeilijke deel. Hoe zit het met verdriet als degene die je wilt bellen er niet meer is, en een gewoon geluid in de keukens die persoon ineens verschrikkelijk laat missen?", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 11, + "speaker": "S2", + "text": "Dan zou ik niet meteen met een les aankomen. Frankls derde weg gaat over onze houding tegenover onvermijdelijk lijden. Het is een mogelijkheid, geen verplichting om dankbaar te zijn voor pijn.", + "seed": 202631390, + "winner": 3, + "candidates": [ + { + "reward": 0.444661011104472, + "genuineness": 3.773050425108522, + "ecapa_cosine": 0.26048028469085693, + "ranking_skipped": false + }, + { + "reward": 0.4742908305488527, + "genuineness": 3.7542223054915667, + "ecapa_cosine": 0.3228779435157776, + "ranking_skipped": false + }, + { + "reward": 0.47946511073193204, + "genuineness": 3.8358108238317072, + "ecapa_cosine": 0.31962841749191284, + "ranking_skipped": false + }, + { + "reward": 0.5330996402384092, + "genuineness": 3.6914619067683816, + "ecapa_cosine": 0.4509556293487549, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.06451612903225806, + "transcript": "Dan zou ik niet meteen met een les aankomen. Frank als derde weg gaat over onze houding tegenover onvermijdelijk lijden. Het is een mogelijkheid geen verplichting om dankbaar te zijn voor pijn.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 12, + "speaker": "S1", + "text": "En lijden dat we kunnen veranderen, moeten we veranderen. Vraag om hulp, verlaat de schadelijke situatie, deel de last. We zijn de wereld geen mooie verklaring schuldig voor alles wat pijn doet.", + "seed": 202631452, + "winner": 0, + "candidates": [ + { + "reward": 0.5020542743926246, + "genuineness": 3.879743102937937, + "ecapa_cosine": 0.35748469829559326, + "ranking_skipped": false + }, + { + "reward": 0.48611786239780486, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.3025997281074524, + "ranking_skipped": false + }, + { + "reward": 0.500259763483579, + "genuineness": 3.8169827042147517, + "ecapa_cosine": 0.36435574293136597, + "ranking_skipped": false + }, + { + "reward": 0.46390221000183374, + "genuineness": 3.773050425108522, + "ecapa_cosine": 0.29896268248558044, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03125, + "transcript": "En leiden dat we kunnen veranderen? Moeten we veranderen? Vraag om hulp, verlaat de schadelijke situatie, deel de last. We zijn de wereld geen mooie verklaring schuldig voor alles wat pijn doet.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 4, + "index": 13, + "speaker": "S2", + "text": "Precies. Soms is de betekenisvolle daad iemand naast je laten zitten. Of zeggen: vandaag is moeilijk. Een leven verliest zijn waarde niet doordat degene die het leeft uitgeput is.", + "seed": 202631452, + "winner": 3, + "candidates": [ + { + "reward": 0.5099534116840612, + "genuineness": 4.042920139618218, + "ecapa_cosine": 0.3460868000984192, + "ranking_skipped": false + }, + { + "reward": 0.4608419557334855, + "genuineness": 3.9236753820441663, + "ecapa_cosine": 0.26773801445961, + "ranking_skipped": false + }, + { + "reward": 0.47747442157318193, + "genuineness": 3.879743102937937, + "ecapa_cosine": 0.30832499265670776, + "ranking_skipped": false + }, + { + "reward": 0.5516398695375149, + "genuineness": 4.312789854127914, + "ecapa_cosine": 0.38448143005371094, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Precies, soms is de betekenisvolle daad iemand naast je laten zitten. Of zeggen, vandaag is moeilijk, een leven verliest zijn waarde niet doordat degene die het leeft uitgeput is.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 14, + "speaker": "S1", + "text": "Stel je een vader voor die zijn kind leert een fiets te repareren. Jaren later is het kind de uitleg vergeten. Maar zijn geduld blijft bij. Het gevoel dat fouten maken mocht.", + "seed": 202631514, + "winner": 0, + "candidates": [ + { + "reward": 0.5286605441942811, + "genuineness": 3.980159740895033, + "ecapa_cosine": 0.3939611315727234, + "ranking_skipped": false + }, + { + "reward": 0.4992938316427171, + "genuineness": 3.7542223054915667, + "ecapa_cosine": 0.37288394570350647, + "ranking_skipped": false + }, + { + "reward": 0.4845953464197616, + "genuineness": 4.005263900384307, + "ecapa_cosine": 0.30164670944213867, + "ranking_skipped": false + }, + { + "reward": 0.46942173088124645, + "genuineness": 3.685185866896063, + "ecapa_cosine": 0.3246458172798157, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03125, + "transcript": "Stel je je vader voor die zijn kind leert een fiets te repareren. Jaren later is het kind de uitleg vergeten. Maar zijn geduld blijft bij, het gevoel dat fouten maken mocht.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 15, + "speaker": "S2", + "text": "Dat is een mooie gedachte. Wat van ons blijft, is misschien een manier om mensen te behandelen. Een beetje meer geduld dat door de wereld reist, lang nadat de fiets is verroest.", + "seed": 202631514, + "winner": 2, + "candidates": [ + { + "reward": 0.4504329269208635, + "genuineness": 4.1370607377029955, + "ecapa_cosine": 0.21135573089122772, + "ranking_skipped": false + }, + { + "reward": 0.5149039317232866, + "genuineness": 3.955055581405759, + "ecapa_cosine": 0.3706319332122803, + "ranking_skipped": false + }, + { + "reward": 0.5326449865630518, + "genuineness": 4.193545096553862, + "ecapa_cosine": 0.36636579036712646, + "ranking_skipped": false + }, + { + "reward": 0.5072406448501472, + "genuineness": 3.9362274617888033, + "ecapa_cosine": 0.35844337940216064, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Dat is een mooie gedachte. Wat van ons blijft, is misschien een manier om mensen te behandelen, een beetje meer geduld dat door de wereld reist, lang nadat de fiets is verroest?", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 16, + "speaker": "S1", + "text": "Misschien blijft het een mysterie. We kunnen anders denken over het universum en toch een moment herkennen dat om zorg vraagt. We hoeven niet overal zeker van te zijn om ergens van te houden.", + "seed": 202631576, + "winner": 0, + "candidates": [ + { + "reward": 0.5144090144506965, + "genuineness": 3.8232587440870702, + "ecapa_cosine": 0.39160823822021484, + "ranking_skipped": false + }, + { + "reward": 0.5019080073883135, + "genuineness": 3.7291181460022926, + "ecapa_cosine": 0.3822963237762451, + "ranking_skipped": false + }, + { + "reward": 0.42147259049428004, + "genuineness": 3.6914619067683816, + "ecapa_cosine": 0.22770152986049652, + "ranking_skipped": false + }, + { + "reward": 0.4573956555686891, + "genuineness": 3.7542223054915667, + "ecapa_cosine": 0.28908759355545044, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.11764705882352941, + "transcript": "Misschien blijft het een mysterie. We kunnen anders denken over het universum en toch een moment herkennen dat om zorg vraagt. We hoeven niet overal zeker van te zijn om ergens van te houden. We hoeven niet overal.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 4, + "index": 17, + "speaker": "S2", + "text": "En zorg kan klein zijn. Een telefoontje dat je blijft uitstellen. Iets met aandacht maken. Je excuses aanbieden zonder uitvluchten. Dit zijn onze voorbeelden, geen lijstje dat Frankl ons heeft nagelaten.", + "seed": 202631576, + "winner": 2, + "candidates": [ + { + "reward": 0.49345560527096194, + "genuineness": 4.080576378852129, + "ecapa_cosine": 0.30681514739990234, + "ranking_skipped": false + }, + { + "reward": 0.44917453507271904, + "genuineness": 4.068024299107492, + "ecapa_cosine": 0.22034502029418945, + "ranking_skipped": false + }, + { + "reward": 0.5010309411833684, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.34706997871398926, + "ranking_skipped": false + }, + { + "reward": 0.48006030071216327, + "genuineness": 3.8169827042147517, + "ecapa_cosine": 0.32395681738853455, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.1935483870967742, + "transcript": "Zorg kan klein zijn. Een telefoontje dat je blijft uitstellen, iets met aandacht maken. Je excuses aanbieden zonder uitvluchten. Dit zijn onze voorbeelden. Geen lijstje dat Frankel ons heeft nagelaten. Decena is en der.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 4, + "index": 18, + "speaker": "S1", + "text": "Vraag je vandaag misschien af: wie of wat verdient mijn aandacht? Niet voor altijd. Alleen vandaag. En als het antwoord rust is, of iemand toelaten om te helpen, kan dat een eerlijk begin zijn.", + "seed": 202631638, + "winner": 2, + "candidates": [ + { + "reward": 0.47100637286591035, + "genuineness": 3.6663577472791076, + "ecapa_cosine": 0.33095312118530273, + "ranking_skipped": false + }, + { + "reward": 0.49354001437313855, + "genuineness": 3.8671910231932998, + "ecapa_cosine": 0.3425481915473938, + "ranking_skipped": false + }, + { + "reward": 0.5361240102599065, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.41725611686706543, + "ranking_skipped": false + }, + { + "reward": 0.4662904891495903, + "genuineness": 3.879743102937937, + "ecapa_cosine": 0.28595712780952454, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.029411764705882353, + "transcript": "Vraag je vandaag misschien af wie of wat verdient mijn aandacht? Niet voor altijd, alleen vandaag. En als het antwoord rust is of iemand toelaat om te helpen, kan dat een eerlijk begin zijn.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 4, + "index": 19, + "speaker": "S2", + "text": "We hebben de zin van het leven niet opgelost. Maar we hebben iemand om de vraag mee te delen. En nog twee koekjes. Laten we voor allebei de tijd nemen.", + "seed": 202631638, + "winner": 0, + "candidates": [ + { + "reward": 0.5250049147289246, + "genuineness": 4.093128458596766, + "ecapa_cosine": 0.36782175302505493, + "ranking_skipped": false + }, + { + "reward": 0.40753988017483306, + "genuineness": 4.250029455404729, + "ecapa_cosine": 0.1067415177822113, + "ranking_skipped": false + }, + { + "reward": 0.5241931692386668, + "genuineness": 4.080576378852129, + "ecapa_cosine": 0.3682902753353119, + "ranking_skipped": false + }, + { + "reward": 0.5208784268082429, + "genuineness": 4.293961734510958, + "ecapa_cosine": 0.3260965645313263, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.16666666666666666, + "transcript": "We hebben de zin van het leven niet opgelost, maar we hebben iemand om de vraag mee te delen. En nog twee koekjes. Laten we voor allebei de tijd nemen. Voor allebei de tijd nemen.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 4, + "index": 0, + "speaker": "S1", + "text": "Bienvenue dans Petites questions, grandes émotions. Aujourd’hui, le sens de la vie. Idris, j’espérais une réponse claire. De préférence quelque chose dont je puisse me souvenir en cherchant mes clés.", + "seed": 202641080, + "winner": 2, + "candidates": [ + { + "reward": 0.5175856909093757, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.3508912920951843, + "ranking_skipped": false + }, + { + "reward": 0.5344430475961417, + "genuineness": 3.7918785447254777, + "ecapa_cosine": 0.4369063377380371, + "ranking_skipped": false + }, + { + "reward": 0.5851095132529736, + "genuineness": 3.8295347839593887, + "ecapa_cosine": 0.5319632291793823, + "ranking_skipped": false + }, + { + "reward": 0.5598269765420507, + "genuineness": 3.8169827042147517, + "ecapa_cosine": 0.4834901690483093, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.75, + "transcript": "Bienvenue dans Petit Question, Grand Emotion. The sense of la vie Idris, j'espère une responsabilité. The preference dont I couldn't have cherched my clean.", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 1, + "speaker": "S2", + "text": "J’ai apporté des biscuits. Ce n’est pas une philosophie complète, mais ils rendent l’incertitude bien plus accueillante. On pourrait commencer plus modestement que par expliquer tout l’univers avant le thé.", + "seed": 202641080, + "winner": 3, + "candidates": [ + { + "reward": 0.4754073691243927, + "genuineness": 3.7793264649808407, + "ecapa_cosine": 0.3209269940853119, + "ranking_skipped": false + }, + { + "reward": 0.41857297128687304, + "genuineness": 4.080576378852129, + "ecapa_cosine": 0.15704987943172455, + "ranking_skipped": false + }, + { + "reward": 0.4908149936236441, + "genuineness": 3.904847262427211, + "ecapa_cosine": 0.3308221101760864, + "ranking_skipped": false + }, + { + "reward": 0.523900061302508, + "genuineness": 4.193545096553862, + "ecapa_cosine": 0.3488759398460388, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.029411764705882353, + "transcript": "J'ai apporté des biscuits. Ce n'est pas une philosophie complète, mais ils rendent l'incertitude bien plus accueillante. On pourrait commencer plus modestement que par expliquer tout l'univers avant le T.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 2, + "speaker": "S1", + "text": "D’accord. Pourquoi un après-midi ordinaire semble-t-il parfois si précieux, alors qu’une journée pleine de réussites peut laisser un étrange vide ? Quelle différence entre être occupé et se sentir vivant ?", + "seed": 202641142, + "winner": 2, + "candidates": [ + { + "reward": 0.48092054668813944, + "genuineness": 3.980159740895033, + "ecapa_cosine": 0.29848113656044006, + "ranking_skipped": false + }, + { + "reward": 0.4960958147421479, + "genuineness": 3.980159740895033, + "ecapa_cosine": 0.32883167266845703, + "ranking_skipped": false + }, + { + "reward": 0.5396815232234076, + "genuineness": 4.0743003389798105, + "ecapa_cosine": 0.40031298995018005, + "ranking_skipped": false + }, + { + "reward": 0.43273956840857863, + "genuineness": 3.7542223054915667, + "ecapa_cosine": 0.2397754192352295, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.2647058823529412, + "transcript": "D'accord. Pourquoi un après-midi ordinaire semble-t-il parfois si précieux, alors qu'une journée pleine de réussite peut laisser un étrange vide? Quelle différence en entre être occupé et se sentir vivant? Elle nous sur de la nuit, pas.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 4, + "index": 3, + "speaker": "S2", + "text": "Viktor Frankl, le psychiatre autrichien, plaçait la recherche de sens au cœur de son approche. Sa question dépasse le plaisir ou la réussite : qu’est-ce qui compte assez pour nous appeler à agir ?", + "seed": 202641142, + "winner": 2, + "candidates": [ + { + "reward": 0.42462647923578817, + "genuineness": 4.180993016809225, + "ecapa_cosine": 0.1524207890033722, + "ranking_skipped": false + }, + { + "reward": 0.48884638228143257, + "genuineness": 3.8546389434486628, + "ecapa_cosine": 0.33525294065475464, + "ranking_skipped": false + }, + { + "reward": 0.5395139816682786, + "genuineness": 4.093128458596766, + "ecapa_cosine": 0.3968398869037628, + "ranking_skipped": false + }, + { + "reward": 0.46757062171430636, + "genuineness": 4.0868524187244475, + "ecapa_cosine": 0.25399917364120483, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.6470588235294118, + "transcript": "Victor Frankel, the psychiatre autrichien, plaçait la recherche de sens au cœur de son approche.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 4, + "index": 4, + "speaker": "S1", + "text": "Donc, on ne cherche pas une phrase magnifique qui expliquerait la vie de tout le monde ? Pas de mode d’emploi universel, avec une page manquante et un minuscule tournevis impossible à utiliser ?", + "seed": 202641204, + "winner": 1, + "candidates": [ + { + "reward": 0.43322553229518235, + "genuineness": 4.168440937064588, + "ecapa_cosine": 0.17171090841293335, + "ranking_skipped": false + }, + { + "reward": 0.5864565085697298, + "genuineness": 4.237477375660092, + "ecapa_cosine": 0.4666667878627777, + "ranking_skipped": false + }, + { + "reward": 0.5365574836420517, + "genuineness": 4.005263900384307, + "ecapa_cosine": 0.40557098388671875, + "ranking_skipped": false + }, + { + "reward": 0.4976897401502356, + "genuineness": 3.9613316212780774, + "ecapa_cosine": 0.3351575434207916, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.24242424242424243, + "transcript": "Donc on ne cherche pas une phrase magnifique qui expliquerait la vie de tout le monde? Pas de mode d'emploi universel. Avec une page mentie.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 5, + "speaker": "S2", + "text": "Heureusement, aucun montage à prévoir. Pour Frankl, le sens se découvre dans des situations précises, par des personnes précises. Ce qui compte pour toi ce matin peut différer de ce qui comptait il y a dix ans.", + "seed": 202641204, + "winner": 0, + "candidates": [ + { + "reward": 0.5185878387031455, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.352895587682724, + "ranking_skipped": false + }, + { + "reward": 0.5174170470951747, + "genuineness": 3.967607661150396, + "ecapa_cosine": 0.3735661506652832, + "ranking_skipped": false + }, + { + "reward": 0.467290756603082, + "genuineness": 4.030368059873581, + "ecapa_cosine": 0.2628535032272339, + "ranking_skipped": false + }, + { + "reward": 0.5125132502677541, + "genuineness": 4.155888857319951, + "ecapa_cosine": 0.3323783576488495, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.05405405405405406, + "transcript": "Heureusement, aucun montage à prévoir. Pour Franck, le sens se découvre dans des situations précises, by des personnes précises. Ce qui compte pour toi ce matin peut différer de ce qui comptait il y a dix ans.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 6, + "speaker": "S1", + "text": "C’est plus doux que de devoir trouver une vocation parfaite. Imaginons quelqu’un qui aide un voisin à porter ses courses. Rien de spectaculaire ne se passe. Mais quelqu’un rentre chez lui en se sentant moins seul.", + "seed": 202641266, + "winner": 2, + "candidates": [ + { + "reward": 0.49875215770831954, + "genuineness": 3.9864357807673514, + "ecapa_cosine": 0.3330983519554138, + "ranking_skipped": false + }, + { + "reward": 0.5001750487135723, + "genuineness": 3.773050425108522, + "ecapa_cosine": 0.3715083599090576, + "ranking_skipped": false + }, + { + "reward": 0.5835959172109142, + "genuineness": 3.9989878605119884, + "ecapa_cosine": 0.5006938576698303, + "ranking_skipped": false + }, + { + "reward": 0.4638868540059775, + "genuineness": 3.7918785447254777, + "ecapa_cosine": 0.29579395055770874, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.9230769230769231, + "transcript": "It's pretty doux to a vocation perfect. Imagine who aid a voisin to portake. Right passes, but", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 7, + "speaker": "S2", + "text": "Cela rejoint une des voies de Frankl : ce que nous apportons par nos actes. Une autre est ce que nous recevons à travers l’expérience, la beauté ou l’amour. Le sens n’exige pas toujours de produire quelque chose.", + "seed": 202641266, + "winner": 0, + "candidates": [ + { + "reward": 0.5615307285139959, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.46806955337524414, + "ranking_skipped": false + }, + { + "reward": 0.5563574461266398, + "genuineness": 4.281409654766321, + "ecapa_cosine": 0.3991466164588928, + "ranking_skipped": false + }, + { + "reward": 0.5225201271629583, + "genuineness": 4.042920139618218, + "ecapa_cosine": 0.3712202310562134, + "ranking_skipped": false + }, + { + "reward": 0.500762243444721, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.34653258323669434, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.05, + "transcript": "Cela rejoint une des voix de Franck, ce que nous apportons par nos actes. Une autre est ce que nous recevons à travers l'expérience, la beauté ou l'amour. Le sens n'exige pas toujours de produire quelque chose.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 8, + "speaker": "S1", + "text": "Écouter une chanson sans regarder mon téléphone. Remarquer le courage un peu fou d’une fleur qui pousse entre les pavés. Vraiment écouter quelqu’un, au lieu de préparer en silence ma brillante réponse.", + "seed": 202641328, + "winner": 3, + "candidates": [ + { + "reward": 0.5229097227565944, + "genuineness": 4.055472219362855, + "ecapa_cosine": 0.369907408952713, + "ranking_skipped": false + }, + { + "reward": 0.5277425463233765, + "genuineness": 3.9487795415334404, + "ecapa_cosine": 0.39735516905784607, + "ranking_skipped": false + }, + { + "reward": 0.49377981945872307, + "genuineness": 3.8295347839593887, + "ecapa_cosine": 0.34930384159088135, + "ranking_skipped": false + }, + { + "reward": 0.5405691941656794, + "genuineness": 4.1370607377029955, + "ecapa_cosine": 0.3916282653808594, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.058823529411764705, + "transcript": "Écouter une chanson sans regarder mon téléphone. Remarquez le courage un peu fou d'une fleur qui pousse entre les pavés. Vraiment écouter quelqu'un au lieu de préparer en silence my brillante réponse.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 9, + "speaker": "S2", + "text": "Mes brillantes réponses ont une liste d’attente. Mais oui. L’attention peut être une forme de générosité. Pas besoin de réparer toute la vie de quelqu’un pour lui faire une place dans la nôtre.", + "seed": 202641328, + "winner": 1, + "candidates": [ + { + "reward": 0.5275465300461899, + "genuineness": 3.892295182682574, + "ecapa_cosine": 0.4063771963119507, + "ranking_skipped": false + }, + { + "reward": 0.578199430485256, + "genuineness": 4.0743003389798105, + "ecapa_cosine": 0.47734880447387695, + "ranking_skipped": false + }, + { + "reward": 0.5567196630096685, + "genuineness": 4.042920139618218, + "ecapa_cosine": 0.4396193027496338, + "ranking_skipped": false + }, + { + "reward": 0.5445964940978836, + "genuineness": 4.11823261808604, + "ecapa_cosine": 0.402820885181427, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.027777777777777776, + "transcript": "Mes brillantes réponses ont une liste d'attentes. Mais oui, l'attention peut être une forme de générosité. Pas besoin de réparer toute la vie de quelqu'un pour lui faire une place dans la nôtre.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 10, + "speaker": "S1", + "text": "Voici la partie difficile. Et le deuil ? Quand la personne qu’on voudrait appeler n’est plus là, et qu’un simple bruit dans la cuisine nous la fait soudain terriblement regretter ?", + "seed": 202641390, + "winner": 2, + "candidates": [ + { + "reward": 0.4633073303072403, + "genuineness": 3.6663577472791076, + "ecapa_cosine": 0.31555503606796265, + "ranking_skipped": false + }, + { + "reward": 0.4023278801081081, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.12037567049264908, + "ranking_skipped": false + }, + { + "reward": 0.536662368181472, + "genuineness": 3.99271182063967, + "ecapa_cosine": 0.4078727662563324, + "ranking_skipped": false + }, + { + "reward": 0.4316641882372399, + "genuineness": 3.6538056675344706, + "ecapa_cosine": 0.25436076521873474, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.1875, + "transcript": "Voici la partie difficile. Et le deuil ? Quand la personne qu'on voudrait appeler n'est plus là et qu'un simple bruit dans la cuisine nous la fait soudain terriblement regretter. Nous la fait soudain terriblement regretter.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 4, + "index": 11, + "speaker": "S2", + "text": "Je ne me précipiterais pas avec une leçon. La troisième voie de Frankl concerne notre attitude face à une souffrance inévitable. C’est une possibilité, pas une obligation d’éprouver de la gratitude pour la douleur.", + "seed": 202641390, + "winner": 1, + "candidates": [ + { + "reward": 0.4696474380713577, + "genuineness": 3.722842106129974, + "ecapa_cosine": 0.3188211917877197, + "ranking_skipped": false + }, + { + "reward": 0.5195847688203987, + "genuineness": 3.6255634881090373, + "ecapa_cosine": 0.4349089562892914, + "ranking_skipped": false + }, + { + "reward": 0.44407269766088575, + "genuineness": 3.810706664342433, + "ecapa_cosine": 0.25302761793136597, + "ranking_skipped": false + }, + { + "reward": 0.495494411404555, + "genuineness": 3.8420868637040257, + "ecapa_cosine": 0.35064101219177246, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.05555555555555555, + "transcript": "Je ne me précipiterai pas avec une leçon. La troisième voie de Frankel concerne notre attitude face à une souffrance inévitable. C'est une possibilité, pas une obligation d'éprouver de la gratitude pour la douleur.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 12, + "speaker": "S1", + "text": "Et la souffrance qu’on peut changer doit être changée. Demander de l’aide, quitter une situation nocive, partager le fardeau. Nous ne devons pas au monde une belle explication pour tout ce qui nous fait mal.", + "seed": 202641452, + "winner": 3, + "candidates": [ + { + "reward": 0.5225661698107917, + "genuineness": 3.879743102937937, + "ecapa_cosine": 0.3985084891319275, + "ranking_skipped": false + }, + { + "reward": 0.5567621587542817, + "genuineness": 4.036644099745899, + "ecapa_cosine": 0.4407503008842468, + "ranking_skipped": false + }, + { + "reward": 0.5378888191189617, + "genuineness": 3.942503501661122, + "ecapa_cosine": 0.4186937212944031, + "ranking_skipped": false + }, + { + "reward": 0.5822894136266161, + "genuineness": 3.8420868637040257, + "ecapa_cosine": 0.5242310166358948, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.02702702702702703, + "transcript": "And la souffrance qu'on peut changer doit être changée. Demander de l'aide, quitter une situation nocive. Partager le fardeau. Nous ne devons pas au monde une belle explication pour tout ce qui nous fait mal.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 13, + "speaker": "S2", + "text": "Exactement. Parfois, ce qui a du sens, c’est laisser quelqu’un s’asseoir près de nous. Ou dire : aujourd’hui, c’est difficile. Une vie ne perd pas sa valeur parce que la personne qui la vit est épuisée.", + "seed": 202641452, + "winner": 0, + "candidates": [ + { + "reward": 0.4983944135407607, + "genuineness": 4.231201335787773, + "ecapa_cosine": 0.29158860445022583, + "ranking_skipped": false + }, + { + "reward": 0.4513880943413824, + "genuineness": 4.24375341553241, + "ecapa_cosine": 0.1954839527606964, + "ranking_skipped": false + }, + { + "reward": 0.4886768090073019, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.30771762132644653, + "ranking_skipped": false + }, + { + "reward": 0.4171121719603737, + "genuineness": 3.879743102937937, + "ecapa_cosine": 0.1876004934310913, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.225, + "transcript": "Exactement. Parfois, ce qui a du sens, c'est laisser quelqu'un s'asseoir près de nous ou dire Aujourd'hui, c'est difficile, une vie ne perd pas sa valeur parce que la personne qui la vit est épuisée. Ou que l'homme n'est qu'une ressemble.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 4, + "index": 14, + "speaker": "S1", + "text": "Imagine un père qui apprend à son enfant à réparer un vélo. Des années plus tard, l’enfant a oublié les instructions. Mais il se souvient de sa patience. Du sentiment qu’il avait le droit de se tromper.", + "seed": 202641514, + "winner": 0, + "candidates": [ + { + "reward": 0.5570599499624223, + "genuineness": 4.093128458596766, + "ecapa_cosine": 0.43193182349205017, + "ranking_skipped": false + }, + { + "reward": 0.4798574020387605, + "genuineness": 3.9236753820441663, + "ecapa_cosine": 0.3057689070701599, + "ranking_skipped": false + }, + { + "reward": 0.5508872361388057, + "genuineness": 3.942503501661122, + "ecapa_cosine": 0.4446905553340912, + "ranking_skipped": false + }, + { + "reward": 0.5260213081880163, + "genuineness": 3.8169827042147517, + "ecapa_cosine": 0.4158788323402405, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.7692307692307693, + "transcript": "Imagine a pair who apprends at his enfant to reparer un vélo. There are time, the enfant has obliged the instructions. But he seems to sa patience, the sentiment that he had the right to tromp.", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 15, + "speaker": "S2", + "text": "C’est une belle pensée. Ce qui nous survit, c’est peut-être une façon de traiter les autres. Un peu plus de patience qui traverse le monde, longtemps après que le vélo a rouillé.", + "seed": 202641514, + "winner": 2, + "candidates": [ + { + "reward": 0.49193119529324275, + "genuineness": 4.419482531957328, + "ecapa_cosine": 0.2472819685935974, + "ranking_skipped": false + }, + { + "reward": 0.5279046868284543, + "genuineness": 4.030368059873581, + "ecapa_cosine": 0.3840813636779785, + "ranking_skipped": false + }, + { + "reward": 0.5553225746843964, + "genuineness": 4.319065894000232, + "ecapa_cosine": 0.3908008337020874, + "ranking_skipped": false + }, + { + "reward": 0.5475678201764822, + "genuineness": 4.130784697830677, + "ecapa_cosine": 0.40667152404785156, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "C'est une belle pensée. Ce qui nous survit, c'est peut-être une façon de traiter les autres. Un peu plus de patience qui traverse le monde, longtemps après que le vélo a rouillé.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 16, + "speaker": "S1", + "text": "Peut-être que le mystère demeure. On peut être en désaccord sur l’univers et reconnaître un moment qui demande de l’attention. Pas besoin d’être sûr de tout avant de pouvoir aimer quelque chose.", + "seed": 202641576, + "winner": 0, + "candidates": [ + { + "reward": 0.5458223349414766, + "genuineness": 3.7542223054915667, + "ecapa_cosine": 0.4659409523010254, + "ranking_skipped": false + }, + { + "reward": 0.48828858432049554, + "genuineness": 4.005263900384307, + "ecapa_cosine": 0.30903318524360657, + "ranking_skipped": false + }, + { + "reward": 0.37928632002634305, + "genuineness": 3.8420868637040257, + "ecapa_cosine": 0.11822482943534851, + "ranking_skipped": false + }, + { + "reward": 0.49553661386016756, + "genuineness": 3.8483629035763443, + "ecapa_cosine": 0.3496794104576111, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Peut-être que le mystère demeure, on peut être en désaccord sur l'univers et reconnaître un moment qui demande de l'attention. Pas besoin d'être sûr de tout avant de pouvoir aimer quelque chose.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 17, + "speaker": "S2", + "text": "Et cette attention peut être modeste. Un appel qu’on repousse. Une chose faite avec soin. Des excuses sans prétexte. Ce sont nos exemples, pas une liste de consignes laissée par Frankl.", + "seed": 202641576, + "winner": 2, + "candidates": [ + { + "reward": 0.5087020656404395, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.333124041557312, + "ranking_skipped": false + }, + { + "reward": 0.5055479335132986, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.34145987033843994, + "ranking_skipped": false + }, + { + "reward": 0.516061577713117, + "genuineness": 4.24375341553241, + "ecapa_cosine": 0.32483091950416565, + "ranking_skipped": false + }, + { + "reward": 0.4274999703047797, + "genuineness": 3.735394185874611, + "ecapa_cosine": 0.2324342429637909, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0625, + "transcript": "Et cette attention peut être modeste, un appel qu'on repousse, une chose faite avec soin, des excuses sans prétexte. Ce sont nos exemples, pas une liste de consignes laissées par Franco.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 18, + "speaker": "S1", + "text": "Pour aujourd’hui, demandons-nous peut-être : qui ou quoi mérite mon attention ? Pas pour toujours. Juste aujourd’hui. Et si la réponse est le repos, ou accepter de l’aide, cela peut être un début sincère.", + "seed": 202641638, + "winner": 3, + "candidates": [ + { + "reward": 0.4626738443427409, + "genuineness": 3.685185866896063, + "ecapa_cosine": 0.31115004420280457, + "ranking_skipped": false + }, + { + "reward": 0.5225468510761857, + "genuineness": 3.980159740895033, + "ecapa_cosine": 0.3817337453365326, + "ranking_skipped": false + }, + { + "reward": 0.463521835161373, + "genuineness": 3.7918785447254777, + "ecapa_cosine": 0.29506391286849976, + "ranking_skipped": false + }, + { + "reward": 0.5367553698209424, + "genuineness": 3.8044306244701147, + "ecapa_cosine": 0.43943896889686584, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Pour aujourd'hui, demandons-nous peut-être qui ou quoi mérite mon attention. Pas pour toujours, juste aujourd'hui. Et si la réponse est le repos ou accepter de l'aide, cela peut être un début sincère.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 4, + "index": 19, + "speaker": "S2", + "text": "Nous n’avons pas résolu le sens de la vie. Mais nous avons quelqu’un avec qui partager la question. Et encore deux biscuits. Prenons notre temps pour les deux.", + "seed": 202641638, + "winner": 0, + "candidates": [ + { + "reward": 0.5598216205835342, + "genuineness": 4.432034611701965, + "ecapa_cosine": 0.3809708058834076, + "ranking_skipped": false + }, + { + "reward": 0.47667198985194165, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.26906388998031616, + "ranking_skipped": false + }, + { + "reward": 0.4561776079547902, + "genuineness": 4.256305495277047, + "ecapa_cosine": 0.2029709666967392, + "ranking_skipped": false + }, + { + "reward": 0.5436702345808346, + "genuineness": 4.030368059873581, + "ecapa_cosine": 0.41561245918273926, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Nous n'avons pas résolu le sens de la vie, mais nous avons quelqu'un avec qui partager la question. Et encore deux biscuits. Prenons notre temps pour les deux?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 0, + "speaker": "S1", + "text": "Bienvenidos a Pequeñas preguntas, grandes emociones. Hoy, el sentido de la vida. Idris, esperaba una respuesta clara. Preferiblemente algo que pueda recordar mientras busco mis llaves.", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": 0.5727828987874091, + "genuineness": 3.904847262427211, + "ecapa_cosine": 0.49475792050361633, + "ranking_skipped": false + }, + { + "reward": 0.47725020449919003, + "genuineness": 3.8420868637040257, + "ecapa_cosine": 0.3141525983810425, + "ranking_skipped": false + }, + { + "reward": 0.5257511828482773, + "genuineness": 4.0617482592351735, + "ecapa_cosine": 0.37454432249069214, + "ranking_skipped": false + }, + { + "reward": 0.4498992115647222, + "genuineness": 3.760498345363885, + "ecapa_cosine": 0.2730486989021301, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Bienvenidos a Pequeñas Preguntas, Grandes Emociones. Hoy, el sentido de la vida. Idris esperaba una respuesta clara. Preferiblemente algo que pueda recordar mientras busco mis llaves.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 1, + "speaker": "S2", + "text": "He traído galletas. No son una filosofía completa, pero hacen que la incertidumbre resulte mucho más acogedora. Quizá convenga empezar por algo más pequeño que explicar todo el universo antes del té.", + "seed": 202651080, + "winner": 1, + "candidates": [ + { + "reward": 0.5134256762297202, + "genuineness": 3.99271182063967, + "ecapa_cosine": 0.361399382352829, + "ranking_skipped": false + }, + { + "reward": 0.6000255184868972, + "genuineness": 4.231201335787773, + "ecapa_cosine": 0.4948508143424988, + "ranking_skipped": false + }, + { + "reward": 0.4893422650638968, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.30904853343963623, + "ranking_skipped": false + }, + { + "reward": 0.4792039383513232, + "genuineness": 3.955055581405759, + "ecapa_cosine": 0.29923194646835327, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03125, + "transcript": "He traído galletas. No son una filosofía completa, pero hacen que la incertidumbre resulte mucho más acogedora. ¿Qué convenga empezar por algo más pequeño que explicar todo el universo antes del té?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 2, + "speaker": "S1", + "text": "De acuerdo. ¿Por qué una tarde corriente a veces parece tan valiosa, mientras que un día lleno de logros puede dejarnos un extraño vacío? ¿Qué diferencia hay entre estar ocupado y sentirse vivo?", + "seed": 202651142, + "winner": 3, + "candidates": [ + { + "reward": 0.498540048332264, + "genuineness": 3.6538056675344706, + "ecapa_cosine": 0.38811248540878296, + "ranking_skipped": false + }, + { + "reward": 0.4963085039053112, + "genuineness": 3.7165660662576556, + "ecapa_cosine": 0.3731893301010132, + "ranking_skipped": false + }, + { + "reward": 0.42421544164729613, + "genuineness": 3.99271182063967, + "ecapa_cosine": 0.18297891318798065, + "ranking_skipped": false + }, + { + "reward": 0.5087838989372055, + "genuineness": 3.7793264649808407, + "ecapa_cosine": 0.3876800537109375, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "De acuerdo. ¿Por qué una tarde corriente a veces parece tan valiosa, mientras que un día lleno de logros puede dejarnos un extraño vacío? ¿Qué diferencia hay entre estar ocupado y sentirse vivo?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 3, + "speaker": "S2", + "text": "Viktor Frankl, el psiquiatra austriaco, puso la búsqueda de sentido en el centro de su enfoque. Su pregunta va más allá del placer o del éxito: ¿qué importa tanto como para responder a ello?", + "seed": 202651142, + "winner": 1, + "candidates": [ + { + "reward": 0.49081697811683017, + "genuineness": 4.030368059873581, + "ecapa_cosine": 0.3099059462547302, + "ranking_skipped": false + }, + { + "reward": 0.5621217309962958, + "genuineness": 3.7918785447254777, + "ecapa_cosine": 0.49226370453834534, + "ranking_skipped": false + }, + { + "reward": 0.5582598584393661, + "genuineness": 4.231201335787773, + "ecapa_cosine": 0.4113194942474365, + "ranking_skipped": false + }, + { + "reward": 0.5292038168602933, + "genuineness": 3.917399342171848, + "ecapa_cosine": 0.40550774335861206, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.029411764705882353, + "transcript": "Víctor Frankl, el psiquiatra austriaco, puso la búsqueda de sentido en el centro de su enfoque. Su pregunta va más allá del placer o del éxito. ¿Qué importa tanto como para responder a ello?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 4, + "speaker": "S1", + "text": "Entonces, ¿no buscamos una frase magnífica que explique la vida de todo el mundo? ¿No hay un manual universal, con una página perdida y un destornillador diminuto imposible de usar?", + "seed": 202651204, + "winner": 1, + "candidates": [ + { + "reward": 0.47751131335583824, + "genuineness": 4.068024299107492, + "ecapa_cosine": 0.27701857686042786, + "ranking_skipped": false + }, + { + "reward": 0.526377625297755, + "genuineness": 4.055472219362855, + "ecapa_cosine": 0.3768432140350342, + "ranking_skipped": false + }, + { + "reward": 0.5207685756031424, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.37190115451812744, + "ranking_skipped": false + }, + { + "reward": 0.49422137594471377, + "genuineness": 4.080576378852129, + "ecapa_cosine": 0.308346688747406, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Entonces, ¿no buscamos una frase magnífica que explique la vida de todo el mundo? No hay un manual universal con una página perdida y un destornillador diminuto imposible de usar.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 5, + "speaker": "S2", + "text": "Por suerte, no hay que montar nada. Para Frankl, el sentido se descubre en situaciones concretas, por personas concretas. Lo que te importa esta mañana puede ser muy distinto de lo que importaba hace diez años.", + "seed": 202651204, + "winner": 3, + "candidates": [ + { + "reward": 0.5215480194116633, + "genuineness": 4.080576378852129, + "ecapa_cosine": 0.36299997568130493, + "ranking_skipped": false + }, + { + "reward": 0.5024368615510564, + "genuineness": 4.155888857319951, + "ecapa_cosine": 0.3122255802154541, + "ranking_skipped": false + }, + { + "reward": 0.5419631869299337, + "genuineness": 4.187269056681544, + "ecapa_cosine": 0.38604819774627686, + "ranking_skipped": false + }, + { + "reward": 0.5486381870384018, + "genuineness": 3.7793264649808407, + "ecapa_cosine": 0.4673886299133301, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.05555555555555555, + "transcript": "Por suerte, no hay que montar nada. Para Frankel, el sentido se descubre en situaciones concretas, por personas concretas. Lo que te importa esta mañana puede ser muy distinto de lo que importaba hace 10 años.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 6, + "speaker": "S1", + "text": "Suena más amable que tener que encontrar una vocación perfecta. Imagina que alguien pasa la tarde ayudando a un vecino a llevar la compra. No sucede nada espectacular. Pero alguien llega a casa sintiéndose menos solo.", + "seed": 202651266, + "winner": 1, + "candidates": [ + { + "reward": 0.55047691706568, + "genuineness": 3.980159740895033, + "ecapa_cosine": 0.43759387731552124, + "ranking_skipped": false + }, + { + "reward": 0.5543699193901073, + "genuineness": 3.7416702257469296, + "ecapa_cosine": 0.48512813448905945, + "ranking_skipped": false + }, + { + "reward": 0.5388374632457271, + "genuineness": 3.9989878605119884, + "ecapa_cosine": 0.4111769497394562, + "ranking_skipped": false + }, + { + "reward": 0.4636356528693189, + "genuineness": 3.917399342171848, + "ecapa_cosine": 0.2743714153766632, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.08333333333333333, + "transcript": "Suena más amable que tener que encontrar a ocasión papación perfecta. Imagina que alguien pasa la tarde ayudando a un vecino a llevar la compra. No sucede nada espectacular, pero alguien llega a casa sintiéndose menos solo.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 7, + "speaker": "S2", + "text": "Eso encaja con una de las vías de Frankl: lo que damos mediante nuestros actos. Otra es lo que recibimos a través de la experiencia, la belleza o el amor. El sentido no siempre exige producir algo.", + "seed": 202651266, + "winner": 1, + "candidates": [ + { + "reward": 0.5397894845033686, + "genuineness": 4.080576378852129, + "ecapa_cosine": 0.3994829058647156, + "ranking_skipped": false + }, + { + "reward": 0.5964987977252652, + "genuineness": 4.143336777575314, + "ecapa_cosine": 0.5024414658546448, + "ranking_skipped": false + }, + { + "reward": 0.5139391525493313, + "genuineness": 4.143336777575314, + "ecapa_cosine": 0.3373221755027771, + "ranking_skipped": false + }, + { + "reward": 0.5264551369473338, + "genuineness": 4.281409654766321, + "ecapa_cosine": 0.33934199810028076, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.02702702702702703, + "transcript": "Eso encaja con una de las vías de Franco, lo que damos mediante nuestros actos. Otra es lo que recibimos a través de la experiencia, la belleza o el amor. El sentido no siempre exige producir algo.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 8, + "speaker": "S1", + "text": "Escuchar una canción sin mirar el móvil. Fijarme en el valor absurdo de una flor que crece entre las baldosas. Escuchar de verdad a alguien, en vez de preparar en silencio mi respuesta ingeniosa.", + "seed": 202651328, + "winner": 1, + "candidates": [ + { + "reward": 0.5035972984042019, + "genuineness": 3.942503501661122, + "ecapa_cosine": 0.3501106798648834, + "ranking_skipped": false + }, + { + "reward": 0.5576604376547039, + "genuineness": 4.055472219362855, + "ecapa_cosine": 0.4394088387489319, + "ranking_skipped": false + }, + { + "reward": 0.4192974230584999, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.15431475639343262, + "ranking_skipped": false + }, + { + "reward": 0.5309905981024106, + "genuineness": 4.030368059873581, + "ecapa_cosine": 0.3902531862258911, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.058823529411764705, + "transcript": "Escuchar una canción sin mirar en móvil, fijarme en el valor absurda de una flor que crece entre las baldosas. Escuchar de verdad a alguien, en vez de preparar en silencio mi respuesta ingeniosa.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 9, + "speaker": "S2", + "text": "Mis respuestas ingeniosas tienen lista de espera. Pero sí. La atención puede ser una forma de generosidad. No hace falta arreglarle toda la vida a alguien para hacerle un hueco en la nuestra.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": 0.5684843261260539, + "genuineness": 4.168440937064588, + "ecapa_cosine": 0.4422284960746765, + "ranking_skipped": false + }, + { + "reward": 0.5330575068170826, + "genuineness": 4.381826292723417, + "ecapa_cosine": 0.3358106315135956, + "ranking_skipped": false + }, + { + "reward": 0.5651571257816006, + "genuineness": 4.143336777575314, + "ecapa_cosine": 0.4397581219673157, + "ranking_skipped": false + }, + { + "reward": 0.5199712069394689, + "genuineness": 4.155888857319951, + "ecapa_cosine": 0.34729427099227905, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Mis respuestas ingeniosas tienen lista de espera, pero sí, la atención puede ser una forma de generosidad. No hace falta arreglarle toda la vida a alguien para hacerle un hueco en la nuestra.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 10, + "speaker": "S1", + "text": "Esta es la parte difícil. ¿Y el duelo? Cuando la persona a la que quieres llamar ya no está, y un ruido cualquiera en la cocina hace que de pronto la eches muchísimo de menos.", + "seed": 202651390, + "winner": 2, + "candidates": [ + { + "reward": 0.5683576743273686, + "genuineness": 4.268857575021684, + "ecapa_cosine": 0.42523908615112305, + "ranking_skipped": false + }, + { + "reward": 0.5153797413998593, + "genuineness": 3.917399342171848, + "ecapa_cosine": 0.37785959243774414, + "ranking_skipped": false + }, + { + "reward": 0.5699373139844586, + "genuineness": 4.143336777575314, + "ecapa_cosine": 0.4493184983730316, + "ranking_skipped": false + }, + { + "reward": 0.5302663437323645, + "genuineness": 4.0743003389798105, + "ecapa_cosine": 0.38148263096809387, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.02857142857142857, + "transcript": "Esta es la parte difícil. Y el duelo, cuando la persona a la que quieres llamar ya no está, y un ruido cualquiera en la cocinada hace que de pronto la eches muchísimo de menos.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 11, + "speaker": "S2", + "text": "Entonces no me apresuraría a dar una lección. La tercera vía de Frankl trata de nuestra actitud ante el sufrimiento inevitable. Es una posibilidad, no una obligación de sentir gratitud por el dolor.", + "seed": 202651390, + "winner": 1, + "candidates": [ + { + "reward": 0.5406283009409283, + "genuineness": 4.199821136426181, + "ecapa_cosine": 0.3812864124774933, + "ranking_skipped": false + }, + { + "reward": 0.5930913617291178, + "genuineness": 4.1370607377029955, + "ecapa_cosine": 0.4966726005077362, + "ranking_skipped": false + }, + { + "reward": 0.47674993992162246, + "genuineness": 3.99271182063967, + "ecapa_cosine": 0.2880479097366333, + "ranking_skipped": false + }, + { + "reward": 0.5549286233726889, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.44022125005722046, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Entonces no me apresuraría a dar una lección. La tercera vía de Frankl trata de nuestra actitud ante el sufrimiento inevitable. Es una posibilidad, no una obligación, de sentir gratitud por el dolor.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 12, + "speaker": "S1", + "text": "Y el sufrimiento que podemos cambiar debe cambiarse. Pedir ayuda, salir de una situación dañina, compartir la carga. No le debemos al mundo una explicación hermosa para todo lo que nos duele.", + "seed": 202651452, + "winner": 0, + "candidates": [ + { + "reward": 0.5235082105112572, + "genuineness": 3.6538056675344706, + "ecapa_cosine": 0.4380488097667694, + "ranking_skipped": false + }, + { + "reward": 0.4995325372243921, + "genuineness": 4.080576378852129, + "ecapa_cosine": 0.3189690113067627, + "ranking_skipped": false + }, + { + "reward": 0.5027157365111634, + "genuineness": 4.036644099745899, + "ecapa_cosine": 0.33265745639801025, + "ranking_skipped": false + }, + { + "reward": 0.5228146275815864, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.3613491654396057, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Y el sufrimiento que podemos cambiar debe cambiarse. Pedir ayuda, salir de una situación dañina, compartir la carga, no le debemos al mundo una explicación hermosa para todo lo que nos duele.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 13, + "speaker": "S2", + "text": "Exacto. A veces, el acto que tiene sentido es dejar que alguien se siente a tu lado. O decir: hoy es difícil. Una vida no pierde su valor porque quien la vive esté agotado.", + "seed": 202651452, + "winner": 3, + "candidates": [ + { + "reward": 0.5597578763651352, + "genuineness": 4.005263900384307, + "ecapa_cosine": 0.45197176933288574, + "ranking_skipped": false + }, + { + "reward": 0.5521187024811904, + "genuineness": 4.231201335787773, + "ecapa_cosine": 0.3990371823310852, + "ranking_skipped": false + }, + { + "reward": 0.5183339834911749, + "genuineness": 4.187269056681544, + "ecapa_cosine": 0.33878979086875916, + "ranking_skipped": false + }, + { + "reward": 0.6053287860316534, + "genuineness": 4.5575554091483355, + "ecapa_cosine": 0.4510650038719177, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Exacto. A veces el acto que tiene sentido es dejar que alguien se siente a tu lado o decir, hoy es difícil. Una vida no pierde su valor porque quien la vive esté agotado.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 14, + "speaker": "S1", + "text": "Imagina a un padre enseñando a su hijo a reparar una bicicleta. Años después, el niño ya no recuerda las instrucciones. Pero recuerda su paciencia. La sensación de que estaba permitido equivocarse.", + "seed": 202651514, + "winner": 2, + "candidates": [ + { + "reward": 0.5104695968329906, + "genuineness": 3.8295347839593887, + "ecapa_cosine": 0.3826833963394165, + "ranking_skipped": false + }, + { + "reward": 0.47782224125694484, + "genuineness": 4.187269056681544, + "ecapa_cosine": 0.2577663064002991, + "ranking_skipped": false + }, + { + "reward": 0.5817878167144954, + "genuineness": 4.055472219362855, + "ecapa_cosine": 0.487663596868515, + "ranking_skipped": false + }, + { + "reward": 0.5389517054427415, + "genuineness": 3.8671910231932998, + "ecapa_cosine": 0.43337157368659973, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03125, + "transcript": "Imagina un padre enseñando a su hijo a reparar una bicicleta. Años después, el niño ya no recuerda las instrucciones. Pero recuerda su paciencia, la sensación de que estaba permitido equivocarse.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 15, + "speaker": "S2", + "text": "Es una idea preciosa. Lo que nos sobrevive quizá sea una forma de tratar a los demás. Un poco más de paciencia viajando por el mundo, mucho después de que la bicicleta se haya oxidado.", + "seed": 202651514, + "winner": 0, + "candidates": [ + { + "reward": 0.5530342636629939, + "genuineness": 4.281409654766321, + "ecapa_cosine": 0.39250025153160095, + "ranking_skipped": false + }, + { + "reward": 0.5472482565479975, + "genuineness": 4.306513814255595, + "ecapa_cosine": 0.37674421072006226, + "ranking_skipped": false + }, + { + "reward": 0.5182064815113943, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.3814210593700409, + "ranking_skipped": false + }, + { + "reward": 0.5432377573257934, + "genuineness": 4.344170053489506, + "ecapa_cosine": 0.36244717240333557, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.02857142857142857, + "transcript": "Es una idea preciosa. Lo que nos sobrevive quizás sea una forma de tratar a los demás. Un poco más de paciencia viajando por el mundo mucho después de que la bicicleta se haya oxidado.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 16, + "speaker": "S1", + "text": "Quizá el misterio permanezca. Podemos discrepar sobre el universo y aun así reconocer un momento que necesita cuidado. No hace falta tener certeza sobre todo antes de poder amar algo.", + "seed": 202651576, + "winner": 1, + "candidates": [ + { + "reward": 0.5545305712924649, + "genuineness": 4.143336777575314, + "ecapa_cosine": 0.4185050129890442, + "ranking_skipped": false + }, + { + "reward": 0.5810129163631548, + "genuineness": 4.068024299107492, + "ecapa_cosine": 0.48402178287506104, + "ranking_skipped": false + }, + { + "reward": 0.49801864665156853, + "genuineness": 4.0617482592351735, + "ecapa_cosine": 0.3190792500972748, + "ranking_skipped": false + }, + { + "reward": 0.5256707803734268, + "genuineness": 3.8358108238317072, + "ecapa_cosine": 0.41203975677490234, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03333333333333333, + "transcript": "Quizá el misterio permanezca. Podemos discrepar sobre el universo y aún así reconocer un momento que necesita cuidado. No hace falta tener certeza sobre todo antes de poder amar algo.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 17, + "speaker": "S2", + "text": "Y ese cuidado puede ser modesto. Una llamada que sigues aplazando. Algo que haces con atención. Una disculpa sin excusas. Son nuestros ejemplos, no una lista que nos haya dejado Frankl.", + "seed": 202651576, + "winner": 0, + "candidates": [ + { + "reward": 0.5564459795132279, + "genuineness": 3.980159740895033, + "ecapa_cosine": 0.44953200221061707, + "ranking_skipped": false + }, + { + "reward": 0.5400047178457801, + "genuineness": 4.16216489719227, + "ecapa_cosine": 0.3863152861595154, + "ranking_skipped": false + }, + { + "reward": 0.5043971499738593, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.3245142102241516, + "ranking_skipped": false + }, + { + "reward": 0.48942508292384446, + "genuineness": 4.168440937064588, + "ecapa_cosine": 0.28411000967025757, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Y ese cuidado puede ser modesto. Una llamada que sigues aplazando, algo que haces con atención, una disculpa sin excusas. Son nuestros ejemplos, no una lista que nos haya dejado Frankl.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 18, + "speaker": "S1", + "text": "Por hoy, quizá podemos preguntarnos: ¿quién o qué merece mi atención? No para siempre. Solo hoy. Y si la respuesta es descansar, o dejar que alguien ayude, eso puede ser un comienzo sincero.", + "seed": 202651638, + "winner": 1, + "candidates": [ + { + "reward": 0.46359660585100454, + "genuineness": 3.7040139865130186, + "ecapa_cosine": 0.3098575472831726, + "ranking_skipped": false + }, + { + "reward": 0.5286908794660121, + "genuineness": 4.168440937064588, + "ecapa_cosine": 0.3626416027545929, + "ranking_skipped": false + }, + { + "reward": 0.5248644761741161, + "genuineness": 3.8295347839593887, + "ecapa_cosine": 0.4114731550216675, + "ranking_skipped": false + }, + { + "reward": 0.46027763149080175, + "genuineness": 3.917399342171848, + "ecapa_cosine": 0.2676553726196289, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.030303030303030304, + "transcript": "Por hoy quizá podemos practicarnos quién o qué merece mi atención, no para siempre, solo hoy. Y si la respuesta es descansar o dejar que alguien ayude, eso puede ser un comienzo sincero.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 4, + "index": 19, + "speaker": "S2", + "text": "No hemos resuelto el sentido de la vida. Pero tenemos a alguien con quien compartir la pregunta. Y quedan dos galletas. Tomémonos nuestro tiempo con las dos cosas.", + "seed": 202651638, + "winner": 3, + "candidates": [ + { + "reward": 0.5161673468537629, + "genuineness": 4.206097176298499, + "ecapa_cosine": 0.3313184976577759, + "ranking_skipped": false + }, + { + "reward": 0.5036158305592835, + "genuineness": 4.206097176298499, + "ecapa_cosine": 0.30621546506881714, + "ranking_skipped": false + }, + { + "reward": 0.5540905778761953, + "genuineness": 4.24375341553241, + "ecapa_cosine": 0.40088891983032227, + "ranking_skipped": false + }, + { + "reward": 0.5690889414399862, + "genuineness": 4.130784697830677, + "ecapa_cosine": 0.4497137665748596, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "No hemos resuelto el sentido de la vida, pero tenemos a alguien con quien compartir la pregunta. Y quedan dos galletas. Tomémonos nuestro tiempo con las dos cosas.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 0, + "speaker": "S1", + "text": "Welkom bij Kleine vragen, grote gevoelens. Vandaag: de zin van het leven. Idris, ik hoopte op een duidelijk antwoord. Het liefst iets wat ik kan onthouden terwijl ik mijn sleutels zoek.", + "seed": 202631080, + "winner": 0, + "candidates": [ + { + "reward": 0.5140915303103004, + "genuineness": 3.8232587440870702, + "ecapa_cosine": 0.3909732699394226, + "ranking_skipped": false + }, + { + "reward": 0.3884992487728596, + "genuineness": 3.8295347839593887, + "ecapa_cosine": 0.13874270021915436, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.06451612903225806, + "transcript": "Welkom bij Kleine Vragen Grote Gevoelens. Vandaag de zin van het leven. Iedere is, ik hoopte op een duidelijk antwoord. Het liefst iets wat ik kan onthouden terwijl ik mijn sleutels zoek.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 1, + "speaker": "S2", + "text": "Ik heb koekjes meegenomen. Geen complete filosofie, maar ze maken onzekerheid een stuk gezelliger. Misschien kunnen we wat kleiner beginnen dan het hele universum uitleggen vóór de thee.", + "seed": 202631080, + "winner": 1, + "candidates": [ + { + "reward": 0.4862468806871523, + "genuineness": 4.068024299107492, + "ecapa_cosine": 0.29448971152305603, + "ranking_skipped": false + }, + { + "reward": 0.5285831224949409, + "genuineness": 3.99271182063967, + "ecapa_cosine": 0.39171427488327026, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.17857142857142858, + "transcript": "Ik heb koekjes meegenomen. Geen complete filosofie, maar ze maken onzekerheid een stuk gezelliger. Misschien kunnen we wat kleiner beginnen dan het hele universum uitleggen voor de thee. Voor de thee. Ja.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 2, + "index": 2, + "speaker": "S1", + "text": "Goed dan. Waarom voelt een gewone middag soms zo waardevol, terwijl een dag vol prestaties vreemd leeg kan aanvoelen? Wat is het verschil tussen druk zijn en echt leven?", + "seed": 202631080, + "winner": 1, + "candidates": [ + { + "reward": 0.5116494930504512, + "genuineness": 3.967607661150396, + "ecapa_cosine": 0.3620310425758362, + "ranking_skipped": false + }, + { + "reward": 0.5221072693432991, + "genuineness": 3.710290026385337, + "ecapa_cosine": 0.4258328676223755, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.034482758620689655, + "transcript": "Goed dan, waarom voelt de gewone middag soms zo waardevol, terwijl een dag vol prestaties vreemd leeg kan aanvoelen? Wat is het verschil tussen druk zijn en echt leven?", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 3, + "speaker": "S2", + "text": "Viktor Frankl, de Oostenrijkse psychiater, stelde de zoektocht naar zin centraal in zijn benadering. Zijn vraag gaat verder dan plezier of succes: wat is belangrijk genoeg om erop te reageren?", + "seed": 202631080, + "winner": 1, + "candidates": [ + { + "reward": 0.4440287484321743, + "genuineness": 3.7165660662576556, + "ecapa_cosine": 0.2686298191547394, + "ranking_skipped": false + }, + { + "reward": 0.5129749046949048, + "genuineness": 3.8044306244701147, + "ecapa_cosine": 0.39187803864479065, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.06666666666666667, + "transcript": "Victor Frankel, de Oostenrijkse psychiater, stelde de zoektocht naar zin centraal in zijn benadering. Zijn vraag gaat verder dan plezier of succes. Wat is belangrijk genoeg om erop te reageren?", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 2, + "index": 4, + "speaker": "S1", + "text": "Dus we zoeken niet naar één schitterende zin die ieders leven verklaart? Geen universele handleiding met een ontbrekende bladzijde en zo een onmogelijk klein schroevendraaiertje?", + "seed": 202631204, + "winner": 0, + "candidates": [ + { + "reward": 0.45672774442937225, + "genuineness": 3.9613316212780774, + "ecapa_cosine": 0.25323355197906494, + "ranking_skipped": false + }, + { + "reward": 0.4403472755414744, + "genuineness": 3.955055581405759, + "ecapa_cosine": 0.2215186208486557, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Dus we zoeken niet naar één schitterende zin die ieders leven verklaart. Geen universele handleiding met een ontbrekende bladzijde en zo een onmogelijk klein schroevendraaiertje.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 5, + "speaker": "S2", + "text": "Gelukkig hoef je niets in elkaar te zetten. Volgens Frankl ontdekken mensen betekenis in concrete situaties. Wat vanochtend voor jou telt, kan heel anders zijn dan wat tien jaar geleden belangrijk was.", + "seed": 202631204, + "winner": 1, + "candidates": [ + { + "reward": 0.45725699230873335, + "genuineness": 4.0491961794905365, + "ecapa_cosine": 0.23964795470237732, + "ranking_skipped": false + }, + { + "reward": 0.5305360911103587, + "genuineness": 3.8546389434486628, + "ecapa_cosine": 0.4186323583126068, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0625, + "transcript": "Gelukkig hoef je niets in elkaar te zetten. Volgens Frankel ontdekken mensen betekenis in concrete situaties. Wat vanochtend voor jou telt kan heel anders zijn dan wat tien jaar geleden belangrijk was. Goe!", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 2, + "index": 6, + "speaker": "S1", + "text": "Dat klinkt vriendelijker dan één perfecte roeping moeten vinden. Stel dat iemand een middag een buur helpt om boodschappen te dragen. Er gebeurt niets spectaculairs. Maar iemand komt thuis en voelt zich minder alleen.", + "seed": 202631204, + "winner": 1, + "candidates": [ + { + "reward": 0.4262829894044747, + "genuineness": 3.7667743852362037, + "ecapa_cosine": 0.22477024793624878, + "ranking_skipped": false + }, + { + "reward": 0.43743031241077307, + "genuineness": 3.4184541723225266, + "ecapa_cosine": 0.30511826276779175, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Dat klinkt vriendelijker dan één perfecte roeping moeten vinden. Stel dat iemand een middag een buur helpt om boodschappen te dragen. Er gebeurt niets spectaculairs, maar iemand komt thuis en voelt zich minder alleen.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 7, + "speaker": "S2", + "text": "Dat past bij een van Frankls wegen: wat we geven door ons handelen. Een andere is wat we ontvangen door ervaringen, schoonheid of liefde. Betekenis vraagt niet altijd dat we iets produceren.", + "seed": 202631204, + "winner": 1, + "candidates": [ + { + "reward": 0.4914464397976796, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.3279009759426117, + "ranking_skipped": false + }, + { + "reward": 0.5081812312128022, + "genuineness": 3.9236753820441663, + "ecapa_cosine": 0.3624165654182434, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03125, + "transcript": "Dat past bij een van Frankels wegen, wat we geven door ons handelen. Een andere is wat we ontvangen door ervaringen, schoonheid of liefde. Betekenis vraagt niet altijd dat we iets produceren.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 8, + "speaker": "S1", + "text": "Naar een lied luisteren zonder op mijn telefoon te kijken. De dwaze moed zien van een bloem die tussen de stoeptegels groeit. Echt naar iemand luisteren, in plaats van ondertussen mijn slimme antwoord te bedenken.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": 0.454368344702137, + "genuineness": 3.9362274617888033, + "ecapa_cosine": 0.25269877910614014, + "ranking_skipped": false + }, + { + "reward": 0.43603715385931235, + "genuineness": 4.11823261808604, + "ecapa_cosine": 0.18570220470428467, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.05714285714285714, + "transcript": "Naar een lied luisteren zonder op mijn telefoon te kijken, de dwazen moet zien van een bloem die tussen de stoeptegels groeit. Echt naar iemand luisteren in plaats van ondertussen mijn slimme antwoord te bedenken.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 9, + "speaker": "S2", + "text": "Mijn slimme antwoorden staan op een wachtlijst. Maar ja. Aandacht kan een vorm van vrijgevigheid zijn. Je hoeft niet iemands hele leven op te lossen om ruimte te maken in het jouwe.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": 0.5611672464292496, + "genuineness": 4.093128458596766, + "ecapa_cosine": 0.44014641642570496, + "ranking_skipped": false + }, + { + "reward": 0.5474256706268836, + "genuineness": 3.99271182063967, + "ecapa_cosine": 0.42939937114715576, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Mijn slimme antwoorden staan op een wachtlijst. Maar ja, aandacht kan een vorm van vrijgevigheid zijn. Je hoeft niet iemands hele leven op te lossen om ruimte te maken in het jouwe.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 10, + "speaker": "S1", + "text": "Nu het moeilijke deel. Hoe zit het met verdriet? Als degene die je wilt bellen er niet meer is, en een gewoon geluid in de keuken je die persoon ineens verschrikkelijk laat missen?", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": 0.4883575326918314, + "genuineness": 3.967607661150396, + "ecapa_cosine": 0.3154471218585968, + "ranking_skipped": false + }, + { + "reward": 0.42665312672033906, + "genuineness": 3.904847262427211, + "ecapa_cosine": 0.20249837636947632, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.06060606060606061, + "transcript": "Nu het moeilijke deel: hoe zit het met verdriet? Als degene die je wilt bellen er niet meer is en een gewoon geluid in de keuken je die personen eens verschrikkelijk laat missen.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 11, + "speaker": "S2", + "text": "Dan zou ik niet meteen met een les aankomen. Frankls derde weg gaat over onze houding tegenover onvermijdelijk lijden. Het is een mogelijkheid, geen verplichting om dankbaar te zijn voor pijn.", + "seed": 202631328, + "winner": 1, + "candidates": [ + { + "reward": 0.4815395058443149, + "genuineness": 3.7291181460022926, + "ecapa_cosine": 0.3415593206882477, + "ranking_skipped": false + }, + { + "reward": 0.520961645913, + "genuineness": 3.967607661150396, + "ecapa_cosine": 0.38065534830093384, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.16129032258064516, + "transcript": "Dan zou ik niet meteen met een les aankomen. Frankels derde weg gaat over onze houding ter over onvermijdelijk lijden. Het is een mogelijk nat, geen verplichting om dankbaar te zijn voor pijn.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 2, + "index": 12, + "speaker": "S1", + "text": "En lijden dat we kunnen veranderen, moeten we veranderen. Vraag om hulp, verlaat de schadelijke situatie, deel de last. We zijn de wereld geen mooie verklaring schuldig voor alles wat pijn doet.", + "seed": 202631452, + "winner": 1, + "candidates": [ + { + "reward": 0.48985227348748595, + "genuineness": 3.547112989705056, + "ecapa_cosine": 0.3885190486907959, + "ranking_skipped": false + }, + { + "reward": 0.49594788284351426, + "genuineness": 3.879743102937937, + "ecapa_cosine": 0.34527191519737244, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "En lijden dat we kunnen veranderen, moeten we veranderen? Vraag om hulp, verlaat de schadelijke situatie, deel de last. We zijn de wereld geen mooie verklaring schuldig voor alles wat pijn doet.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 13, + "speaker": "S2", + "text": "Precies. Soms is de betekenisvolle daad iemand naast je laten zitten. Of zeggen: vandaag is moeilijk. Een leven verliest zijn waarde niet doordat degene die het leeft uitgeput is.", + "seed": 202631452, + "winner": 0, + "candidates": [ + { + "reward": 0.5477606857505937, + "genuineness": 4.406930452212691, + "ecapa_cosine": 0.36103296279907227, + "ranking_skipped": false + }, + { + "reward": 0.4927585597227638, + "genuineness": 4.16216489719227, + "ecapa_cosine": 0.29182296991348267, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Precies, soms is de betekenisvolle daad iemand naast je laten zitten of zeggen vandaag is moeilijk. Een leven verliest zijn waarde niet doordat degene die het leeft uitgeput is.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 14, + "speaker": "S1", + "text": "Stel je een vader voor die zijn kind leert een fiets te repareren. Jaren later is het kind de uitleg vergeten. Maar zijn geduld blijft bij. Het gevoel dat fouten maken mocht.", + "seed": 202631452, + "winner": 1, + "candidates": [ + { + "reward": 0.4772168497244517, + "genuineness": 3.6287015080451965, + "ecapa_cosine": 0.349650114774704, + "ranking_skipped": false + }, + { + "reward": 0.4992826415691525, + "genuineness": 3.7165660662576556, + "ecapa_cosine": 0.3791376054286957, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.15625, + "transcript": "Stel je een vader voor die zijn kind leert een fiets te repareren. Jaren later is het kind de uitleg vergeten, maar zijn geduld blijft bij, het gevoel dat fouten maken mocht. En ayeter daretare niidrikertatar daden.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 2, + "index": 15, + "speaker": "S2", + "text": "Dat is een mooie gedachte. Wat van ons blijft, is misschien een manier om mensen te behandelen. Een beetje meer geduld dat door de wereld reist, lang nadat de fiets is verroest.", + "seed": 202631452, + "winner": 1, + "candidates": [ + { + "reward": 0.46090987355758745, + "genuineness": 3.879743102937937, + "ecapa_cosine": 0.2751958966255188, + "ranking_skipped": false + }, + { + "reward": 0.48170879498745006, + "genuineness": 4.155888857319951, + "ecapa_cosine": 0.2707694470882416, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0625, + "transcript": "Dat is een mooie gedachte. Wat voor ons blijft, is misschien een manier om mensen te behandelen. Een beetje meer geduld dat door de wereld reist, lang nadat de fiets is verroest. Ja.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 2, + "index": 16, + "speaker": "S1", + "text": "Misschien blijft het een mysterie. We kunnen anders denken over het universum en toch een moment herkennen dat om zorg vraagt. We hoeven niet overal zeker van te zijn om ergens van te houden.", + "seed": 202631576, + "winner": 1, + "candidates": [ + { + "reward": 0.46140656519370776, + "genuineness": 3.8169827042147517, + "ecapa_cosine": 0.28664934635162354, + "ranking_skipped": false + }, + { + "reward": 0.480262449864919, + "genuineness": 3.8169827042147517, + "ecapa_cosine": 0.324361115694046, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.7352941176470589, + "transcript": "Misschien blijft het een mysterie. We kunnen anders denken over het universum en toch een moment herkennen dat om zorg vraagt. We hoeven niet overal zeker van te zijn om ergens van te houden. Ja, chillen. En nu. We kunnen anders denken over dat niet. En om je mee dan ik. En tegaan om het sprink ten wompiek heen.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 2, + "index": 17, + "speaker": "S2", + "text": "En zorg kan klein zijn. Een telefoontje dat je blijft uitstellen. Iets met aandacht maken. Je excuses aanbieden zonder uitvluchten. Dit zijn onze voorbeelden, geen lijstje dat Frankl ons heeft nagelaten.", + "seed": 202631576, + "winner": 0, + "candidates": [ + { + "reward": 0.5186334174747269, + "genuineness": 3.7793264649808407, + "ecapa_cosine": 0.4073790907859802, + "ranking_skipped": false + }, + { + "reward": 0.48292398736036074, + "genuineness": 3.609873388428241, + "ecapa_cosine": 0.3642024099826813, + "ranking_skipped": false + } + ], + "audit": { + "wer": 1.0, + "transcript": "En zorg kan klein zijn. Een telefoontje dat je blijft uitstellen, iets met aandacht maken. Je excuses aanbieden zonder uitvluchten. Dit zijn onze voorbeelden. Geen lijstje dat Frank ons heeft nagelaten. Zorg kan klein zijn. Een telefoontje dat je blijft uitstellen, iets met aandacht maken. Excuses aanbieden zonder uitvluchten. Dit zijn onze voorbeelden. Geen lazerten te doet. Geen hele groene gevonden.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 2, + "index": 18, + "speaker": "S1", + "text": "Vraag je vandaag misschien af: wie of wat verdient mijn aandacht? Niet voor altijd. Alleen vandaag. En als het antwoord rust is, of iemand toelaten om te helpen, kan dat een eerlijk begin zijn.", + "seed": 202631576, + "winner": 0, + "candidates": [ + { + "reward": 0.46322290032791597, + "genuineness": 3.6663577472791076, + "ecapa_cosine": 0.31538617610931396, + "ranking_skipped": false + }, + { + "reward": 0.3464547873785098, + "genuineness": 3.7291181460022926, + "ecapa_cosine": 0.07138988375663757, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.029411764705882353, + "transcript": "Vraag je vandaag misschien af: wie of wat verdient mijn aandacht? Niet voor altijd, alleen vandaag. En als het antwoord rust is of iemand toelat om te helpen, kan dat een eerlijk begin zijn.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 2, + "index": 19, + "speaker": "S2", + "text": "We hebben de zin van het leven niet opgelost. Maar we hebben iemand om de vraag mee te delen. En nog twee koekjes. Laten we voor allebei de tijd nemen.", + "seed": 202631576, + "winner": 1, + "candidates": [ + { + "reward": 0.5018828682756673, + "genuineness": 4.042920139618218, + "ecapa_cosine": 0.32994571328163147, + "ranking_skipped": false + }, + { + "reward": 0.5093646952106308, + "genuineness": 4.11823261808604, + "ecapa_cosine": 0.3323572874069214, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "We hebben de zin van het leven niet opgelost, maar we hebben iemand om de vraag mee te delen. En nog twee koekjes: laten we voor allebei de tijd nemen.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 0, + "speaker": "S1", + "text": "Bienvenue dans Petites questions, grandes émotions. Aujourd’hui, le sens de la vie. Idris, j’espérais une réponse claire. De préférence quelque chose dont je puisse me souvenir en cherchant mes clés.", + "seed": 202641080, + "winner": 1, + "candidates": [ + { + "reward": 0.45652796421200037, + "genuineness": 3.980159740895033, + "ecapa_cosine": 0.24969597160816193, + "ranking_skipped": false + }, + { + "reward": 0.5299255477730185, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.39021509885787964, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.09375, + "transcript": "Bienvenue dans Petite Questions, grandes émotions. Aujourd'hui le sens de la vie. Idriss, j'espère une réponse claire. De préférence quelque chose dont je puisse me souvenir en cherchant mes clés.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 1, + "speaker": "S2", + "text": "J’ai apporté des biscuits. Ce n’est pas une philosophie complète, mais ils rendent l’incertitude bien plus accueillante. On pourrait commencer plus modestement que par expliquer tout l’univers avant le thé.", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": 0.4947518667516609, + "genuineness": 4.105680538341403, + "ecapa_cosine": 0.30522364377975464, + "ranking_skipped": false + }, + { + "reward": 0.44771967343209934, + "genuineness": 4.024092020001262, + "ecapa_cosine": 0.2247573435306549, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "J'ai apporté des biscuits, ce n'est pas une philosophie complète, mais ils rendent l'incertitude bien plus accueillante. On pourrait commencer plus modestement que par expliquer tout l'univers avant le thé.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 2, + "speaker": "S1", + "text": "D’accord. Pourquoi un après-midi ordinaire semble-t-il parfois si précieux, alors qu’une journée pleine de réussites peut laisser un étrange vide ? Quelle différence entre être occupé et se sentir vivant ?", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": 0.532636740943417, + "genuineness": 3.942503501661122, + "ecapa_cosine": 0.4081895649433136, + "ranking_skipped": false + }, + { + "reward": 0.4615876190364361, + "genuineness": 3.8295347839593887, + "ecapa_cosine": 0.2849194407463074, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.029411764705882353, + "transcript": "D'accord. Pourquoi un après-midi ordinaire semble-t-il parfois si précieux, alors qu'une journée pleine de réussite peut laisser un étrange vide ? Quelle différence entre être occupé et se sentir vivant ?", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 3, + "speaker": "S2", + "text": "Viktor Frankl, le psychiatre autrichien, plaçait la recherche de sens au cœur de son approche. Sa question dépasse le plaisir ou la réussite : qu’est-ce qui compte assez pour nous appeler à agir ?", + "seed": 202641080, + "winner": 1, + "candidates": [ + { + "reward": 0.4504678447265178, + "genuineness": 4.168440937064588, + "ecapa_cosine": 0.20619553327560425, + "ranking_skipped": false + }, + { + "reward": 0.48373595244872075, + "genuineness": 3.967607661150396, + "ecapa_cosine": 0.3062039613723755, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.20588235294117646, + "transcript": "Victor Frankl, le long psychiatre autrichien, plaçait la recherche de sens au cœur de son approche. Sa question dépasse le plaisir ou la réussite. Qu'est-ce qui compte assez pour nous appeler à agir? Ça compte assez pour nous.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 2, + "index": 4, + "speaker": "S1", + "text": "Donc, on ne cherche pas une phrase magnifique qui expliquerait la vie de tout le monde ? Pas de mode d’emploi universel, avec une page manquante et un minuscule tournevis impossible à utiliser ?", + "seed": 202641204, + "winner": 0, + "candidates": [ + { + "reward": 0.4931482224492356, + "genuineness": 4.036644099745899, + "ecapa_cosine": 0.31352242827415466, + "ranking_skipped": false + }, + { + "reward": 0.4902502850163728, + "genuineness": 3.8671910231932998, + "ecapa_cosine": 0.3359687328338623, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Donc on ne cherche pas une phrase magnifique qui expliquerait la vie de tout le monde ? Pas de mode d'emploi universel, avec une page manquante et un minuscule tournevis impossible à utiliser ?", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 5, + "speaker": "S2", + "text": "Heureusement, aucun montage à prévoir. Pour Frankl, le sens se découvre dans des situations précises, par des personnes précises. Ce qui compte pour toi ce matin peut différer de ce qui comptait il y a dix ans.", + "seed": 202641204, + "winner": 0, + "candidates": [ + { + "reward": 0.5343255629219736, + "genuineness": 4.1370607377029955, + "ecapa_cosine": 0.3791410028934479, + "ranking_skipped": false + }, + { + "reward": 0.5204380370754127, + "genuineness": 3.9362274617888033, + "ecapa_cosine": 0.38483816385269165, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.05405405405405406, + "transcript": "Heureusement, aucun montage à prévoir. Pour Frankel, le sang se découvre dans des situations précises, par des personnes précises. Ce qui compte pour toi ce matin peut différer de ce qui comptait il y a dix ans.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 6, + "speaker": "S1", + "text": "C’est plus doux que de devoir trouver une vocation parfaite. Imaginons quelqu’un qui aide un voisin à porter ses courses. Rien de spectaculaire ne se passe. Mais quelqu’un rentre chez lui en se sentant moins seul.", + "seed": 202641204, + "winner": 1, + "candidates": [ + { + "reward": 0.3625291532371193, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.055422309786081314, + "ranking_skipped": false + }, + { + "reward": 0.5260186680437375, + "genuineness": 3.6914619067683816, + "ecapa_cosine": 0.4367936849594116, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "C'est plus doux que de devoir trouver une vocation parfaite. Imaginons quelqu'un qui aide un voisin à porter ses courses. Rien de spectaculaire ne se passe, mais quelqu'un rentre chez lui en se sentant moins seul.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 7, + "speaker": "S2", + "text": "Cela rejoint une des voies de Frankl : ce que nous apportons par nos actes. Une autre est ce que nous recevons à travers l’expérience, la beauté ou l’amour. Le sens n’exige pas toujours de produire quelque chose.", + "seed": 202641204, + "winner": 0, + "candidates": [ + { + "reward": 0.5400643485287826, + "genuineness": 4.231201335787773, + "ecapa_cosine": 0.37492847442626953, + "ranking_skipped": false + }, + { + "reward": 0.5368105398956686, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.40398508310317993, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.05, + "transcript": "Cela rejoint une des voix de Francol, ce que nous apportons par nos actes. Une autre est ce que nous recevons à travers l'expérience, la beauté ou l'amour. Le sens n'exige pas toujours de produire quelque chose.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 8, + "speaker": "S1", + "text": "Écouter une chanson sans regarder mon téléphone. Remarquer le courage un peu fou d’une fleur qui pousse entre les pavés. Vraiment écouter quelqu’un, au lieu de préparer en silence ma brillante réponse.", + "seed": 202641328, + "winner": 0, + "candidates": [ + { + "reward": 0.46992404817137867, + "genuineness": 3.9989878605119884, + "ecapa_cosine": 0.2733501195907593, + "ranking_skipped": false + }, + { + "reward": 0.4257527232790987, + "genuineness": 4.080576378852129, + "ecapa_cosine": 0.17140938341617584, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Écouter une chanson sans regarder mon téléphone, remarquer le courage un peu fou d'une fleur qui pousse entre les pavés. Vraiment écouter quelqu'un, au lieu de préparer en silence ma brillante réponse ?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 9, + "speaker": "S2", + "text": "Mes brillantes réponses ont une liste d’attente. Mais oui. L’attention peut être une forme de générosité. Pas besoin de réparer toute la vie de quelqu’un pour lui faire une place dans la nôtre.", + "seed": 202641328, + "winner": 1, + "candidates": [ + { + "reward": 0.395573155527624, + "genuineness": 3.685185866896063, + "ecapa_cosine": 0.1769486665725708, + "ranking_skipped": false + }, + { + "reward": 0.4914838862605393, + "genuineness": 4.206097176298499, + "ecapa_cosine": 0.28195157647132874, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.8888888888888888, + "transcript": "My brilliant repens are a list of attentes. But okay, l'tension would be a form of generosity. Pas besoin to reparate the view of the place on the nose.", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 10, + "speaker": "S1", + "text": "Voici la partie difficile. Et le deuil ? Quand la personne qu’on voudrait appeler n’est plus là, et qu’un simple bruit dans la cuisine nous la fait soudain terriblement regretter ?", + "seed": 202641328, + "winner": 1, + "candidates": [ + { + "reward": 0.4806844530588326, + "genuineness": 3.6255634881090373, + "ecapa_cosine": 0.35710832476615906, + "ranking_skipped": false + }, + { + "reward": 0.5115842066006735, + "genuineness": 4.0743003389798105, + "ecapa_cosine": 0.3441183567047119, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.1875, + "transcript": "Voici la partie difficile. Et le deuil ? Quand la personne qu'on voudrait appeler n'est plus là, et qu'un simple bruit dans la cuisine nous la fait soudain terriblement regretter. Nous la fait soudain terriblement regretter ?", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 2, + "index": 11, + "speaker": "S2", + "text": "Je ne me précipiterais pas avec une leçon. La troisième voie de Frankl concerne notre attitude face à une souffrance inévitable. C’est une possibilité, pas une obligation d’éprouver de la gratitude pour la douleur.", + "seed": 202641328, + "winner": 1, + "candidates": [ + { + "reward": 0.5009106698756416, + "genuineness": 3.879743102937937, + "ecapa_cosine": 0.3551974892616272, + "ranking_skipped": false + }, + { + "reward": 0.5755949395243078, + "genuineness": 4.017815980128944, + "ecapa_cosine": 0.4815538823604584, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.05555555555555555, + "transcript": "Je ne me précipiterai pas avec une leçon. La troisième voie de Frankel concerne notre attitude face à une souffrance inévitable. C'est une possibilité, pas une obligation, d'éprouver de la gratitude pour la douleur.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 12, + "speaker": "S1", + "text": "Et la souffrance qu’on peut changer doit être changée. Demander de l’aide, quitter une situation nocive, partager le fardeau. Nous ne devons pas au monde une belle explication pour tout ce qui nous fait mal.", + "seed": 202641452, + "winner": 1, + "candidates": [ + { + "reward": 0.4951175762107596, + "genuineness": 3.9613316212780774, + "ecapa_cosine": 0.3300132155418396, + "ranking_skipped": false + }, + { + "reward": 0.5017821881143998, + "genuineness": 3.6663577472791076, + "ecapa_cosine": 0.3925047516822815, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.5675675675675675, + "transcript": "And the suffering does changed. Demander de l'aide, quitter une situation nocive, partager le fardeau. We devons pas au monde doit expliquer force that we feel mal.", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 13, + "speaker": "S2", + "text": "Exactement. Parfois, ce qui a du sens, c’est laisser quelqu’un s’asseoir près de nous. Ou dire : aujourd’hui, c’est difficile. Une vie ne perd pas sa valeur parce que la personne qui la vit est épuisée.", + "seed": 202641452, + "winner": 1, + "candidates": [ + { + "reward": 0.5202705765453477, + "genuineness": 4.406930452212691, + "ecapa_cosine": 0.3060527443885803, + "ranking_skipped": false + }, + { + "reward": 0.5291241023223847, + "genuineness": 4.093128458596766, + "ecapa_cosine": 0.3760601282119751, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.525, + "transcript": "Exactement. Parfois, ce qui a du sens, c'est laisser quelqu'un s'asseoir près de nous. Ou dire aujourd'hui c'est difficile. Une vie ne perd pas sa valeur parce que la personne qui la vit est épuisée. Aujourd'hui c'est difficile. Une vie ne perd pas sa valeur parce que la personne qui la vit est épuisée.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 2, + "index": 14, + "speaker": "S1", + "text": "Imagine un père qui apprend à son enfant à réparer un vélo. Des années plus tard, l’enfant a oublié les instructions. Mais il se souvient de sa patience. Du sentiment qu’il avait le droit de se tromper.", + "seed": 202641452, + "winner": 0, + "candidates": [ + { + "reward": 0.5460780455420415, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.43716418743133545, + "ranking_skipped": false + }, + { + "reward": 0.5148301776498556, + "genuineness": 4.130784697830677, + "ecapa_cosine": 0.3411962389945984, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.02564102564102564, + "transcript": "Imagine un père qui apprend à son enfant à réparer un vélo. Des années plus tard, l'enfant a oublié les instructions. But il se souvient de sa patience, du sentiment qu'il avait le droit de se tromper.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 15, + "speaker": "S2", + "text": "C’est une belle pensée. Ce qui nous survit, c’est peut-être une façon de traiter les autres. Un peu plus de patience qui traverse le monde, longtemps après que le vélo a rouillé.", + "seed": 202641452, + "winner": 0, + "candidates": [ + { + "reward": 0.553915396061105, + "genuineness": 4.312789854127914, + "ecapa_cosine": 0.3890324831008911, + "ranking_skipped": false + }, + { + "reward": 0.5206693841222052, + "genuineness": 4.388102332595736, + "ecapa_cosine": 0.3099883794784546, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "C'est une belle pensée. Ce qui nous survit, c'est peut-être une façon de traiter les autres. Un peu plus de patience qui traverse le monde longtemps après que le vélo a rouillé.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 16, + "speaker": "S1", + "text": "Peut-être que le mystère demeure. On peut être en désaccord sur l’univers et reconnaître un moment qui demande de l’attention. Pas besoin d’être sûr de tout avant de pouvoir aimer quelque chose.", + "seed": 202641576, + "winner": 1, + "candidates": [ + { + "reward": 0.5293552180907379, + "genuineness": 3.892295182682574, + "ecapa_cosine": 0.40999457240104675, + "ranking_skipped": false + }, + { + "reward": 0.5593331218309079, + "genuineness": 3.9738837010227144, + "ecapa_cosine": 0.4563522934913635, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Peut-être que le mystère demeure, on peut être en désaccord sur l'univers et reconnaître un moment qui demande de l'attention. Pas besoin d'être sûr de tout avant de pouvoir aimer quelque chose.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 17, + "speaker": "S2", + "text": "Et cette attention peut être modeste. Un appel qu’on repousse. Une chose faite avec soin. Des excuses sans prétexte. Ce sont nos exemples, pas une liste de consignes laissée par Frankl.", + "seed": 202641576, + "winner": 0, + "candidates": [ + { + "reward": 0.5120322314711909, + "genuineness": 3.8546389434486628, + "ecapa_cosine": 0.38162463903427124, + "ranking_skipped": false + }, + { + "reward": 0.49639463735123474, + "genuineness": 3.7291181460022926, + "ecapa_cosine": 0.3712695837020874, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.15625, + "transcript": "Et cette attention peut être moderne en blatt, un appel qu'on repousse, une chose faite avec soin, des excuses sans prétexte, ce sont nos exemples, pas une liste de consignes laissées par Frankel.", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 18, + "speaker": "S1", + "text": "Pour aujourd’hui, demandons-nous peut-être : qui ou quoi mérite mon attention ? Pas pour toujours. Juste aujourd’hui. Et si la réponse est le repos, ou accepter de l’aide, cela peut être un début sincère.", + "seed": 202641576, + "winner": 0, + "candidates": [ + { + "reward": 0.5595008550056566, + "genuineness": 4.068024299107492, + "ecapa_cosine": 0.4409976601600647, + "ranking_skipped": false + }, + { + "reward": 0.510787184854659, + "genuineness": 3.9864357807673514, + "ecapa_cosine": 0.35716840624809265, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Pour aujourd'hui, demandons-nous peut-être qui ou quoi mérite mon attention. Pas pour toujours, juste aujourd'hui. Et si la réponse est le repos ou accepter de l'aide, cela peut être un début sincère.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 2, + "index": 19, + "speaker": "S2", + "text": "Nous n’avons pas résolu le sens de la vie. Mais nous avons quelqu’un avec qui partager la question. Et encore deux biscuits. Prenons notre temps pour les deux.", + "seed": 202641576, + "winner": 1, + "candidates": [ + { + "reward": 0.5371053122992937, + "genuineness": 4.011539940256625, + "ecapa_cosine": 0.40562063455581665, + "ranking_skipped": false + }, + { + "reward": 0.5507934007328004, + "genuineness": 4.093128458596766, + "ecapa_cosine": 0.4193987250328064, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Nous n'avons pas résolu le sens de la vie, mais nous avons quelqu'un avec qui partager la question. Et encore deux biscuits. Prenons notre temps pour les deux.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 0, + "speaker": "S1", + "text": "Bienvenidos a Pequeñas preguntas, grandes emociones. Hoy, el sentido de la vida. Idris, esperaba una respuesta clara. Preferiblemente algo que pueda recordar mientras busco mis llaves.", + "seed": 202651080, + "winner": 1, + "candidates": [ + { + "reward": 0.5403477375706036, + "genuineness": 4.030368059873581, + "ecapa_cosine": 0.4089674651622772, + "ranking_skipped": false + }, + { + "reward": 0.5554081569425762, + "genuineness": 4.055472219362855, + "ecapa_cosine": 0.4349042773246765, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.038461538461538464, + "transcript": "Bienvenidos a Pequeñas Preguntas, Grandes Emociones. Hoy el sentido de la vida. Idith esperaba una respuesta clara. Preferiblemente algo que pueda recordar mientras busco mis llaves.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 1, + "speaker": "S2", + "text": "He traído galletas. No son una filosofía completa, pero hacen que la incertidumbre resulte mucho más acogedora. Quizá convenga empezar por algo más pequeño que explicar todo el universo antes del té.", + "seed": 202651080, + "winner": 1, + "candidates": [ + { + "reward": 0.5121860742413749, + "genuineness": 4.218649256043136, + "ecapa_cosine": 0.3212639391422272, + "ranking_skipped": false + }, + { + "reward": 0.5747548431002845, + "genuineness": 4.218649256043136, + "ecapa_cosine": 0.4464014768600464, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.09375, + "transcript": "He traído galletas. No son una filosofía completa, pero hacen que la incertidumbre resulte mucho más acogedora. Quizá convenga empezar por algo más pequeño que exía esta del universo antes del té.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 2, + "speaker": "S1", + "text": "De acuerdo. ¿Por qué una tarde corriente a veces parece tan valiosa, mientras que un día lleno de logros puede dejarnos un extraño vacío? ¿Qué diferencia hay entre estar ocupado y sentirse vivo?", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": 0.5161724419643481, + "genuineness": 3.7291181460022926, + "ecapa_cosine": 0.4108251929283142, + "ranking_skipped": false + }, + { + "reward": 0.48765168571844697, + "genuineness": 3.904847262427211, + "ecapa_cosine": 0.32449549436569214, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "De acuerdo. ¿Por qué una tarde corriente a veces parece tan valiosa mientras que un día lleno de logros puede dejarnos un extraño vacío? ¿Qué diferencia hay entre estar ocupado y sentirse vivo?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 3, + "speaker": "S2", + "text": "Viktor Frankl, el psiquiatra austriaco, puso la búsqueda de sentido en el centro de su enfoque. Su pregunta va más allá del placer o del éxito: ¿qué importa tanto como para responder a ello?", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": 0.5379370371811092, + "genuineness": 4.055472219362855, + "ecapa_cosine": 0.39996203780174255, + "ranking_skipped": false + }, + { + "reward": 0.5114935469658424, + "genuineness": 3.99271182063967, + "ecapa_cosine": 0.35753512382507324, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.058823529411764705, + "transcript": "Víctor Franco, el psiquiatra austriaco, puso la búsqueda de sentido en el centro de su enfoque. Su pregunta va más allá del placer o del éxito. ¿Qué importa tanto como para responder a ello?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 4, + "speaker": "S1", + "text": "Entonces, ¿no buscamos una frase magnífica que explique la vida de todo el mundo? ¿No hay un manual universal, con una página perdida y un destornillador diminuto imposible de usar?", + "seed": 202651204, + "winner": 1, + "candidates": [ + { + "reward": 0.4192550911102444, + "genuineness": 4.319065894000232, + "ecapa_cosine": 0.11866586655378342, + "ranking_skipped": false + }, + { + "reward": 0.5364347292731206, + "genuineness": 3.929951421916485, + "ecapa_cosine": 0.41787755489349365, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.06666666666666667, + "transcript": "Entonces, ¿no buscamos una frase magnífica que explique la vida de todo el mundo? ¿No hay un manual universal con arifargina perdida y un destornillador diminuto imposible de usar?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 5, + "speaker": "S2", + "text": "Por suerte, no hay que montar nada. Para Frankl, el sentido se descubre en situaciones concretas, por personas concretas. Lo que te importa esta mañana puede ser muy distinto de lo que importaba hace diez años.", + "seed": 202651204, + "winner": 1, + "candidates": [ + { + "reward": 0.5127869263912241, + "genuineness": 4.080576378852129, + "ecapa_cosine": 0.34547778964042664, + "ranking_skipped": false + }, + { + "reward": 0.5388346105658759, + "genuineness": 4.218649256043136, + "ecapa_cosine": 0.37456101179122925, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.027777777777777776, + "transcript": "Por suerte no hay que montar nada. Para Frankl, el sentido se descubre en situaciones concretas, por personas concretas. Lo que te importa esta mañana puede ser muy distinto de lo que importaba hace 10 años.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 6, + "speaker": "S1", + "text": "Suena más amable que tener que encontrar una vocación perfecta. Imagina que alguien pasa la tarde ayudando a un vecino a llevar la compra. No sucede nada espectacular. Pero alguien llega a casa sintiéndose menos solo.", + "seed": 202651204, + "winner": 0, + "candidates": [ + { + "reward": 0.5294792543863878, + "genuineness": 3.810706664342433, + "ecapa_cosine": 0.42384073138237, + "ranking_skipped": false + }, + { + "reward": 0.5193730718456209, + "genuineness": 3.7542223054915667, + "ecapa_cosine": 0.41304242610931396, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Suena más amable que tener que encontrar una vocación perfecta. Imagina que alguien pasa la tarde ayudando a un vecino a llevar la compra. No sucede nada espectacular, pero alguien llega a casa sintiéndose menos solo.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 7, + "speaker": "S2", + "text": "Eso encaja con una de las vías de Frankl: lo que damos mediante nuestros actos. Otra es lo que recibimos a través de la experiencia, la belleza o el amor. El sentido no siempre exige producir algo.", + "seed": 202651204, + "winner": 1, + "candidates": [ + { + "reward": 0.5397308122289057, + "genuineness": 4.024092020001262, + "ecapa_cosine": 0.4087796211242676, + "ranking_skipped": false + }, + { + "reward": 0.570889644130754, + "genuineness": 4.174716976936907, + "ecapa_cosine": 0.4459931254386902, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.02702702702702703, + "transcript": "Eso encaja con una de las vías de Franklin, lo que damos mediante nuestros actos. Otra es lo que recibimos a través de la experiencia, la belleza o el amor. El sentido no siempre exige producir algo.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 8, + "speaker": "S1", + "text": "Escuchar una canción sin mirar el móvil. Fijarme en el valor absurdo de una flor que crece entre las baldosas. Escuchar de verdad a alguien, en vez de preparar en silencio mi respuesta ingeniosa.", + "seed": 202651328, + "winner": 1, + "candidates": [ + { + "reward": 0.5089266794966534, + "genuineness": 3.773050425108522, + "ecapa_cosine": 0.3890116214752197, + "ranking_skipped": false + }, + { + "reward": 0.5163758636917919, + "genuineness": 3.942503501661122, + "ecapa_cosine": 0.3756678104400635, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Escuchar una canción sin mirar el móvil, fijarme en el valor absurdo de una flor que crece entre las baldosas. Escuchar de verdad a alguien en vez de preparar en silencio mi respuesta ingeniosa.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 9, + "speaker": "S2", + "text": "Mis respuestas ingeniosas tienen lista de espera. Pero sí. La atención puede ser una forma de generosidad. No hace falta arreglarle toda la vida a alguien para hacerle un hueco en la nuestra.", + "seed": 202651328, + "winner": 1, + "candidates": [ + { + "reward": 0.5018902266553293, + "genuineness": 4.193545096553862, + "ecapa_cosine": 0.3048562705516815, + "ranking_skipped": false + }, + { + "reward": 0.5056013002758846, + "genuineness": 4.1119565782137215, + "ecapa_cosine": 0.32587650418281555, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Mis respuestas ingeniosas tienen lista de espera, pero sí. La atención puede ser una forma de generosidad. No hace falta arreglarle toda la vida a alguien para hacerle un hueco en la nuestra.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 10, + "speaker": "S1", + "text": "Esta es la parte difícil. ¿Y el duelo? Cuando la persona a la que quieres llamar ya no está, y un ruido cualquiera en la cocina hace que de pronto la eches muchísimo de menos.", + "seed": 202651328, + "winner": 1, + "candidates": [ + { + "reward": 0.5151801294802378, + "genuineness": 3.967607661150396, + "ecapa_cosine": 0.36909231543540955, + "ranking_skipped": false + }, + { + "reward": 0.5257531507716824, + "genuineness": 4.143336777575314, + "ecapa_cosine": 0.36095017194747925, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Esta es la parte difícil. Y el duelo. Cuando la persona a la que quieres llamar ya no está y un ruido cualquiera en la cocina hace que de pronto la eches muchísimo de menos.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 11, + "speaker": "S2", + "text": "Entonces no me apresuraría a dar una lección. La tercera vía de Frankl trata de nuestra actitud ante el sufrimiento inevitable. Es una posibilidad, no una obligación de sentir gratitud por el dolor.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": 0.5265932147546362, + "genuineness": 3.8169827042147517, + "ecapa_cosine": 0.4170226454734802, + "ranking_skipped": false + }, + { + "reward": 0.5031389360471319, + "genuineness": 3.8169827042147517, + "ecapa_cosine": 0.3701140880584717, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Entonces no me apresuraría a dar una lección. La tercera vía de Frankl trata de nuestra actitud ante el sufrimiento inevitable. Es una posibilidad, no una obligación de sentir gratitud por el dolor.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 12, + "speaker": "S1", + "text": "Y el sufrimiento que podemos cambiar debe cambiarse. Pedir ayuda, salir de una situación dañina, compartir la carga. No le debemos al mundo una explicación hermosa para todo lo que nos duele.", + "seed": 202651452, + "winner": 1, + "candidates": [ + { + "reward": 0.4450568654574454, + "genuineness": 3.904847262427211, + "ecapa_cosine": 0.23930585384368896, + "ranking_skipped": false + }, + { + "reward": 0.45933605877993006, + "genuineness": 4.218649256043136, + "ecapa_cosine": 0.21556390821933746, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03125, + "transcript": "Y el sufrimiento que puedo cambiar debe cambiarse. Pedir ayuda, salir de una situación dañina, compartir la carga. No le debemos al mundo una explicación hermosa para todo lo que nos duele.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 13, + "speaker": "S2", + "text": "Exacto. A veces, el acto que tiene sentido es dejar que alguien se siente a tu lado. O decir: hoy es difícil. Una vida no pierde su valor porque quien la vive esté agotado.", + "seed": 202651452, + "winner": 1, + "candidates": [ + { + "reward": 0.45351157678912085, + "genuineness": 4.381826292723417, + "ecapa_cosine": 0.17671877145767212, + "ranking_skipped": false + }, + { + "reward": 0.4970111922205736, + "genuineness": 4.293961734510958, + "ecapa_cosine": 0.27836209535598755, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.029411764705882353, + "transcript": "Exacto, a veces el acto que tiene sentido es dejar que alguien se sienta a tu lado. O decir, hoy es difícil. Una vida no pierde su valor porque quien la vive esté agotado.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 14, + "speaker": "S1", + "text": "Imagina a un padre enseñando a su hijo a reparar una bicicleta. Años después, el niño ya no recuerda las instrucciones. Pero recuerda su paciencia. La sensación de que estaba permitido equivocarse.", + "seed": 202651452, + "winner": 1, + "candidates": [ + { + "reward": 0.4858597456089531, + "genuineness": 3.8232587440870702, + "ecapa_cosine": 0.3345097005367279, + "ranking_skipped": false + }, + { + "reward": 0.5613187560035537, + "genuineness": 4.11823261808604, + "ecapa_cosine": 0.43626540899276733, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Imagina a un padre enseñando a su hijo a reparar una bicicleta. Años después, el niño ya no recuerda las instrucciones. Pero recuerda su paciencia, la sensación de que estaba permitido equivocarse.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 15, + "speaker": "S2", + "text": "Es una idea preciosa. Lo que nos sobrevive quizá sea una forma de tratar a los demás. Un poco más de paciencia viajando por el mundo, mucho después de que la bicicleta se haya oxidado.", + "seed": 202651452, + "winner": 1, + "candidates": [ + { + "reward": 0.541434902464971, + "genuineness": 4.24375341553241, + "ecapa_cosine": 0.37557756900787354, + "ranking_skipped": false + }, + { + "reward": 0.5700218729131545, + "genuineness": 4.28768569463864, + "ecapa_cosine": 0.42542946338653564, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.08571428571428572, + "transcript": "Es una idea preciosa, lo que nos sobrevive quizás sea de tratar a los demás. Un poco más de paciencia viajando por el mundo mucho después de que la bicicleta se haya oxidado.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 16, + "speaker": "S1", + "text": "Quizá el misterio permanezca. Podemos discrepar sobre el universo y aun así reconocer un momento que necesita cuidado. No hace falta tener certeza sobre todo antes de poder amar algo.", + "seed": 202651576, + "winner": 1, + "candidates": [ + { + "reward": 0.4673650409871091, + "genuineness": 3.917399342171848, + "ecapa_cosine": 0.28183019161224365, + "ranking_skipped": false + }, + { + "reward": 0.5407620179854955, + "genuineness": 3.9864357807673514, + "ecapa_cosine": 0.4171180725097656, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03333333333333333, + "transcript": "Quizá el misterio permanezca. Podemos discrepar sobre el universo y aún así reconocer un momento que necesita cuidado. No hace falta tener certeza sobre todo antes de poder amar algo.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 17, + "speaker": "S2", + "text": "Y ese cuidado puede ser modesto. Una llamada que sigues aplazando. Algo que haces con atención. Una disculpa sin excusas. Son nuestros ejemplos, no una lista que nos haya dejado Frankl.", + "seed": 202651576, + "winner": 1, + "candidates": [ + { + "reward": 0.4694712901643167, + "genuineness": 4.193545096553862, + "ecapa_cosine": 0.24001839756965637, + "ranking_skipped": false + }, + { + "reward": 0.5480436419602484, + "genuineness": 4.24375341553241, + "ecapa_cosine": 0.38879504799842834, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.03225806451612903, + "transcript": "Y ese cuidado puede ser modesto, una llamada que sigues aplazando, algo que haces con atención, una disculpa sin excusas. Son nuestros ejemplos, no una lista que nos haya dejado Franklin.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 18, + "speaker": "S1", + "text": "Por hoy, quizá podemos preguntarnos: ¿quién o qué merece mi atención? No para siempre. Solo hoy. Y si la respuesta es descansar, o dejar que alguien ayude, eso puede ser un comienzo sincero.", + "seed": 202651576, + "winner": 1, + "candidates": [ + { + "reward": 0.4238763722047831, + "genuineness": 3.9111233022995293, + "ecapa_cosine": 0.1958988606929779, + "ranking_skipped": false + }, + { + "reward": 0.5404768792601924, + "genuineness": 3.8546389434486628, + "ecapa_cosine": 0.43851393461227417, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "Por hoy quizá podemos preguntarnos ¿quién o qué merece mi atención? No para siempre, solo hoy. Y si la respuesta es descansar o dejar que alguien ayude, eso puede ser un comienzo sincero.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 2, + "index": 19, + "speaker": "S2", + "text": "No hemos resuelto el sentido de la vida. Pero tenemos a alguien con quien compartir la pregunta. Y quedan dos galletas. Tomémonos nuestro tiempo con las dos cosas.", + "seed": 202651576, + "winner": 0, + "candidates": [ + { + "reward": 0.5543883153392624, + "genuineness": 4.11823261808604, + "ecapa_cosine": 0.42240452766418457, + "ranking_skipped": false + }, + { + "reward": 0.5255041117003809, + "genuineness": 4.193545096553862, + "ecapa_cosine": 0.35208404064178467, + "ranking_skipped": false + } + ], + "audit": { + "wer": 0.0, + "transcript": "No hemos resuelto el sentido de la vida, pero tenemos a alguien con quien compartir la pregunta. Y quedan dos galletas. Tomémonos nuestro tiempo con las dos cosas.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 0, + "speaker": "S1", + "text": "Welkom bij Kleine vragen, grote gevoelens. Vandaag: de zin van het leven. Idris, ik hoopte op een duidelijk antwoord. Het liefst iets wat ik kan onthouden terwijl ik mijn sleutels zoek.", + "seed": 202631080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Welkom bij Kleine Vragen Grote Gevoelens vandaag de zin van het leven. Idris, ik hoopte op een duidelijk antwoord. Het liefst iets wat ik kan onthouden terwijl ik mijn sleutels zoek.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 1, + "speaker": "S2", + "text": "Ik heb koekjes meegenomen. Geen complete filosofie, maar ze maken onzekerheid een stuk gezelliger. Misschien kunnen we wat kleiner beginnen dan het hele universum uitleggen vóór de thee.", + "seed": 202631080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.10714285714285714, + "transcript": "Ik heb koekjes meegenomen. Geen complete. filosofie, maar ze maken onzekerheid een stuk gezelliger. Misschien kunnen we wat kleiner beginnen dan het hele universum uitleggen voor voor de thee. Sintuk.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 1, + "index": 2, + "speaker": "S1", + "text": "Goed dan. Waarom voelt een gewone middag soms zo waardevol, terwijl een dag vol prestaties vreemd leeg kan aanvoelen? Wat is het verschil tussen druk zijn en echt leven?", + "seed": 202631080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.034482758620689655, + "transcript": "Goed dan, waarom voelt een gewone middag soms zo waardevol terwijl een dag vol prestaties vreemd leef kan aanvoelen? Wat is het verschil tussen druk zijn en echt leven?", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 3, + "speaker": "S2", + "text": "Viktor Frankl, de Oostenrijkse psychiater, stelde de zoektocht naar zin centraal in zijn benadering. Zijn vraag gaat verder dan plezier of succes: wat is belangrijk genoeg om erop te reageren?", + "seed": 202631080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 1.1, + "transcript": "Victor Frankel, de Oostenrijkse psychiater, stelde de zoektocht naar zin centraal in zijn benadering? Zijn vraag gaat verder dan plezier of succes. Wat is belangrijk genoeg om erop te reageren? Itghor Frankel, de Oostenrijkse psychiater, stelde de zoektocht naar zin centraal in zijn benadering. Zijn vraag gaat verder dan plezier of succes. Wat is belangrijk genoeg om erop te reageren? Zemmen?", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 1, + "index": 4, + "speaker": "S1", + "text": "Dus we zoeken niet naar één schitterende zin die ieders leven verklaart? Geen universele handleiding met een ontbrekende bladzijde en zo een onmogelijk klein schroevendraaiertje?", + "seed": 202631080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.04, + "transcript": "Dus we zoeken niet naar één schitterende zin die ieders leven verklaart. Geen universele handleiding met een ontbrekende bladzijde en zo een onmogelijk klein schroevendraertje.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 1, + "index": 5, + "speaker": "S2", + "text": "Gelukkig hoef je niets in elkaar te zetten. Volgens Frankl ontdekken mensen betekenis in concrete situaties. Wat vanochtend voor jou telt, kan heel anders zijn dan wat tien jaar geleden belangrijk was.", + "seed": 202631080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.03125, + "transcript": "Gelukkig hoef je niets in elkaar te zetten. Volgens Frankel ontdekken mensen betekenis in concrete situaties. Wat vanochtend voor jou telt, kan heel anders zijn dan wat tien jaar geleden belangrijk was.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 6, + "speaker": "S1", + "text": "Dat klinkt vriendelijker dan één perfecte roeping moeten vinden. Stel dat iemand een middag een buur helpt om boodschappen te dragen. Er gebeurt niets spectaculairs. Maar iemand komt thuis en voelt zich minder alleen.", + "seed": 202631080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.29411764705882354, + "transcript": "Dat klinkt vriendelijker dan één perfecte roeping moeten vinden. Stel dat iemand een middag een buur helpt om boodschappen te dragen. Er gebeurt niets spectaculairs, maar iemand komt thuis en voelt zich minder alleen. Mijn aal een zee. Daar ziet goed, zeerlyhem dadelijk zoft.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 1, + "index": 7, + "speaker": "S2", + "text": "Dat past bij een van Frankls wegen: wat we geven door ons handelen. Een andere is wat we ontvangen door ervaringen, schoonheid of liefde. Betekenis vraagt niet altijd dat we iets produceren.", + "seed": 202631080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0625, + "transcript": "Dat past bij een van Frankl's wegen wat we geven door ons handelen. Een andere is wat we ontvangen door ervaringen, schoonheid of liefde. Betekenis vraagt niet altijd dat we iets produceren.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 8, + "speaker": "S1", + "text": "Naar een lied luisteren zonder op mijn telefoon te kijken. De dwaze moed zien van een bloem die tussen de stoeptegels groeit. Echt naar iemand luisteren, in plaats van ondertussen mijn slimme antwoord te bedenken.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.02857142857142857, + "transcript": "Naar een lied luisteren zonder op mijn telefoon te kijken, de dwaze moet zien van een bloem die tussen de stoeptegels groeit. Echt naar iemand luisteren, in plaats van ondertussen mijn slimme antwoord te bedenken.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 9, + "speaker": "S2", + "text": "Mijn slimme antwoorden staan op een wachtlijst. Maar ja. Aandacht kan een vorm van vrijgevigheid zijn. Je hoeft niet iemands hele leven op te lossen om ruimte te maken in het jouwe.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.15625, + "transcript": "Maar slimme antwoorden, dus dat staan op mijn wachtlijst. Maar ja, aandacht kan een vorm van vrijgevigheid zijn. Je hoeft niet iemands hele leven nijven op te lossen om ruimte te maken in het jouwe.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 1, + "index": 10, + "speaker": "S1", + "text": "Nu het moeilijke deel. Hoe zit het met verdriet? Als degene die je wilt bellen er niet meer is, en een gewoon geluid in de keuken je die persoon ineens verschrikkelijk laat missen?", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.30303030303030304, + "transcript": "Nu het moeite deel. Hoe zit het met verdriet als degene die je wilt bellen er niet meer is en een gewoon geluid in de keuken je die persoon ineens verschrikkelijk laat missen. Tabe, hoe zit het om klicht op? En trouwend.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 1, + "index": 11, + "speaker": "S2", + "text": "Dan zou ik niet meteen met een les aankomen. Frankls derde weg gaat over onze houding tegenover onvermijdelijk lijden. Het is een mogelijkheid, geen verplichting om dankbaar te zijn voor pijn.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.03225806451612903, + "transcript": "Dan zou ik niet meteen met een les aankomen. Frankels derde weg gaat over onze houding tegenover onvermijdelijk lijden. Het is een mogelijkheid geen verplichting om dankbaar te zijn voor pijn.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 12, + "speaker": "S1", + "text": "En lijden dat we kunnen veranderen, moeten we veranderen. Vraag om hulp, verlaat de schadelijke situatie, deel de last. We zijn de wereld geen mooie verklaring schuldig voor alles wat pijn doet.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.125, + "transcript": "In lijden dat we kunnen veranderen? Moeten we veranderen? Vraag om hulp, verlaat de schadelijke situatie, deel de last. We zijn de wereld geen mooie verklaring schuldig voor alles wat pijn aan doet. Graag sim!", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 1, + "index": 13, + "speaker": "S2", + "text": "Precies. Soms is de betekenisvolle daad iemand naast je laten zitten. Of zeggen: vandaag is moeilijk. Een leven verliest zijn waarde niet doordat degene die het leeft uitgeput is.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Precies, soms is de betekenisvolle daad iemand naast je laten zitten of zeggen vandaag is moeilijk. Een leven verliest zijn waarde niet, doordat degene die het leeft uitgeput is.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 14, + "speaker": "S1", + "text": "Stel je een vader voor die zijn kind leert een fiets te repareren. Jaren later is het kind de uitleg vergeten. Maar zijn geduld blijft bij. Het gevoel dat fouten maken mocht.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Stel je een vader voor die zijn kind leert een fiets te repareren. Jaren later is het kind de uitleg vergeten. Maar zijn geduld blijft bij, het gevoel dat fouten maken mocht.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 15, + "speaker": "S2", + "text": "Dat is een mooie gedachte. Wat van ons blijft, is misschien een manier om mensen te behandelen. Een beetje meer geduld dat door de wereld reist, lang nadat de fiets is verroest.", + "seed": 202631328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.03125, + "transcript": "Dat is een mooie gedachte. Wat van ons blijft, is misschien een manier om mensen te behandelen, een beetje meer geduld dat door de wereld reist, lang nadat de fiets is veroest.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 16, + "speaker": "S1", + "text": "Misschien blijft het een mysterie. We kunnen anders denken over het universum en toch een moment herkennen dat om zorg vraagt. We hoeven niet overal zeker van te zijn om ergens van te houden.", + "seed": 202631576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.38235294117647056, + "transcript": "Misschien blijft het een mysterie. We kunnen anders denken over het universum en toch een moment herkennen dat om zorg vraagt. We hoeven niet overal zeker van te zijn om ergens van te houden. We hoeven niet overal zeker van te zijn om ergens van te houden.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "nl", + "n": 1, + "index": 17, + "speaker": "S2", + "text": "En zorg kan klein zijn. Een telefoontje dat je blijft uitstellen. Iets met aandacht maken. Je excuses aanbieden zonder uitvluchten. Dit zijn onze voorbeelden, geen lijstje dat Frankl ons heeft nagelaten.", + "seed": 202631576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.06451612903225806, + "transcript": "En zorg kan klein zijn: een telefoontje dat je blijft uitstellen, iets met aandacht maken, je excuses aanbieden zonder uitvluchten. Dit zijn onze voorbeelden. Geen lijstje dat Franklons heeft nagelaten.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 18, + "speaker": "S1", + "text": "Vraag je vandaag misschien af: wie of wat verdient mijn aandacht? Niet voor altijd. Alleen vandaag. En als het antwoord rust is, of iemand toelaten om te helpen, kan dat een eerlijk begin zijn.", + "seed": 202631576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Vraag je vandaag misschien af wie of wat verdient mijn aandacht? Niet voor altijd, alleen vandaag. En als het antwoord rust is of iemand toelaten om te helpen, kan dat een eerlijk begin zijn.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "nl", + "n": 1, + "index": 19, + "speaker": "S2", + "text": "We hebben de zin van het leven niet opgelost. Maar we hebben iemand om de vraag mee te delen. En nog twee koekjes. Laten we voor allebei de tijd nemen.", + "seed": 202631576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.23333333333333334, + "transcript": "We hebben de zin van het leven niet opgelost, maar we hebben iemand om de vraag mee te delen. En nog twee koekjes. Laten we voor allebei de tijd nemen. Je hebt voor allebei de tijd nemen.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 1, + "index": 0, + "speaker": "S1", + "text": "Bienvenue dans Petites questions, grandes émotions. Aujourd’hui, le sens de la vie. Idris, j’espérais une réponse claire. De préférence quelque chose dont je puisse me souvenir en cherchant mes clés.", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.625, + "transcript": "Idri j'espère une reponse clear. The preference quelque chose dont je peux me souvenir en cherchant mes clés.", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 1, + "speaker": "S2", + "text": "J’ai apporté des biscuits. Ce n’est pas une philosophie complète, mais ils rendent l’incertitude bien plus accueillante. On pourrait commencer plus modestement que par expliquer tout l’univers avant le thé.", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.058823529411764705, + "transcript": "J'ai apporté des biscuits. Ce n'est pas une philosophie complète, mais y rendent l'incertitude bien plus accueillant. On pourrait commencer plus modestement que par expliquer tout l'univers avant le thé.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 2, + "speaker": "S1", + "text": "D’accord. Pourquoi un après-midi ordinaire semble-t-il parfois si précieux, alors qu’une journée pleine de réussites peut laisser un étrange vide ? Quelle différence entre être occupé et se sentir vivant ?", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.29411764705882354, + "transcript": "D'accord. Pourquoi un après-midi ordinaire semble-t-il parfois si précieux, alors qu'une journée pleine de réussite peut laisser un étrange vide ? Quelle différence entre être occupé et se sentir vivant ? Quelle différence entre être occupé et se sentir vivant ?", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 1, + "index": 3, + "speaker": "S2", + "text": "Viktor Frankl, le psychiatre autrichien, plaçait la recherche de sens au cœur de son approche. Sa question dépasse le plaisir ou la réussite : qu’est-ce qui compte assez pour nous appeler à agir ?", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.058823529411764705, + "transcript": "Victor Franklin, le psychiatre autrichien, plaçait la recherche de sens au cœur de son approche. Sa question dépasse le plaisir ou la réussite. Qu'est-ce qui compte assez pour nous appeler à agir ?", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 1, + "index": 4, + "speaker": "S1", + "text": "Donc, on ne cherche pas une phrase magnifique qui expliquerait la vie de tout le monde ? Pas de mode d’emploi universel, avec une page manquante et un minuscule tournevis impossible à utiliser ?", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.06060606060606061, + "transcript": "Donc on ne cherche pas une phrase magnifique qui expliquerait la vie de tout le monde ? Pas de mode d'emploi universel, avec une page manquante et un minuscule tourné vis impossible à utiliser.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 5, + "speaker": "S2", + "text": "Heureusement, aucun montage à prévoir. Pour Frankl, le sens se découvre dans des situations précises, par des personnes précises. Ce qui compte pour toi ce matin peut différer de ce qui comptait il y a dix ans.", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.02702702702702703, + "transcript": "Heureusement, aucun montage à prévoir. Pour Frankel, le sens se découvre dans des situations précises, par des personnes précises. Ce qui compte pour toi ce matin peut différer de ce qui comptait il y a dix ans.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 6, + "speaker": "S1", + "text": "C’est plus doux que de devoir trouver une vocation parfaite. Imaginons quelqu’un qui aide un voisin à porter ses courses. Rien de spectaculaire ne se passe. Mais quelqu’un rentre chez lui en se sentant moins seul.", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "C'est plus doux que de devoir trouver une vocation parfaite. Imaginons quelqu'un qui aide un voisin à porter ses courses. Rien de spectaculaire ne se passe, mais quelqu'un rentre chez lui en se sentant moins seul.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 7, + "speaker": "S2", + "text": "Cela rejoint une des voies de Frankl : ce que nous apportons par nos actes. Une autre est ce que nous recevons à travers l’expérience, la beauté ou l’amour. Le sens n’exige pas toujours de produire quelque chose.", + "seed": 202641080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.075, + "transcript": "Cla rejoint une des voix de Frankel, ce que nous apportons par nos actes. Une autre est ce que nous recevons à travers l'expérience, la beauté ou l'amour. Le sens n'exige pas toujours de produire quelque chose.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 1, + "index": 8, + "speaker": "S1", + "text": "Écouter une chanson sans regarder mon téléphone. Remarquer le courage un peu fou d’une fleur qui pousse entre les pavés. Vraiment écouter quelqu’un, au lieu de préparer en silence ma brillante réponse.", + "seed": 202641328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.058823529411764705, + "transcript": "Écoutez une chanson sans regarder mon téléphone. Remarquez le courage un peu fou d'une fleur qui pousse entre les pavés. Vraiment écouter quelqu'un au lieu de préparer en silence ma brillante réponse.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 9, + "speaker": "S2", + "text": "Mes brillantes réponses ont une liste d’attente. Mais oui. L’attention peut être une forme de générosité. Pas besoin de réparer toute la vie de quelqu’un pour lui faire une place dans la nôtre.", + "seed": 202641328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.16666666666666666, + "transcript": "Mes brillantes réponses ont une liste d'attentes. Mais oui, l'attention peut être une forme de générosité, pas besoin de réparer toute la vie de qu'il faut pour lire une place dans la nôtre.", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 10, + "speaker": "S1", + "text": "Voici la partie difficile. Et le deuil ? Quand la personne qu’on voudrait appeler n’est plus là, et qu’un simple bruit dans la cuisine nous la fait soudain terriblement regretter ?", + "seed": 202641328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.09375, + "transcript": "Voici la partie difficile. Et le deuil? Quand la personne qu'on voudrait appeler n'est plus là, et qu'un simple bruit dans la cuisine nous l'a fait soudain et terriblement regretter.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 11, + "speaker": "S2", + "text": "Je ne me précipiterais pas avec une leçon. La troisième voie de Frankl concerne notre attitude face à une souffrance inévitable. C’est une possibilité, pas une obligation d’éprouver de la gratitude pour la douleur.", + "seed": 202641328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.25, + "transcript": "La troisième voie de Frankel concerne notre attitude face à une souffrance inévitable. C'est une possibilité, pas une obligation d'éprouver de la gratitude pour la douleur.", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 12, + "speaker": "S1", + "text": "Et la souffrance qu’on peut changer doit être changée. Demander de l’aide, quitter une situation nocive, partager le fardeau. Nous ne devons pas au monde une belle explication pour tout ce qui nous fait mal.", + "seed": 202641328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Et la souffrance qu'on peut changer doit être changée. Demander de l'aide, quitter une situation nocive, partager le fardeau. Nous ne devons pas au monde une belle explication pour tout ce qui nous fait mal.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 13, + "speaker": "S2", + "text": "Exactement. Parfois, ce qui a du sens, c’est laisser quelqu’un s’asseoir près de nous. Ou dire : aujourd’hui, c’est difficile. Une vie ne perd pas sa valeur parce que la personne qui la vit est épuisée.", + "seed": 202641328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 1.0, + "transcript": "Exactly.", + "review_required": true, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": false + } + }, + { + "language": "fr", + "n": 1, + "index": 14, + "speaker": "S1", + "text": "Imagine un père qui apprend à son enfant à réparer un vélo. Des années plus tard, l’enfant a oublié les instructions. Mais il se souvient de sa patience. Du sentiment qu’il avait le droit de se tromper.", + "seed": 202641328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Imagine un père qui apprend à son enfant à réparer un vélo. Des années plus tard, l'enfant a oublié les instructions. Mais il se souvient de sa patience, du sentiment qu'il avait le droit de se tromper.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 15, + "speaker": "S2", + "text": "C’est une belle pensée. Ce qui nous survit, c’est peut-être une façon de traiter les autres. Un peu plus de patience qui traverse le monde, longtemps après que le vélo a rouillé.", + "seed": 202641328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "C'est une belle pensée. Ce qui nous survit, c'est peut-être une façon de traiter les autres. Un peu plus de patience qui traverse le monde longtemps après que le vélo a rouillé.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 16, + "speaker": "S1", + "text": "Peut-être que le mystère demeure. On peut être en désaccord sur l’univers et reconnaître un moment qui demande de l’attention. Pas besoin d’être sûr de tout avant de pouvoir aimer quelque chose.", + "seed": 202641576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Peut-être que le mystère demeure, on peut être en désaccord sur l'univers et reconnaître un moment qui demande de l'attention. Pas besoin d'être sûr de tout avant de pouvoir aimer quelque chose.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 17, + "speaker": "S2", + "text": "Et cette attention peut être modeste. Un appel qu’on repousse. Une chose faite avec soin. Des excuses sans prétexte. Ce sont nos exemples, pas une liste de consignes laissée par Frankl.", + "seed": 202641576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0625, + "transcript": "Et cette attention peut être modeste, un appel qu'on repousse, une chose faite avec soin, des excuses sans prétexte ? Ce sont nos exemples, pas une liste de consignes laissées par Franklin.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 18, + "speaker": "S1", + "text": "Pour aujourd’hui, demandons-nous peut-être : qui ou quoi mérite mon attention ? Pas pour toujours. Juste aujourd’hui. Et si la réponse est le repos, ou accepter de l’aide, cela peut être un début sincère.", + "seed": 202641576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Pour aujourd'hui, demandons-nous peut-être qui ou quoi mérite mon attention, pas pour toujours, juste aujourd'hui. Et si la réponse est le repos ou accepter de l'aide, cela peut être un début sincère.", + "review_required": false, + "alignment_method": "parakeet_tdt_boundaries", + "alignment_ok": true + } + }, + { + "language": "fr", + "n": 1, + "index": 19, + "speaker": "S2", + "text": "Nous n’avons pas résolu le sens de la vie. Mais nous avons quelqu’un avec qui partager la question. Et encore deux biscuits. Prenons notre temps pour les deux.", + "seed": 202641576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.06666666666666667, + "transcript": "Nous n'avons pas résolu le sens de la vie, mais nous avons quelqu'un avec qui partager la question. Et encore deux biscuits. Prenons notre d'un pour les deux.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 0, + "speaker": "S1", + "text": "Bienvenidos a Pequeñas preguntas, grandes emociones. Hoy, el sentido de la vida. Idris, esperaba una respuesta clara. Preferiblemente algo que pueda recordar mientras busco mis llaves.", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.15384615384615385, + "transcript": "Bienvenidos a Pequeñas Preguntas, Grandes Emociones. Hoy el sentido de la vida. ¿Y sips? Y Daris esperaba una respuesta clara. Preferiblemente algo que pueda recordar mientras busco mis llaves.", + "review_required": true, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 1, + "speaker": "S2", + "text": "He traído galletas. No son una filosofía completa, pero hacen que la incertidumbre resulte mucho más acogedora. Quizá convenga empezar por algo más pequeño que explicar todo el universo antes del té.", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "He traído galletas. No son una filosofía completa, pero hacen que la incertidumbre resulte mucho más acogedora. Quizá convenga empezar por algo más pequeño que explicar todo el universo antes del té.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 2, + "speaker": "S1", + "text": "De acuerdo. ¿Por qué una tarde corriente a veces parece tan valiosa, mientras que un día lleno de logros puede dejarnos un extraño vacío? ¿Qué diferencia hay entre estar ocupado y sentirse vivo?", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.06060606060606061, + "transcript": "De acuerdo. Porque una tarde corriente a veces parece tan valiosa, mientras que un día lleno de logros puede dejarnos un extraño vacío. ¿Qué diferencia hay entre estar ocupado y sentirse vivo?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 3, + "speaker": "S2", + "text": "Viktor Frankl, el psiquiatra austriaco, puso la búsqueda de sentido en el centro de su enfoque. Su pregunta va más allá del placer o del éxito: ¿qué importa tanto como para responder a ello?", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.058823529411764705, + "transcript": "Víctor Frankel, el psiquiatra austriaco, puso la búsqueda de sentido en el centro de su enfoque. Su pregunta va más allá del placer o del éxito. ¿Qué importa tanto como para responder a ello?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 4, + "speaker": "S1", + "text": "Entonces, ¿no buscamos una frase magnífica que explique la vida de todo el mundo? ¿No hay un manual universal, con una página perdida y un destornillador diminuto imposible de usar?", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Entonces, ¿no buscamos una frase magnífica que explique la vida de todo el mundo? ¿No hay un manual universal con una página perdida y un destornillador diminuto, imposible de usar?", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 5, + "speaker": "S2", + "text": "Por suerte, no hay que montar nada. Para Frankl, el sentido se descubre en situaciones concretas, por personas concretas. Lo que te importa esta mañana puede ser muy distinto de lo que importaba hace diez años.", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.027777777777777776, + "transcript": "Por suerte no hay que montar nada. Para Frankl, el sentido se descubre en situaciones concretas por personas concretas. Lo que te importa esta mañana puede ser muy distinto de lo que importaba hace 10 años.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 6, + "speaker": "S1", + "text": "Suena más amable que tener que encontrar una vocación perfecta. Imagina que alguien pasa la tarde ayudando a un vecino a llevar la compra. No sucede nada espectacular. Pero alguien llega a casa sintiéndose menos solo.", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Suena más amable que tener que encontrar una vocación perfecta. Imagina que alguien pasa la tarde ayudando a un vecino a llevar la compra. No sucede nada espectacular, pero alguien llega a casa sintiéndose menos solo.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 7, + "speaker": "S2", + "text": "Eso encaja con una de las vías de Frankl: lo que damos mediante nuestros actos. Otra es lo que recibimos a través de la experiencia, la belleza o el amor. El sentido no siempre exige producir algo.", + "seed": 202651080, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.05405405405405406, + "transcript": "Eso encaja con una de las vías de Frankfurt, lo que damos mediante nuestros actos. Otra es lo que recibimos a través de la experiencia, la belleza o el amor shellena. El sentido no siempre exige producir algo.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 8, + "speaker": "S1", + "text": "Escuchar una canción sin mirar el móvil. Fijarme en el valor absurdo de una flor que crece entre las baldosas. Escuchar de verdad a alguien, en vez de preparar en silencio mi respuesta ingeniosa.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Escuchar una canción sin mirar el móvil, fijarme en el valor absurdo de una flor que crece entre las baldosas. Escuchar de verdad a alguien en vez de preparar en silencio mi respuesta ingeniosa.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 9, + "speaker": "S2", + "text": "Mis respuestas ingeniosas tienen lista de espera. Pero sí. La atención puede ser una forma de generosidad. No hace falta arreglarle toda la vida a alguien para hacerle un hueco en la nuestra.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Mis respuestas ingeniosas tienen lista de espera, pero sí, la atención puede ser una forma de generosidad. No hace falta arreglarle toda la vida a alguien para hacerle un hueco en la nuestra.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 10, + "speaker": "S1", + "text": "Esta es la parte difícil. ¿Y el duelo? Cuando la persona a la que quieres llamar ya no está, y un ruido cualquiera en la cocina hace que de pronto la eches muchísimo de menos.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Esta es la parte difícil. Y el duelo, cuando la persona a la que quieres llamar ya no está, y un ruido cualquiera en la cocina hace que de pronto la eches muchísimo de menos.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 11, + "speaker": "S2", + "text": "Entonces no me apresuraría a dar una lección. La tercera vía de Frankl trata de nuestra actitud ante el sufrimiento inevitable. Es una posibilidad, no una obligación de sentir gratitud por el dolor.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Entonces no me apresuraría a dar una lección. La tercera vía de Frankl trata de nuestra actitud ante el sufrimiento inevitable. Es una posibilidad, no una obligación de sentir gratitud por el dolor.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 12, + "speaker": "S1", + "text": "Y el sufrimiento que podemos cambiar debe cambiarse. Pedir ayuda, salir de una situación dañina, compartir la carga. No le debemos al mundo una explicación hermosa para todo lo que nos duele.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Y el sufrimiento que podemos cambiar debe cambiarse. Pedir ayuda, salir de una situación dañina, compartir la carga. No le debemos al mundo una explicación hermosa para todo lo que nos duele.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 13, + "speaker": "S2", + "text": "Exacto. A veces, el acto que tiene sentido es dejar que alguien se siente a tu lado. O decir: hoy es difícil. Una vida no pierde su valor porque quien la vive esté agotado.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Exacto. A veces el acto que tiene sentido es dejar que alguien se siente a tu lado. O decir, hoy es difícil. Una vida no pierde su valor porque quien la vive esté agotado.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 14, + "speaker": "S1", + "text": "Imagina a un padre enseñando a su hijo a reparar una bicicleta. Años después, el niño ya no recuerda las instrucciones. Pero recuerda su paciencia. La sensación de que estaba permitido equivocarse.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Imagina a un padre enseñando a su hijo a reparar una bicicleta. Años después, el niño ya no recuerda las instrucciones. Pero recuerda su paciencia, la sensación de que estaba permitido equivocarse.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 15, + "speaker": "S2", + "text": "Es una idea preciosa. Lo que nos sobrevive quizá sea una forma de tratar a los demás. Un poco más de paciencia viajando por el mundo, mucho después de que la bicicleta se haya oxidado.", + "seed": 202651328, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.02857142857142857, + "transcript": "Es una idea preciosa. Lo que nos sobrevive quizás sea una forma de tratar a los demás. Un poco más de paciencia viajando por el mundo, mucho después de que la bicicleta se haya oxidado.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 16, + "speaker": "S1", + "text": "Quizá el misterio permanezca. Podemos discrepar sobre el universo y aun así reconocer un momento que necesita cuidado. No hace falta tener certeza sobre todo antes de poder amar algo.", + "seed": 202651576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.03333333333333333, + "transcript": "Quizá el misterio permanezca, podemos discrepar sobre el universo y aún así reconocer un momento que necesita cuidado. No hace falta tener certeza sobre todo antes de poder amar algo.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 17, + "speaker": "S2", + "text": "Y ese cuidado puede ser modesto. Una llamada que sigues aplazando. Algo que haces con atención. Una disculpa sin excusas. Son nuestros ejemplos, no una lista que nos haya dejado Frankl.", + "seed": 202651576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Y ese cuidado puede ser modesto, una llamada que sigues aplazando, algo que haces con atención, una disculpa sin excusas. Son nuestros ejemplos, no una lista que nos haya dejado Frankl.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 18, + "speaker": "S1", + "text": "Por hoy, quizá podemos preguntarnos: ¿quién o qué merece mi atención? No para siempre. Solo hoy. Y si la respuesta es descansar, o dejar que alguien ayude, eso puede ser un comienzo sincero.", + "seed": 202651576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "Por hoy quizá podemos preguntarnos quién o qué merece mi atención. No para siempre, solo hoy. Y si la respuesta es descansar o dejar que alguien ayude, eso puede ser un comienzo sincero.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + }, + { + "language": "es", + "n": 1, + "index": 19, + "speaker": "S2", + "text": "No hemos resuelto el sentido de la vida. Pero tenemos a alguien con quien compartir la pregunta. Y quedan dos galletas. Tomémonos nuestro tiempo con las dos cosas.", + "seed": 202651576, + "winner": 0, + "candidates": [ + { + "reward": null, + "genuineness": null, + "ecapa_cosine": null, + "ranking_skipped": true + } + ], + "audit": { + "wer": 0.0, + "transcript": "No hemos resuelto el sentido de la vida, pero tenemos a alguien con quien compartir la pregunta y quedan dos galletas. Tomémonos nuestro tiempo con las dos cosas.", + "review_required": false, + "alignment_method": "qwen_forced_alignment", + "alignment_ok": true + } + } +] \ No newline at end of file diff --git a/optimized_pipeline/benchmarks/five-language-extension-2026-11-08.json b/optimized_pipeline/benchmarks/five-language-extension-2026-11-08.json new file mode 100644 index 0000000000000000000000000000000000000000..6d82686c0ef4f687e495f4be1a565e5d4b878408 --- /dev/null +++ b/optimized_pipeline/benchmarks/five-language-extension-2026-11-08.json @@ -0,0 +1,660 @@ +{ + "model": "laion/Humanness-Voice-Podcast", + "weight_revision": "91f8110cd815f2233301a8b1dd16dbbf3fae8e05", + "space": "https://huggingface.co/spaces/laion/Humanness-Voice-Podcast", + "hardware": "one RTX 3090 24 GB; unrelated concurrent jobs", + "recipe": "spontaneous; temperature 1.0; CFG 2.5; fixed German reference pair; no VC", + "reward": "0.5*clip(Ears genuineness/6,0,1)+0.5*clip(ECAPA reference cosine,0,1)", + "notes": [ + "N1 keeps its sole take; no retries. N2/N4 keep strict reward winners; no WER gate.", + "Same translated twenty-turn script; independent N runs, not nested subsets.", + "Production stage sums exclude loading, tests, final audit and export. Different GPU loads prevent a controlled speed comparison.", + "French transcript checks show possible omissions/language drift. ASR is fallible. Dutch timing fallback is conservative; uncertain clips stay untrimmed." + ], + "generation": { + "n": [ + 4, + 2, + 1 + ], + "policy_load_seconds": 27.118900053203106, + "decoder_judge_load_seconds": 14.21089393645525, + "generation_job_seconds": 1457.9602545276284, + "phased": true, + "concurrent_unrelated_training": true, + "note": "Policy and codec/judges do not occupy VRAM together. Policy batch size is recorded per mode. Not hardware-load matched to prior N4." + }, + "experiment_start_to_exports_seconds": 2363.669922351837, + "episodes": [ + { + "language": "nl", + "seconds": 303.0, + "sha256": "c560d072ccbb4ce32ef110fc98c3dd95f293ee0d98b0cf44c050a9204ca5ffe0", + "inference_seconds": 261.9452524036169, + "useful_rtf": 0.8646199247544789, + "mean_genuineness": 3.9688628691248597, + "mean_speaker_cosine": 0.3879923015832901, + "mean_wer": 0.14395649183174128, + "review_turns": [ + 1, + 3, + 6, + 7, + 8, + 9, + 12, + 16, + 17, + 19 + ], + "n": 4, + "transcript_review_turns": [ + 1, + 3, + 6, + 7, + 8, + 9, + 17, + 19 + ], + "boundary_review_turns": [ + 1, + 3, + 6, + 7, + 8, + 9, + 12, + 16, + 17, + 19 + ], + "alignment_methods": { + "parakeet_tdt_boundaries": 20 + }, + "policy_seconds": 230.71310384571552, + "codec_seconds": 19.885601796209812, + "ranking_seconds": 10.824075199663639 + }, + { + "language": "fr", + "seconds": 238.824, + "sha256": "e5a0be9087020dbfd69586a45e122e44df8fb2398a647e5b5b92c4148357058d", + "inference_seconds": 242.20176432281733, + "useful_rtf": 1.0142877185929784, + "mean_genuineness": 4.020954000065103, + "mean_speaker_cosine": 0.41977414190769197, + "mean_wer": 0.21870731745731747, + "review_turns": [ + 0, + 2, + 3, + 4, + 6, + 10, + 13, + 14 + ], + "n": 4, + "transcript_review_turns": [ + 0, + 2, + 3, + 4, + 6, + 10, + 13, + 14 + ], + "boundary_review_turns": [ + 2, + 3, + 10, + 13 + ], + "alignment_methods": { + "qwen_forced_alignment": 13, + "parakeet_tdt_boundaries": 7 + }, + "policy_seconds": 213.92478796094656, + "codec_seconds": 17.3532382696867, + "ranking_seconds": 10.429838933050632 + }, + { + "language": "es", + "seconds": 234.024, + "sha256": "df4cf05f63bbb58bbc8ed82eabd6af36894da97b804112ffc5a5732a3d08b3f7", + "inference_seconds": 250.40450843423605, + "useful_rtf": 1.0701504698245055, + "mean_genuineness": 4.007774316333235, + "mean_speaker_cosine": 0.4500871792435646, + "mean_wer": 0.021871521540639188, + "review_turns": [], + "n": 4, + "transcript_review_turns": [], + "boundary_review_turns": [], + "alignment_methods": { + "qwen_forced_alignment": 20 + }, + "policy_seconds": 221.61362106353045, + "codec_seconds": 17.644024215638638, + "ranking_seconds": 10.501801162958145 + }, + { + "language": "nl", + "seconds": 298.896, + "sha256": "b679b615e535bafa83da4d335d500510e0e6703af51d077823d146d9de2a85c6", + "inference_seconds": 134.25301806628704, + "useful_rtf": 0.4492020546267174, + "mean_genuineness": 3.8838225288549437, + "mean_speaker_cosine": 0.3524740368127823, + "mean_wer": 0.13502410527867736, + "review_turns": [ + 1, + 3, + 5, + 11, + 14, + 15, + 16, + 17 + ], + "n": 2, + "transcript_review_turns": [ + 1, + 11, + 14, + 16, + 17 + ], + "boundary_review_turns": [ + 1, + 3, + 5, + 11, + 14, + 15, + 16, + 17 + ], + "alignment_methods": { + "parakeet_tdt_boundaries": 20 + }, + "policy_seconds": 119.7192270681262, + "codec_seconds": 9.053111888468266, + "ranking_seconds": 5.071118600666523 + }, + { + "language": "fr", + "seconds": 231.624, + "sha256": "487f92bbf214ecda19ea7c4e3f7951596c7e5c2689a7901a19b006d04e0d6ace", + "inference_seconds": 131.61989970505238, + "useful_rtf": 0.5683315329032013, + "mean_genuineness": 4.031937069841661, + "mean_speaker_cosine": 0.38520742729306223, + "mean_wer": 0.14197506046770753, + "review_turns": [ + 3, + 9, + 10, + 12, + 13, + 17 + ], + "n": 2, + "transcript_review_turns": [ + 3, + 9, + 10, + 12, + 13, + 17 + ], + "boundary_review_turns": [ + 3, + 10, + 13 + ], + "alignment_methods": { + "qwen_forced_alignment": 13, + "parakeet_tdt_boundaries": 7 + }, + "policy_seconds": 115.83864893764257, + "codec_seconds": 9.318160854279995, + "ranking_seconds": 6.0951895117759705 + }, + { + "language": "es", + "seconds": 233.784, + "sha256": "4a428af8e16198b3369a45814dfd6767a5bde8c9b33085ec425b1583f3d16a0a", + "inference_seconds": 134.50516921281815, + "useful_rtf": 0.5754231837981525, + "mean_genuineness": 4.01812978212256, + "mean_speaker_cosine": 0.38512983471155166, + "mean_wer": 0.026223699380720254, + "review_turns": [], + "n": 2, + "transcript_review_turns": [], + "boundary_review_turns": [], + "alignment_methods": { + "qwen_forced_alignment": 20 + }, + "policy_seconds": 119.53472601622343, + "codec_seconds": 9.063777685165405, + "ranking_seconds": 5.543713726103306 + }, + { + "language": "nl", + "seconds": 280.824, + "sha256": "59bb1279c454e5576be7912b675405147019ee4336a7017d5c619b5218ef800d", + "inference_seconds": 73.28359555453062, + "useful_rtf": 0.2609814656500378, + "mean_genuineness": 3.8970022125868127, + "mean_speaker_cosine": 0.3331107281148434, + "mean_wer": 0.15130277312411466, + "review_turns": [ + 1, + 3, + 4, + 6, + 9, + 10, + 12, + 16, + 19 + ], + "n": 1, + "transcript_review_turns": [ + 3, + 6, + 9, + 10, + 16, + 19 + ], + "boundary_review_turns": [ + 1, + 3, + 4, + 6, + 9, + 10, + 12, + 16, + 19 + ], + "alignment_methods": { + "parakeet_tdt_boundaries": 20 + }, + "policy_seconds": 66.34472700208426, + "codec_seconds": 6.589471876621246, + "ranking_seconds": 0.0 + }, + { + "language": "fr", + "seconds": 238.104, + "sha256": "8b44533f0568dc46d4f560ed094853680825b2db05abe89cac20c2986d3157b2", + "inference_seconds": 65.73934520035982, + "useful_rtf": 0.27613452010064193, + "mean_genuineness": 3.9061024704016747, + "mean_speaker_cosine": 0.3622061058878899, + "mean_wer": 0.14489023281302693, + "review_turns": [ + 0, + 2, + 3, + 7, + 9, + 11, + 13 + ], + "n": 1, + "transcript_review_turns": [ + 0, + 2, + 9, + 11, + 13 + ], + "boundary_review_turns": [ + 2, + 3, + 7, + 13 + ], + "alignment_methods": { + "qwen_forced_alignment": 13, + "parakeet_tdt_boundaries": 7 + }, + "policy_seconds": 60.98202410340309, + "codec_seconds": 4.417067475616932, + "ranking_seconds": 0.0 + }, + { + "language": "es", + "seconds": 232.656, + "sha256": "9e700837e16eb251b05c98fb70d1d0cc08dd2386b67e1b392f8f174047b7f101", + "inference_seconds": 57.897149696946144, + "useful_rtf": 0.24888083951745754, + "mean_genuineness": 4.020012594084255, + "mean_speaker_cosine": 0.39191884845495223, + "mean_wer": 0.020850616880028646, + "review_turns": [ + 0 + ], + "n": 1, + "transcript_review_turns": [ + 0 + ], + "boundary_review_turns": [], + "alignment_methods": { + "qwen_forced_alignment": 20 + }, + "policy_seconds": 53.39876991510391, + "codec_seconds": 4.165548421442509, + "ranking_seconds": 0.0 + } + ], + "validation": [ + { + "passed": true, + "episodes": 3, + "turns": 60, + "candidates": 240, + "review_turns": [ + [ + "fr", + 0, + 0.75 + ], + [ + "fr", + 2, + 0.2647058823529412 + ], + [ + "fr", + 3, + 0.6470588235294118 + ], + [ + "fr", + 4, + 0.24242424242424243 + ], + [ + "fr", + 6, + 0.9230769230769231 + ], + [ + "fr", + 10, + 0.1875 + ], + [ + "fr", + 13, + 0.225 + ], + [ + "fr", + 14, + 0.7692307692307693 + ], + [ + "nl", + 1, + 0.17857142857142858 + ], + [ + "nl", + 3, + 0.16666666666666666 + ], + [ + "nl", + 6, + 0.4411764705882353 + ], + [ + "nl", + 7, + 0.3125 + ], + [ + "nl", + 8, + 0.6285714285714286 + ], + [ + "nl", + 9, + 0.1875 + ], + [ + "nl", + 12, + 0.03125 + ], + [ + "nl", + 16, + 0.11764705882352941 + ], + [ + "nl", + 17, + 0.1935483870967742 + ], + [ + "nl", + 19, + 0.16666666666666666 + ] + ], + "checks": [ + "pure 50/50 argmax; no WER gate", + "correct reference per speaker", + "selected PCM equals candidate", + "exact prompt and preserved transcript", + "MP3 hashes/format", + "400ms gaps", + "batch timing counted once", + "recorded prefill/token and decoder correctness checks" + ] + }, + { + "passed": true, + "episodes": 3, + "turns": 60, + "candidates": 120, + "review_turns": [ + [ + "fr", + 3, + 0.20588235294117646 + ], + [ + "fr", + 9, + 0.8888888888888888 + ], + [ + "fr", + 10, + 0.1875 + ], + [ + "fr", + 12, + 0.5675675675675675 + ], + [ + "fr", + 13, + 0.525 + ], + [ + "fr", + 17, + 0.15625 + ], + [ + "nl", + 1, + 0.17857142857142858 + ], + [ + "nl", + 3, + 0.06666666666666667 + ], + [ + "nl", + 5, + 0.0625 + ], + [ + "nl", + 11, + 0.16129032258064516 + ], + [ + "nl", + 14, + 0.15625 + ], + [ + "nl", + 15, + 0.0625 + ], + [ + "nl", + 16, + 0.7352941176470589 + ], + [ + "nl", + 17, + 1.0 + ] + ], + "checks": [ + "pure 50/50 argmax; no WER gate", + "correct reference per speaker", + "selected PCM equals candidate", + "exact prompt and preserved transcript", + "MP3 hashes/format", + "400ms gaps", + "batch timing counted once", + "recorded prefill/token and decoder correctness checks" + ] + }, + { + "passed": true, + "episodes": 3, + "turns": 60, + "candidates": 60, + "review_turns": [ + [ + "es", + 0, + 0.15384615384615385 + ], + [ + "fr", + 0, + 0.625 + ], + [ + "fr", + 2, + 0.29411764705882354 + ], + [ + "fr", + 3, + 0.058823529411764705 + ], + [ + "fr", + 7, + 0.075 + ], + [ + "fr", + 9, + 0.16666666666666666 + ], + [ + "fr", + 11, + 0.25 + ], + [ + "fr", + 13, + 1.0 + ], + [ + "nl", + 1, + 0.10714285714285714 + ], + [ + "nl", + 3, + 1.1 + ], + [ + "nl", + 4, + 0.04 + ], + [ + "nl", + 6, + 0.29411764705882354 + ], + [ + "nl", + 9, + 0.15625 + ], + [ + "nl", + 10, + 0.30303030303030304 + ], + [ + "nl", + 12, + 0.125 + ], + [ + "nl", + 16, + 0.38235294117647056 + ], + [ + "nl", + 19, + 0.23333333333333334 + ] + ], + "checks": [ + "pure 50/50 argmax; no WER gate", + "correct reference per speaker", + "selected PCM equals candidate", + "exact prompt and preserved transcript", + "MP3 hashes/format", + "400ms gaps", + "batch timing counted once", + "recorded prefill/token and decoder correctness checks" + ] + } + ] +} \ No newline at end of file diff --git a/optimized_pipeline/benchmarks/n-comparison-2026-11-08-turns.json b/optimized_pipeline/benchmarks/n-comparison-2026-11-08-turns.json new file mode 100644 index 0000000000000000000000000000000000000000..63ef296b74799d2a8bc2f9373e2a511fcb2b8e20 --- /dev/null +++ b/optimized_pipeline/benchmarks/n-comparison-2026-11-08-turns.json @@ -0,0 +1,3325 @@ +{ + "reward": "0.5*clip(Ears G/6,0,1)+0.5*clip(ECAPA cosine,0,1); N1 no selection", + "turns": [ + { + "n": 1, + "language": "de", + "turn": { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Willkommen bei Kleine Fragen, gro\u00dfe Gef\u00fchle. Heute geht es um den Sinn des Lebens. Idris, ich h\u00e4tte gern eine klare Antwort. Eine, die ich mir beim Schl\u00fcsselsuchen noch merken kann.", + "delivery_chunks": [ + { + "text": "Willkommen bei Kleine Fragen, gro\u00dfe Gef\u00fchle. Heute geht es um den Sinn des Lebens.", + "cue": "warm, intimate welcome; gently curious; easy, spontaneous, gently spoken" + }, + { + "text": "Idris, ich h\u00e4tte gern eine klare Antwort. Eine, die ich mir beim Schl\u00fcsselsuchen noch merken kann.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.39, + "final_audit": { + "genuineness_0_6": 3.8169827042147517, + "ecapa_cosine": 0.5958950519561768, + "wer": 0.1, + "asr": "Willkommen bei Kleine Fragen, gro\u00dfe Gef\u00fchle. Heute geht es um den Sinn des Lebens. Etris, ich h\u00e4tte gern eine klare Antwort. Eine, die ich mir beim Schl\u00fcssel suchen noch merken kann.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas br\u00f6selig, aber sie machen die Ungewissheit gem\u00fctlicher. M\u00fcssen wir wirklich das ganze Universum erkl\u00e4ren, bevor der Tee kalt wird?", + "delivery_chunks": [ + { + "text": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas br\u00f6selig, aber sie machen die Ungewissheit gem\u00fctlicher. M\u00fcssen wir wirklich das ganze Universum erkl\u00e4ren, bevor der Tee kalt wird?", + "cue": "affectionate dry humour; a small smile; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.71, + "final_audit": { + "genuineness_0_6": 3.8671910231932998, + "ecapa_cosine": 0.5536301732063293, + "wer": 0.0, + "asr": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas br\u00f6selig, aber sie machen die Ungewissheit gem\u00fctlicher. M\u00fcssen wir wirklich das ganze Universum erkl\u00e4ren, bevor der Tee kalt wird?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "Dann fangen wir kleiner an. Warum f\u00fchlt sich ein gew\u00f6hnlicher Nachmittag manchmal kostbar an, w\u00e4hrend ein Tag voller Erfolge seltsam leer bleibt? Was unterscheidet Besch\u00e4ftigung von einem erf\u00fcllten Leben?", + "delivery_chunks": [ + { + "text": "Dann fangen wir kleiner an. Warum f\u00fchlt sich ein gew\u00f6hnlicher Nachmittag manchmal kostbar an, w\u00e4hrend ein Tag voller Erfolge seltsam leer bleibt?", + "cue": "thoughtful, sincere; let the question land; soft natural delivery, thinking aloud" + }, + { + "text": "Was unterscheidet Besch\u00e4ftigung von einem erf\u00fcllten Leben?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 11.75, + "final_audit": { + "genuineness_0_6": 3.7542223054915667, + "ecapa_cosine": 0.6728452444076538, + "wer": 0.0, + "asr": "Dann fangen wir kleiner an. Warum f\u00fchlt sich ein gew\u00f6hnlicher Nachmittag manchmal kostbar an, w\u00e4hrend ein Tag voller Erfolge seltsam leer bleibt? Was unterscheidet Besch\u00e4ftigung von einem erf\u00fcllten Leben?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Der \u00f6sterreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergn\u00fcgen oder Erfolg: Was ist uns so wichtig, dass wir darauf antworten wollen?", + "delivery_chunks": [ + { + "text": "Der \u00f6sterreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergn\u00fcgen oder Erfolg: Was ist uns so wichtig, dass wir darauf antworten wollen?", + "cue": "engaged and clear, without lecturing; casual and sincere, unhurried" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 11.27, + "final_audit": { + "genuineness_0_6": 4.105680538341403, + "ecapa_cosine": 0.5431901216506958, + "wer": 0.0, + "asr": "Der \u00f6sterreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergn\u00fcgen oder Erfolg. Was ist uns so wichtig, dass wir darauf antworten wollen?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "Also suchen wir keinen einzigen gro\u00dfen Satz, der f\u00fcr alle Menschen stimmt? Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen?", + "delivery_chunks": [ + { + "text": "Also suchen wir keinen einzigen gro\u00dfen Satz, der f\u00fcr alle Menschen stimmt?", + "cue": "curious, gently challenging; gentle conversational flow, in the moment" + }, + { + "text": "Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 11.03, + "final_audit": { + "genuineness_0_6": 3.904847262427211, + "ecapa_cosine": 0.6273946762084961, + "wer": 0.0, + "asr": "Also suchen wir keinen einzigen gro\u00dfen Satz, der f\u00fcr alle Menschen stimmt. Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Zum Gl\u00fcck nicht. F\u00fcr Frankl l\u00e4sst sich Sinn in konkreten Situationen entdecken. Was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder ver\u00e4ndern.", + "delivery_chunks": [ + { + "text": "Zum Gl\u00fcck nicht. F\u00fcr Frankl l\u00e4sst sich Sinn in konkreten Situationen entdecken. Was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder ver\u00e4ndern.", + "cue": "lightly amused, then reflective; natural, lightly responsive, without performing" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.71, + "final_audit": { + "genuineness_0_6": 4.218649256043136, + "ecapa_cosine": 0.7186521291732788, + "wer": 0.03225806451612903, + "asr": "Zum Gl\u00fcck nicht. F\u00fcr Frankel l\u00e4sst sich Sinn in konkreten Situationen entdecken, was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder ver\u00e4ndern.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand tr\u00e4gt seiner Nachbarin die Eink\u00e4ufe hoch. Nichts Spektakul\u00e4res passiert. Aber sie schlie\u00dft ihre T\u00fcr und f\u00fchlt sich weniger allein.", + "delivery_chunks": [ + { + "text": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand tr\u00e4gt seiner Nachbarin die Eink\u00e4ufe hoch.", + "cue": "warm, quietly moved; easy, spontaneous, gently spoken" + }, + { + "text": "Nichts Spektakul\u00e4res passiert. Aber sie schlie\u00dft ihre T\u00fcr und f\u00fchlt sich weniger allein.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 11.35, + "final_audit": { + "genuineness_0_6": 3.7040139865130186, + "ecapa_cosine": 0.20465078949928284, + "wer": 0.0, + "asr": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand tr\u00e4gt seiner Nachbarin die Eink\u00e4ufe hoch. Nichts Spektakul\u00e4res passiert, aber sie schlie\u00dft ihre T\u00fcr und f\u00fchlt sich weniger allein.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "Das passt zu einem seiner Zug\u00e4nge: etwas tun, etwas beitragen. Ein anderer liegt im Erleben, in Sch\u00f6nheit und Liebe. Wir m\u00fcssen nicht st\u00e4ndig etwas herstellen, damit unser Leben Bedeutung hat.", + "delivery_chunks": [ + { + "text": "Das passt zu einem seiner Zug\u00e4nge: etwas tun, etwas beitragen. Ein anderer liegt im Erleben, in Sch\u00f6nheit und Liebe. Wir m\u00fcssen nicht st\u00e4ndig etwas herstellen, damit unser Leben Bedeutung hat.", + "cue": "natural explanation with gentle emphasis; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 12.15, + "final_audit": { + "genuineness_0_6": 3.9362274617888033, + "ecapa_cosine": 0.6111072301864624, + "wer": 0.0, + "asr": "Das passt zu einem seiner Zug\u00e4nge. Etwas tun, etwas beitragen. Ein anderer liegt im Erleben in Sch\u00f6nheit und Liebe. Wir m\u00fcssen nicht st\u00e4ndig etwas herstellen, damit unser Leben Bedeutung hat.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Ein Lied h\u00f6ren, ohne nebenbei aufs Handy zu schauen. Eine Blume zwischen Pflastersteinen entdecken. Jemandem wirklich zuh\u00f6ren, statt im Kopf schon die n\u00e4chste besonders schlaue Antwort vorzubereiten.", + "delivery_chunks": [ + { + "text": "Ein Lied h\u00f6ren, ohne nebenbei aufs Handy zu schauen. Eine Blume zwischen Pflastersteinen entdecken.", + "cue": "soft delight and recognition; soft natural delivery, thinking aloud" + }, + { + "text": "Jemandem wirklich zuh\u00f6ren, statt im Kopf schon die n\u00e4chste besonders schlaue Antwort vorzubereiten.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 11.43, + "final_audit": { + "genuineness_0_6": 3.7291181460022926, + "ecapa_cosine": 0.5408211350440979, + "wer": 0.0, + "asr": "Ein Lied h\u00f6ren, ohne nebenbei aufs Handy zu schauen, eine Blume zwischen Pflastersteinen entdecken. Jemandem wirklich zuh\u00f6ren, statt im Kopf schon die n\u00e4chste besonders schlaue Antwort vorzubereiten.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "Meine schlauen Antworten stehen grunds\u00e4tzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben.", + "delivery_chunks": [ + { + "text": "Meine schlauen Antworten stehen grunds\u00e4tzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben.", + "cue": "playful self-awareness, then tender; casual and sincere, unhurried" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 8.95, + "final_audit": { + "genuineness_0_6": 3.942503501661122, + "ecapa_cosine": 0.654215395450592, + "wer": 0.03333333333333333, + "asr": "Meine schlauen Antworten stehen grunds\u00e4tzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen Platz zu geben.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Und dann kommt die schwere Frage. Was ist mit Trauer? Wenn der Mensch fehlt, den man anrufen m\u00f6chte. Wenn ein vertrautes Ger\u00e4usch in der K\u00fcche pl\u00f6tzlich alles wieder aufrei\u00dft?", + "delivery_chunks": [ + { + "text": "Und dann kommt die schwere Frage. Was ist mit Trauer? Wenn der Mensch fehlt, den man anrufen m\u00f6chte.", + "cue": "slower, vulnerable but not theatrical; gentle conversational flow, in the moment" + }, + { + "text": "Wenn ein vertrautes Ger\u00e4usch in der K\u00fcche pl\u00f6tzlich alles wieder aufrei\u00dft?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.07, + "final_audit": { + "genuineness_0_6": 3.8860191428102553, + "ecapa_cosine": 0.6278485655784607, + "wer": 0.0, + "asr": "Und dann kommt die schwere Frage. Was ist mit Trauer, wenn der Mensch fehlt, den man anrufen m\u00f6chte? Wenn ein vertrautes Ger\u00e4usch in der K\u00fcche pl\u00f6tzlich alles wieder aufrei\u00dft.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Da w\u00fcrde ich nicht gleich mit einer Lebensweisheit kommen. Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine M\u00f6glichkeit, keine Pflicht, f\u00fcr den eigenen Schmerz auch noch dankbar zu sein.", + "delivery_chunks": [ + { + "text": "Da w\u00fcrde ich nicht gleich mit einer Lebensweisheit kommen. Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine M\u00f6glichkeit, keine Pflicht, f\u00fcr den eigenen Schmerz auch noch dankbar zu sein.", + "cue": "compassionate, grounded; a small pause before answering; natural, lightly responsive, without performing" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 12.23, + "final_audit": { + "genuineness_0_6": 3.8546389434486628, + "ecapa_cosine": 0.6531965732574463, + "wer": 0.0, + "asr": "Da w\u00fcrde ich nicht gleich mit einer Lebensweisheit kommen. Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine M\u00f6glichkeit, keine Pflicht, f\u00fcr den eigenen Schmerz auch noch dankbar zu sein.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "Und vermeidbares Leid d\u00fcrfen wir ver\u00e4ndern. Hilfe suchen, Belastungen teilen, eine sch\u00e4dliche Situation verlassen. Niemand schuldet der Welt eine sch\u00f6ne Erkl\u00e4rung f\u00fcr alles, was ihm wehgetan hat.", + "delivery_chunks": [ + { + "text": "Und vermeidbares Leid d\u00fcrfen wir ver\u00e4ndern. Hilfe suchen, Belastungen teilen, eine sch\u00e4dliche Situation verlassen.", + "cue": "firm but gentle; easy, spontaneous, gently spoken" + }, + { + "text": "Niemand schuldet der Welt eine sch\u00f6ne Erkl\u00e4rung f\u00fcr alles, was ihm wehgetan hat.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.63, + "final_audit": { + "genuineness_0_6": 3.7165660662576556, + "ecapa_cosine": 0.3521575927734375, + "wer": 0.0, + "asr": "Und vermeidbares Leid d\u00fcrfen wir ver\u00e4ndern. Hilfe suchen, Belastungen teilen, eine sch\u00e4dliche Situation verlassen. Niemand schuldet der Welt eine sch\u00f6ne Erkl\u00e4rung f\u00fcr alles, was ihm wehgetan hat.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Manchmal besteht der n\u00e4chste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen. Oder zu sagen: Heute ist es schwer. Ein ersch\u00f6pfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "delivery_chunks": [ + { + "text": "Manchmal besteht der n\u00e4chste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen. Oder zu sagen: Heute ist es schwer. Ein ersch\u00f6pfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "cue": "quiet reassurance, no grand speech; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 9.27, + "final_audit": { + "genuineness_0_6": 3.980159740895033, + "ecapa_cosine": 0.5926823019981384, + "wer": 0.0, + "asr": "Manchmal besteht der n\u00e4chste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen, oder zu sagen, heute ist es schwer. Ein ersch\u00f6pfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Sp\u00e4ter hat das Kind die Anleitung vergessen. Aber es erinnert sich an seine Geduld. Daran, dass Fehler erlaubt waren.", + "delivery_chunks": [ + { + "text": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Sp\u00e4ter hat das Kind die Anleitung vergessen.", + "cue": "tender, painting a simple imagined scene; soft natural delivery, thinking aloud" + }, + { + "text": "Aber es erinnert sich an seine Geduld. Daran, dass Fehler erlaubt waren.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 11.91, + "final_audit": { + "genuineness_0_6": 3.8483629035763443, + "ecapa_cosine": 0.6397361755371094, + "wer": 0.0, + "asr": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Sp\u00e4ter hat das Kind die Anleitung vergessen. Aber es erinnert sich an seine Geduld, daran, dass Fehler erlaubt waren.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "Das ber\u00fchrt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen. Ein bisschen mehr Geduld, die weiterwandert. Auch wenn das Fahrrad l\u00e4ngst rostet und niemand mehr an diese Stunde denkt.", + "delivery_chunks": [ + { + "text": "Das ber\u00fchrt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen. Ein bisschen mehr Geduld, die weiterwandert. Auch wenn das Fahrrad l\u00e4ngst rostet und niemand mehr an diese Stunde denkt.", + "cue": "gently moved, unhurried; casual and sincere, unhurried" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.71, + "final_audit": { + "genuineness_0_6": 4.143336777575314, + "ecapa_cosine": 0.47579139471054077, + "wer": 0.0, + "asr": "Das ber\u00fchrt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen, ein bisschen mehr Geduld, die weiterwandert. Auch wenn das Fahrrad l\u00e4ngst rostet und niemand mehr an diese Stunde denkt.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Vielleicht bleibt das gro\u00dfe R\u00e4tsel offen. Wir k\u00f6nnen \u00fcber die Welt verschieden denken und trotzdem sp\u00fcren, dass jetzt jemand Zuwendung braucht. Wir m\u00fcssen nicht alles wissen, bevor wir etwas lieben d\u00fcrfen.", + "delivery_chunks": [ + { + "text": "Vielleicht bleibt das gro\u00dfe R\u00e4tsel offen. Wir k\u00f6nnen \u00fcber die Welt verschieden denken und trotzdem sp\u00fcren, dass jetzt jemand Zuwendung braucht.", + "cue": "thoughtful, open rather than conclusive; gentle conversational flow, in the moment" + }, + { + "text": "Wir m\u00fcssen nicht alles wissen, bevor wir etwas lieben d\u00fcrfen.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.63, + "final_audit": { + "genuineness_0_6": 4.231201335787773, + "ecapa_cosine": 0.26107650995254517, + "wer": 0.0, + "asr": "Vielleicht bleibt das gro\u00dfe R\u00e4tsel offen. Wir k\u00f6nnen \u00fcber die Welt verschieden denken und trotzdem sp\u00fcren, dass jetzt jemand Zuwendung braucht. Wir m\u00fcssen nicht alles wissen, bevor wir etwas lieben d\u00fcrfen.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "Und Zuwendung darf klein anfangen. Ein aufgeschobener Anruf. Etwas sorgf\u00e4ltig Gemachtes. Eine Entschuldigung ohne Ausrede. Das sind unsere Beispiele, keine Aufgabenliste, die Frankl uns hinterlassen h\u00e4tte.", + "delivery_chunks": [ + { + "text": "Und Zuwendung darf klein anfangen. Ein aufgeschobener Anruf. Etwas sorgf\u00e4ltig Gemachtes. Eine Entschuldigung ohne Ausrede. Das sind unsere Beispiele, keine Aufgabenliste, die Frankl uns hinterlassen h\u00e4tte.", + "cue": "quiet conviction, conversational; natural, lightly responsive, without performing" + } + ] + }, + "winner": 0, + "seed": 202621576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 11.43, + "final_audit": { + "genuineness_0_6": 3.904847262427211, + "ecapa_cosine": 0.525681734085083, + "wer": 0.07692307692307693, + "asr": "Um Zuwendung darf Klein anfangen, ein aufgeschobener Anruf, etwas sorgf\u00e4ltig Gemachtes, eine Entschuldigung ohne Ausrede, das sind unsere Beispiele, keine Aufgabenliste, die Frankel uns hinterlassen h\u00e4tte.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "Vielleicht reicht f\u00fcr heute diese Frage: Wem oder was m\u00f6chte ich Aufmerksamkeit schenken? Nur heute. Und wenn die Antwort Ruhe hei\u00dft, oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "delivery_chunks": [ + { + "text": "Vielleicht reicht f\u00fcr heute diese Frage: Wem oder was m\u00f6chte ich Aufmerksamkeit schenken? Nur heute.", + "cue": "gentle invitation, with breathing space; easy, spontaneous, gently spoken" + }, + { + "text": "Und wenn die Antwort Ruhe hei\u00dft, oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 12.07, + "final_audit": { + "genuineness_0_6": 3.7040139865130186, + "ecapa_cosine": 0.54422527551651, + "wer": 0.0, + "asr": "Vielleicht reicht f\u00fcr heute diese Frage, wem oder was m\u00f6chte ich Aufmerksamkeit schenken? Nur heute. Und wenn die Antwort Ruhe hei\u00dft oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "de", + "turn": { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "Den Sinn des Lebens haben wir nicht gel\u00f6st. Aber wir k\u00f6nnen die Frage miteinander teilen. Und die letzten beiden Kekse. Nehmen wir uns f\u00fcr beides ein bisschen Zeit.", + "delivery_chunks": [ + { + "text": "Den Sinn des Lebens haben wir nicht gel\u00f6st. Aber wir k\u00f6nnen die Frage miteinander teilen. Und die letzten beiden Kekse. Nehmen wir uns f\u00fcr beides ein bisschen Zeit.", + "cue": "warm closing; a soft smile; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202621576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 8.79, + "final_audit": { + "genuineness_0_6": 4.080576378852129, + "ecapa_cosine": 0.6607828140258789, + "wer": 0.0, + "asr": "Den Sinn des Lebens haben wir nicht gel\u00f6st, aber wir k\u00f6nnen die Frage miteinander teilen. Und die letzten beiden Kekse. Nehmen wir uns f\u00fcr beides ein bisschen Zeit.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer. Preferably something I could remember while looking for my keys.", + "delivery_chunks": [ + { + "text": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer.", + "cue": "warm, intimate welcome; gently curious; easy, spontaneous, gently spoken" + }, + { + "text": "Preferably something I could remember while looking for my keys.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.07, + "final_audit": { + "genuineness_0_6": 3.6914619067683816, + "ecapa_cosine": 0.28063392639160156, + "wer": 0.0, + "asr": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer. Preferably something I could remember while looking for my keys.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller than explaining the entire universe before tea.", + "delivery_chunks": [ + { + "text": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller than explaining the entire universe before tea.", + "cue": "affectionate dry humour; a small smile; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.15, + "final_audit": { + "genuineness_0_6": 3.7542223054915667, + "ecapa_cosine": 0.46263402700424194, + "wer": 0.0, + "asr": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller, than explaining the entire universe before tea.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "All right. Why does an ordinary afternoon sometimes feel deeply worthwhile, while a day full of achievements can feel strangely empty? What is the difference between being busy and being alive?", + "delivery_chunks": [ + { + "text": "All right. Why does an ordinary afternoon sometimes feel deeply worthwhile, while a day full of achievements can feel strangely empty?", + "cue": "thoughtful, sincere; let the question land; soft natural delivery, thinking aloud" + }, + { + "text": "What is the difference between being busy and being alive?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 11.59, + "final_audit": { + "genuineness_0_6": 3.967607661150396, + "ecapa_cosine": 0.21194669604301453, + "wer": 0.03225806451612903, + "asr": "All right, why does an ordinary afternoon sus feel deeply worthwhile while a day full of achievements can feel strangely empty? What is the difference between being busy and being alive?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Viktor Frankl, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success: what matters enough for us to respond to it?", + "delivery_chunks": [ + { + "text": "Viktor Frankl, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success: what matters enough for us to respond to it?", + "cue": "engaged and clear, without lecturing; casual and sincere, unhurried" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 9.83, + "final_audit": { + "genuineness_0_6": 3.7291181460022926, + "ecapa_cosine": 0.466266930103302, + "wer": 0.03125, + "asr": "Viktor Frankel, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success. What matters enough for us to respond to it?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "So we are not hunting for one magnificent sentence that explains everybody's life? No universal instruction manual, with a missing page and an impossible little screwdriver?", + "delivery_chunks": [ + { + "text": "So we are not hunting for one magnificent sentence that explains everybody's life?", + "cue": "curious, gently challenging; gentle conversational flow, in the moment" + }, + { + "text": "No universal instruction manual, with a missing page and an impossible little screwdriver?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 9.51, + "final_audit": { + "genuineness_0_6": 3.8734670630656183, + "ecapa_cosine": 0.20231397449970245, + "wer": 0.0, + "asr": "So we are not hunting for one magnificent sentence that explains everybody's life? No universal instruction manual, with a missing page and an impossible little screwdriver?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Thankfully, no assembly required. For Frankl, meaning is discovered in particular situations, by particular people. What matters to you this morning might be very different from what mattered ten years ago.", + "delivery_chunks": [ + { + "text": "Thankfully, no assembly required. For Frankl, meaning is discovered in particular situations, by particular people. What matters to you this morning might be very different from what mattered ten years ago.", + "cue": "lightly amused, then reflective; natural, lightly responsive, without performing" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.31, + "final_audit": { + "genuineness_0_6": 3.7542223054915667, + "ecapa_cosine": 0.32249030470848083, + "wer": 0.03225806451612903, + "asr": "Thankfully, no assembly required. For Frankel, meaning is discovered in particular situations by particular people. What matters to you this morning might be very different from what mattered ten years ago.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping a neighbour carry groceries. Nothing impressive happens. But somebody gets home feeling less alone.", + "delivery_chunks": [ + { + "text": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping a neighbour carry groceries.", + "cue": "warm, quietly moved; easy, spontaneous, gently spoken" + }, + { + "text": "Nothing impressive happens. But somebody gets home feeling less alone.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 11.67, + "final_audit": { + "genuineness_0_6": 3.7793264649808407, + "ecapa_cosine": 0.27929258346557617, + "wer": 0.03333333333333333, + "asr": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping a neighbor carry groceries. Nothing impressive happens, but somebody gets home feeling less alone.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "That fits one of Frankl's avenues: what we give through our actions. Another is what we receive through experience, beauty, or love. Meaning does not always require us to produce something.", + "delivery_chunks": [ + { + "text": "That fits one of Frankl's avenues: what we give through our actions. Another is what we receive through experience, beauty, or love. Meaning does not always require us to produce something.", + "cue": "natural explanation with gentle emphasis; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.15, + "final_audit": { + "genuineness_0_6": 4.0491961794905365, + "ecapa_cosine": 0.42807501554489136, + "wer": 0.0625, + "asr": "That fits one of Frank Yahs avenues, what we give through our actions. Another is what we receive through experience, beauty, or love, meaning does not always require us to produce something.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Listening to a song without checking my phone. Noticing the ridiculous courage of a flower growing through the pavement. Really hearing someone, instead of silently preparing my clever reply.", + "delivery_chunks": [ + { + "text": "Listening to a song without checking my phone. Noticing the ridiculous courage of a flower growing through the pavement.", + "cue": "soft delight and recognition; soft natural delivery, thinking aloud" + }, + { + "text": "Really hearing someone, instead of silently preparing my clever reply.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.39, + "final_audit": { + "genuineness_0_6": 4.011539940256625, + "ecapa_cosine": 0.27899858355522156, + "wer": 0.0, + "asr": "Listening to a song without checking my phone, noticing the ridiculous courage of a flower growing through the pavement, really hearing someone instead of silently preparing my clever reply.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "My clever replies have a waiting list. But yes. Attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours.", + "delivery_chunks": [ + { + "text": "My clever replies have a waiting list. But yes. Attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours.", + "cue": "playful self-awareness, then tender; casual and sincere, unhurried" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 8.23, + "final_audit": { + "genuineness_0_6": 3.8295347839593887, + "ecapa_cosine": 0.25533562898635864, + "wer": 0.0, + "asr": "My clever replies have a waiting list, but yes, attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Here is the difficult part. What about grief? When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss them terribly?", + "delivery_chunks": [ + { + "text": "Here is the difficult part. What about grief?", + "cue": "slower, vulnerable but not theatrical; gentle conversational flow, in the moment" + }, + { + "text": "When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss them terribly?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 9.51, + "final_audit": { + "genuineness_0_6": 3.8860191428102553, + "ecapa_cosine": 0.37685427069664, + "wer": 0.06666666666666667, + "asr": "Here's the difficult part. What about grief? When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss M terribly.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Then I would not rush in with a lesson. Frankl's third avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain.", + "delivery_chunks": [ + { + "text": "Then I would not rush in with a lesson. Frankl's third avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain.", + "cue": "compassionate, grounded; a small pause before answering; natural, lightly responsive, without performing" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.39, + "final_audit": { + "genuineness_0_6": 3.8295347839593887, + "ecapa_cosine": 0.46487170457839966, + "wer": 0.030303030303030304, + "asr": "Then I would not rush in with a lesson. Frankel's Third Avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the burden. We do not owe the world a beautiful explanation for everything that hurts.", + "delivery_chunks": [ + { + "text": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the burden.", + "cue": "firm but gentle; easy, spontaneous, gently spoken" + }, + { + "text": "We do not owe the world a beautiful explanation for everything that hurts.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.63, + "final_audit": { + "genuineness_0_6": 3.5910452688112855, + "ecapa_cosine": 0.33559077978134155, + "wer": 0.0, + "asr": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the burden. We do not owe the world a beautiful explanation for everything that hurts.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Exactly. Sometimes the meaningful act is letting somebody sit beside you. Or saying, today is difficult. A life does not lose its worth because the person living it is exhausted.", + "delivery_chunks": [ + { + "text": "Exactly. Sometimes the meaningful act is letting somebody sit beside you. Or saying, today is difficult. A life does not lose its worth because the person living it is exhausted.", + "cue": "quiet reassurance, no grand speech; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 8.87, + "final_audit": { + "genuineness_0_6": 3.929951421916485, + "ecapa_cosine": 0.4311245083808899, + "wer": 0.0, + "asr": "Exactly. Sometimes the meaningful act is letting somebody sit beside you, or saying, today is difficult. A life does not lose its worth because the person living it is exhausted.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Imagine a father teaching his child to repair a bicycle. Years later, the child cannot remember the instructions. But they remember his patience. The feeling that mistakes were allowed.", + "delivery_chunks": [ + { + "text": "Imagine a father teaching his child to repair a bicycle. Years later, the child cannot remember the instructions.", + "cue": "tender, painting a simple imagined scene; soft natural delivery, thinking aloud" + }, + { + "text": "But they remember his patience. The feeling that mistakes were allowed.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 10.39, + "final_audit": { + "genuineness_0_6": 3.917399342171848, + "ecapa_cosine": 0.40068960189819336, + "wer": 0.0, + "asr": "Imagine a father teaching his child to repair a bicycle. Years later, the child cannot remember the instructions, but they remember his patience, the feeling that mistakes were allowed.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "That is a lovely thought. What survives us may be a way of treating people. A little more patience travelling through the world, long after the bicycle has rusted.", + "delivery_chunks": [ + { + "text": "That is a lovely thought. What survives us may be a way of treating people. A little more patience travelling through the world, long after the bicycle has rusted.", + "cue": "gently moved, unhurried; casual and sincere, unhurried" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 8.31, + "final_audit": { + "genuineness_0_6": 4.262581535149366, + "ecapa_cosine": 0.3851025104522705, + "wer": 0.06896551724137931, + "asr": "That is a lovely thought. What survives us may be a way of treating people. A little more patience traveling through the world long after the bicycle is rusted.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Maybe the mystery stays. We can disagree about the universe and still recognise a moment that asks for care. We do not need certainty about everything before we can love something.", + "delivery_chunks": [ + { + "text": "Maybe the mystery stays. We can disagree about the universe and still recognise a moment that asks for care.", + "cue": "thoughtful, open rather than conclusive; gentle conversational flow, in the moment" + }, + { + "text": "We do not need certainty about everything before we can love something.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 9.99, + "final_audit": { + "genuineness_0_6": 3.879743102937937, + "ecapa_cosine": 0.3686840534210205, + "wer": 0.03225806451612903, + "asr": "Maybe the mystery stays, we can disagree about the universe and still recognize a moment that asks for care. We do not need certainty about everything before we can love something.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "And care can be modest. A call you keep postponing. Something you make with attention. An apology without excuses. These are our examples, not a checklist Frankl handed down.", + "delivery_chunks": [ + { + "text": "And care can be modest. A call you keep postponing. Something you make with attention. An apology without excuses. These are our examples, not a checklist Frankl handed down.", + "cue": "quiet conviction, conversational; natural, lightly responsive, without performing" + } + ] + }, + "winner": 0, + "seed": 202611576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 9.35, + "final_audit": { + "genuineness_0_6": 3.892295182682574, + "ecapa_cosine": 0.37364479899406433, + "wer": 0.034482758620689655, + "asr": "And care can be modest. A call you keep postponing, something you make with attention, an apology without excuses. These are our examples, not a checklist Frankel handed down.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "For today, perhaps ask: who or what deserves my attention? Not forever. Just today. And if the answer is rest, or letting someone help, that can be an honest beginning.", + "delivery_chunks": [ + { + "text": "For today, perhaps ask: who or what deserves my attention? Not forever. Just today.", + "cue": "gentle invitation, with breathing space; easy, spontaneous, gently spoken" + }, + { + "text": "And if the answer is rest, or letting someone help, that can be an honest beginning.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 9.91, + "final_audit": { + "genuineness_0_6": 3.647529627662152, + "ecapa_cosine": 0.32581639289855957, + "wer": 0.0, + "asr": "For today, perhaps ask, who or what deserves my attention? Not forever, just today. And if the answer is rest or letting someone help, that can be an honest beginning.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 1, + "language": "en", + "turn": { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "We have not solved the meaning of life. But we have someone to share the question with. And two biscuits left. Let's take our time with both.", + "delivery_chunks": [ + { + "text": "We have not solved the meaning of life. But we have someone to share the question with. And two biscuits left. Let's take our time with both.", + "cue": "warm closing; a soft smile; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202611576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": null, + "ecapa_cosine": null, + "reward": null, + "ranking_skipped": true + } + ], + "edited_seconds": 6.79, + "final_audit": { + "genuineness_0_6": 3.980159740895033, + "ecapa_cosine": 0.3861056864261627, + "wer": 0.0, + "asr": "We have not solved the meaning of life, but we have someone to share the question with. And two biscuits left. Let's take our time with both.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Willkommen bei Kleine Fragen, gro\u00dfe Gef\u00fchle. Heute geht es um den Sinn des Lebens. Idris, ich h\u00e4tte gern eine klare Antwort. Eine, die ich mir beim Schl\u00fcsselsuchen noch merken kann.", + "delivery_chunks": [ + { + "text": "Willkommen bei Kleine Fragen, gro\u00dfe Gef\u00fchle. Heute geht es um den Sinn des Lebens.", + "cue": "warm, intimate welcome; gently curious; easy, spontaneous, gently spoken" + }, + { + "text": "Idris, ich h\u00e4tte gern eine klare Antwort. Eine, die ich mir beim Schl\u00fcsselsuchen noch merken kann.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 1, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.798154584597796, + "ecapa_cosine": 0.5070372819900513, + "reward": 0.5700315230448421, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.99271182063967, + "ecapa_cosine": 0.5274336338043213, + "reward": 0.5964428019554664, + "ranking_skipped": false + } + ], + "edited_seconds": 10.07, + "final_audit": { + "genuineness_0_6": 3.8358108238317072, + "ecapa_cosine": 0.5319303274154663, + "wer": 0.06666666666666667, + "asr": "Willkommen bei Kleine Fragen, gro\u00dfe Gef\u00fchle. Heute geht es um den Sinn des Lebens. Idris, ich h\u00e4tte gerne klare Antwort. Eine, die ich mir beim Schl\u00fcsselsuchen noch merken kann.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas br\u00f6selig, aber sie machen die Ungewissheit gem\u00fctlicher. M\u00fcssen wir wirklich das ganze Universum erkl\u00e4ren, bevor der Tee kalt wird?", + "delivery_chunks": [ + { + "text": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas br\u00f6selig, aber sie machen die Ungewissheit gem\u00fctlicher. M\u00fcssen wir wirklich das ganze Universum erkl\u00e4ren, bevor der Tee kalt wird?", + "cue": "affectionate dry humour; a small smile; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.250029455404729, + "ecapa_cosine": 0.6562875509262085, + "reward": 0.6823128967468317, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.143336777575314, + "ecapa_cosine": 0.5835200548171997, + "reward": 0.6370380922065426, + "ranking_skipped": false + } + ], + "edited_seconds": 10.55, + "final_audit": { + "genuineness_0_6": 3.99271182063967, + "ecapa_cosine": 0.6491488218307495, + "wer": 0.0, + "asr": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas br\u00f6selig, aber Sie machen die Ungewissheit gem\u00fctlicher. M\u00fcssen wir wirklich das ganze Universum erkl\u00e4ren, bevor der Tee kalt wird?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "Dann fangen wir kleiner an. Warum f\u00fchlt sich ein gew\u00f6hnlicher Nachmittag manchmal kostbar an, w\u00e4hrend ein Tag voller Erfolge seltsam leer bleibt? Was unterscheidet Besch\u00e4ftigung von einem erf\u00fcllten Leben?", + "delivery_chunks": [ + { + "text": "Dann fangen wir kleiner an. Warum f\u00fchlt sich ein gew\u00f6hnlicher Nachmittag manchmal kostbar an, w\u00e4hrend ein Tag voller Erfolge seltsam leer bleibt?", + "cue": "thoughtful, sincere; let the question land; soft natural delivery, thinking aloud" + }, + { + "text": "Was unterscheidet Besch\u00e4ftigung von einem erf\u00fcllten Leben?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.735394185874611, + "ecapa_cosine": 0.6063812971115112, + "reward": 0.6144734973786399, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.5816312090028077, + "ecapa_cosine": 0.5178672075271606, + "reward": 0.557402871180481, + "ranking_skipped": false + } + ], + "edited_seconds": 11.59, + "final_audit": { + "genuineness_0_6": 3.6130114083644003, + "ecapa_cosine": 0.6071913242340088, + "wer": 0.0, + "asr": "Dann fangen wir kleiner an. Warum f\u00fchlt sich ein gew\u00f6hnlicher Nachmittag manchmal kostbar an, w\u00e4hrend ein Tag voller Erfolge seltsam leer bleibt? Was unterscheidet Besch\u00e4ftigung von einem erf\u00fcllten Leben?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Der \u00f6sterreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergn\u00fcgen oder Erfolg: Was ist uns so wichtig, dass wir darauf antworten wollen?", + "delivery_chunks": [ + { + "text": "Der \u00f6sterreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergn\u00fcgen oder Erfolg: Was ist uns so wichtig, dass wir darauf antworten wollen?", + "cue": "engaged and clear, without lecturing; casual and sincere, unhurried" + } + ] + }, + "winner": 1, + "seed": 202621080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.105680538341403, + "ecapa_cosine": 0.515355110168457, + "reward": 0.599817599946012, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.055472219362855, + "ecapa_cosine": 0.6785735487937927, + "reward": 0.6772427926771343, + "ranking_skipped": false + } + ], + "edited_seconds": 11.67, + "final_audit": { + "genuineness_0_6": 3.9487795415334404, + "ecapa_cosine": 0.6787628531455994, + "wer": 0.030303030303030304, + "asr": "Der \u00f6sterreichische Psychiater Viktor Franke stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergn\u00fcgen oder Erfolg. Was ist uns so wichtig, dass wir darauf antworten wollen?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "Also suchen wir keinen einzigen gro\u00dfen Satz, der f\u00fcr alle Menschen stimmt? Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen?", + "delivery_chunks": [ + { + "text": "Also suchen wir keinen einzigen gro\u00dfen Satz, der f\u00fcr alle Menschen stimmt?", + "cue": "curious, gently challenging; gentle conversational flow, in the moment" + }, + { + "text": "Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621204, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.7416702257469296, + "ecapa_cosine": 0.7060662508010864, + "reward": 0.6648389775461208, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.8734670630656183, + "ecapa_cosine": 0.6627276539802551, + "reward": 0.6541527489122625, + "ranking_skipped": false + } + ], + "edited_seconds": 11.67, + "final_audit": { + "genuineness_0_6": 3.7040139865130186, + "ecapa_cosine": 0.7051674723625183, + "wer": 0.0, + "asr": "Also suchen wir keinen einzigen gro\u00dfen Satz, der f\u00fcr alle Menschen stimmt. Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Zum Gl\u00fcck nicht. F\u00fcr Frankl l\u00e4sst sich Sinn in konkreten Situationen entdecken. Was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder ver\u00e4ndern.", + "delivery_chunks": [ + { + "text": "Zum Gl\u00fcck nicht. F\u00fcr Frankl l\u00e4sst sich Sinn in konkreten Situationen entdecken. Was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder ver\u00e4ndern.", + "cue": "lightly amused, then reflective; natural, lightly responsive, without performing" + } + ] + }, + "winner": 1, + "seed": 202621204, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.5952116483822465, + "ecapa_cosine": 0.44502750039100647, + "reward": 0.605448054227357, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.9487795415334404, + "ecapa_cosine": 0.6721859574317932, + "reward": 0.66515794051035, + "ranking_skipped": false + } + ], + "edited_seconds": 10.71, + "final_audit": { + "genuineness_0_6": 3.99271182063967, + "ecapa_cosine": 0.6618181467056274, + "wer": 0.06451612903225806, + "asr": "Zum Gl\u00fcck nicht. F\u00fcr Franke l\u00e4sst sich Sinn in konkreten Situationen decken, was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder ver\u00e4ndern.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand tr\u00e4gt seiner Nachbarin die Eink\u00e4ufe hoch. Nichts Spektakul\u00e4res passiert. Aber sie schlie\u00dft ihre T\u00fcr und f\u00fchlt sich weniger allein.", + "delivery_chunks": [ + { + "text": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand tr\u00e4gt seiner Nachbarin die Eink\u00e4ufe hoch.", + "cue": "warm, quietly moved; easy, spontaneous, gently spoken" + }, + { + "text": "Nichts Spektakul\u00e4res passiert. Aber sie schlie\u00dft ihre T\u00fcr und f\u00fchlt sich weniger allein.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621204, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.710290026385337, + "ecapa_cosine": 0.5729711055755615, + "reward": 0.5956763883198921, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.929951421916485, + "ecapa_cosine": 0.462756872177124, + "reward": 0.5588743879149358, + "ranking_skipped": false + } + ], + "edited_seconds": 11.43, + "final_audit": { + "genuineness_0_6": 3.7667743852362037, + "ecapa_cosine": 0.5924137830734253, + "wer": 0.0, + "asr": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand tr\u00e4gt seiner Nachbarin die Eink\u00e4ufe hoch. Nichts Spektakul\u00e4res passiert, aber sie schlie\u00dft ihre T\u00fcr und f\u00fchlt sich weniger allein.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "Das passt zu einem seiner Zug\u00e4nge: etwas tun, etwas beitragen. Ein anderer liegt im Erleben, in Sch\u00f6nheit und Liebe. Wir m\u00fcssen nicht st\u00e4ndig etwas herstellen, damit unser Leben Bedeutung hat.", + "delivery_chunks": [ + { + "text": "Das passt zu einem seiner Zug\u00e4nge: etwas tun, etwas beitragen. Ein anderer liegt im Erleben, in Sch\u00f6nheit und Liebe. Wir m\u00fcssen nicht st\u00e4ndig etwas herstellen, damit unser Leben Bedeutung hat.", + "cue": "natural explanation with gentle emphasis; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202621204, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.8420868637040257, + "ecapa_cosine": 0.7134498357772827, + "reward": 0.6768988231973101, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.8295347839593887, + "ecapa_cosine": 0.5845831632614136, + "reward": 0.6114194802939892, + "ranking_skipped": false + } + ], + "edited_seconds": 11.99, + "final_audit": { + "genuineness_0_6": 3.8232587440870702, + "ecapa_cosine": 0.7142372131347656, + "wer": 0.0, + "asr": "Das passt zu einem seiner Zug\u00e4nge. Etwas tun, etwas beitragen. Ein anderer liegt im Erleben, in Sch\u00f6nheit und Liebe. Wir m\u00fcssen nicht st\u00e4ndig etwas herstellen, damit unser Leben Bedeutung hat.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Ein Lied h\u00f6ren, ohne nebenbei aufs Handy zu schauen. Eine Blume zwischen Pflastersteinen entdecken. Jemandem wirklich zuh\u00f6ren, statt im Kopf schon die n\u00e4chste besonders schlaue Antwort vorzubereiten.", + "delivery_chunks": [ + { + "text": "Ein Lied h\u00f6ren, ohne nebenbei aufs Handy zu schauen. Eine Blume zwischen Pflastersteinen entdecken.", + "cue": "soft delight and recognition; soft natural delivery, thinking aloud" + }, + { + "text": "Jemandem wirklich zuh\u00f6ren, statt im Kopf schon die n\u00e4chste besonders schlaue Antwort vorzubereiten.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.6789098270237446, + "ecapa_cosine": 0.6294064521789551, + "reward": 0.6212790450081229, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.9738837010227144, + "ecapa_cosine": 0.1968545913696289, + "reward": 0.42958427077004063, + "ranking_skipped": false + } + ], + "edited_seconds": 11.19, + "final_audit": { + "genuineness_0_6": 3.892295182682574, + "ecapa_cosine": 0.6278872489929199, + "wer": 0.07407407407407407, + "asr": "Ein Lied h\u00f6ren, ohne nebenbei aufs Handy zu schauen, eine Blume zwischen Pflastersteinen entdecken. Jemandem wirklich zu h\u00f6ren, statt im Kopf schon die n\u00e4chste besonders schlaue Antwort vorzubereiten.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "Meine schlauen Antworten stehen grunds\u00e4tzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben.", + "delivery_chunks": [ + { + "text": "Meine schlauen Antworten stehen grunds\u00e4tzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben.", + "cue": "playful self-awareness, then tender; casual and sincere, unhurried" + } + ] + }, + "winner": 1, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.8169827042147517, + "ecapa_cosine": 0.5992051959037781, + "reward": 0.6176844899697851, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.381826292723417, + "ecapa_cosine": 0.5428618788719177, + "reward": 0.6365831304962437, + "ranking_skipped": false + } + ], + "edited_seconds": 10.47, + "final_audit": { + "genuineness_0_6": 4.0994044984690845, + "ecapa_cosine": 0.5437989234924316, + "wer": 0.0, + "asr": "Meine schlauen Antworten stehen grunds\u00e4tzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Und dann kommt die schwere Frage. Was ist mit Trauer? Wenn der Mensch fehlt, den man anrufen m\u00f6chte. Wenn ein vertrautes Ger\u00e4usch in der K\u00fcche pl\u00f6tzlich alles wieder aufrei\u00dft?", + "delivery_chunks": [ + { + "text": "Und dann kommt die schwere Frage. Was ist mit Trauer? Wenn der Mensch fehlt, den man anrufen m\u00f6chte.", + "cue": "slower, vulnerable but not theatrical; gentle conversational flow, in the moment" + }, + { + "text": "Wenn ein vertrautes Ger\u00e4usch in der K\u00fcche pl\u00f6tzlich alles wieder aufrei\u00dft?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.929951421916485, + "ecapa_cosine": 0.6368933320045471, + "reward": 0.6459426178286474, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.055472219362855, + "ecapa_cosine": 0.2218250036239624, + "reward": 0.4488685200922191, + "ranking_skipped": false + } + ], + "edited_seconds": 10.71, + "final_audit": { + "genuineness_0_6": 3.8734670630656183, + "ecapa_cosine": 0.6340975165367126, + "wer": 0.0, + "asr": "Und dann kommt die schwere Frage. Was ist mit Trauer, wenn der Mensch fehlt, den man anrufen m\u00f6chte? Wenn ein vertrautes Ger\u00e4usch in der K\u00fcche pl\u00f6tzlich alles wieder aufrei\u00dft.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Da w\u00fcrde ich nicht gleich mit einer Lebensweisheit kommen. Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine M\u00f6glichkeit, keine Pflicht, f\u00fcr den eigenen Schmerz auch noch dankbar zu sein.", + "delivery_chunks": [ + { + "text": "Da w\u00fcrde ich nicht gleich mit einer Lebensweisheit kommen. Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine M\u00f6glichkeit, keine Pflicht, f\u00fcr den eigenen Schmerz auch noch dankbar zu sein.", + "cue": "compassionate, grounded; a small pause before answering; natural, lightly responsive, without performing" + } + ] + }, + "winner": 1, + "seed": 202621328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.7793264649808407, + "ecapa_cosine": 0.6104376316070557, + "reward": 0.6201626878852646, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.892295182682574, + "ecapa_cosine": 0.6698740720748901, + "reward": 0.6592949679276596, + "ranking_skipped": false + } + ], + "edited_seconds": 11.43, + "final_audit": { + "genuineness_0_6": 3.8609149833209813, + "ecapa_cosine": 0.6710325479507446, + "wer": 0.03225806451612903, + "asr": "Da w\u00fcrde ich nicht gleich mit einer Lebensweisheit kommen. Frankles dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine M\u00f6glichkeit, keine Pflicht, f\u00fcr den eigenen Schmerz auch noch dankbar zu sein.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "Und vermeidbares Leid d\u00fcrfen wir ver\u00e4ndern. Hilfe suchen, Belastungen teilen, eine sch\u00e4dliche Situation verlassen. Niemand schuldet der Welt eine sch\u00f6ne Erkl\u00e4rung f\u00fcr alles, was ihm wehgetan hat.", + "delivery_chunks": [ + { + "text": "Und vermeidbares Leid d\u00fcrfen wir ver\u00e4ndern. Hilfe suchen, Belastungen teilen, eine sch\u00e4dliche Situation verlassen.", + "cue": "firm but gentle; easy, spontaneous, gently spoken" + }, + { + "text": "Niemand schuldet der Welt eine sch\u00f6ne Erkl\u00e4rung f\u00fcr alles, was ihm wehgetan hat.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202621452, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.747946265619248, + "ecapa_cosine": 0.6884982585906982, + "reward": 0.6565779847636197, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.6538056675344706, + "ecapa_cosine": 0.620564341545105, + "reward": 0.614765976400425, + "ranking_skipped": false + } + ], + "edited_seconds": 10.31, + "final_audit": { + "genuineness_0_6": 3.534560909960419, + "ecapa_cosine": 0.6914352178573608, + "wer": 0.07407407407407407, + "asr": "Unvermeidbares Leid d\u00fcrfen wir ver\u00e4ndern, Hilfe suchen, Belastungen teilen, eine sch\u00e4dliche Situation verlassen. Niemand schuldet der Welt eine sch\u00f6ne Erkl\u00e4rung f\u00fcr alles, was ihm wehgetan hat.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Manchmal besteht der n\u00e4chste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen. Oder zu sagen: Heute ist es schwer. Ein ersch\u00f6pfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "delivery_chunks": [ + { + "text": "Manchmal besteht der n\u00e4chste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen. Oder zu sagen: Heute ist es schwer. Ein ersch\u00f6pfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "cue": "quiet reassurance, no grand speech; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 1, + "seed": 202621452, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.005263900384307, + "ecapa_cosine": 0.5419215559959412, + "reward": 0.6047327696966629, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.068024299107492, + "ecapa_cosine": 0.6153384447097778, + "reward": 0.6466712472805132, + "ranking_skipped": false + } + ], + "edited_seconds": 9.51, + "final_audit": { + "genuineness_0_6": 4.0868524187244475, + "ecapa_cosine": 0.6155979037284851, + "wer": 0.0, + "asr": "Manchmal besteht der n\u00e4chste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen. Oder zu sagen, heute ist es schwer. Ein ersch\u00f6pfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Sp\u00e4ter hat das Kind die Anleitung vergessen. Aber es erinnert sich an seine Geduld. Daran, dass Fehler erlaubt waren.", + "delivery_chunks": [ + { + "text": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Sp\u00e4ter hat das Kind die Anleitung vergessen.", + "cue": "tender, painting a simple imagined scene; soft natural delivery, thinking aloud" + }, + { + "text": "Aber es erinnert sich an seine Geduld. Daran, dass Fehler erlaubt waren.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 1, + "seed": 202621452, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.8609149833209813, + "ecapa_cosine": 0.4761984944343567, + "reward": 0.5598421624939267, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.080576378852129, + "ecapa_cosine": 0.5313677787780762, + "reward": 0.6057319209600489, + "ranking_skipped": false + } + ], + "edited_seconds": 11.67, + "final_audit": { + "genuineness_0_6": 4.093128458596766, + "ecapa_cosine": 0.5375646352767944, + "wer": 0.0, + "asr": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Sp\u00e4ter hat das Kind die Anleitung vergessen. Aber es erinnert sich an seine Geduld, daran, dass Fehler erlaubt waren.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "Das ber\u00fchrt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen. Ein bisschen mehr Geduld, die weiterwandert. Auch wenn das Fahrrad l\u00e4ngst rostet und niemand mehr an diese Stunde denkt.", + "delivery_chunks": [ + { + "text": "Das ber\u00fchrt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen. Ein bisschen mehr Geduld, die weiterwandert. Auch wenn das Fahrrad l\u00e4ngst rostet und niemand mehr an diese Stunde denkt.", + "cue": "gently moved, unhurried; casual and sincere, unhurried" + } + ] + }, + "winner": 1, + "seed": 202621452, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.967607661150396, + "ecapa_cosine": 0.6191103458404541, + "reward": 0.6401891446827601, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.268857575021684, + "ecapa_cosine": 0.5904988050460815, + "reward": 0.6509875337748479, + "ranking_skipped": false + } + ], + "edited_seconds": 10.23, + "final_audit": { + "genuineness_0_6": 4.293961734510958, + "ecapa_cosine": 0.6335303783416748, + "wer": 0.0967741935483871, + "asr": "Das ber\u00fchrt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen. Ein bisschen mehr Geduld, die weiter wandert, auch wenn das Fahrrad l\u00e4ngst rostet. Niemand mehr an diese Stunde denkt.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Vielleicht bleibt das gro\u00dfe R\u00e4tsel offen. Wir k\u00f6nnen \u00fcber die Welt verschieden denken und trotzdem sp\u00fcren, dass jetzt jemand Zuwendung braucht. Wir m\u00fcssen nicht alles wissen, bevor wir etwas lieben d\u00fcrfen.", + "delivery_chunks": [ + { + "text": "Vielleicht bleibt das gro\u00dfe R\u00e4tsel offen. Wir k\u00f6nnen \u00fcber die Welt verschieden denken und trotzdem sp\u00fcren, dass jetzt jemand Zuwendung braucht.", + "cue": "thoughtful, open rather than conclusive; gentle conversational flow, in the moment" + }, + { + "text": "Wir m\u00fcssen nicht alles wissen, bevor wir etwas lieben d\u00fcrfen.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 1, + "seed": 202621576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.068024299107492, + "ecapa_cosine": 0.22129973769187927, + "reward": 0.44965189377156395, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.130784697830677, + "ecapa_cosine": 0.385982871055603, + "reward": 0.5372234936803579, + "ranking_skipped": false + } + ], + "edited_seconds": 11.51, + "final_audit": { + "genuineness_0_6": 3.892295182682574, + "ecapa_cosine": 0.5801078677177429, + "wer": 0.0, + "asr": "Vielleicht bleibt das gro\u00dfe R\u00e4tsel offen. Wir k\u00f6nnen \u00fcber die Welt verschieden denken und trotzdem sp\u00fcren, dass jetzt jemand Zuwendung braucht. Wir m\u00fcssen nicht alles wissen, bevor wir etwas lieben d\u00fcrfen.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "Und Zuwendung darf klein anfangen. Ein aufgeschobener Anruf. Etwas sorgf\u00e4ltig Gemachtes. Eine Entschuldigung ohne Ausrede. Das sind unsere Beispiele, keine Aufgabenliste, die Frankl uns hinterlassen h\u00e4tte.", + "delivery_chunks": [ + { + "text": "Und Zuwendung darf klein anfangen. Ein aufgeschobener Anruf. Etwas sorgf\u00e4ltig Gemachtes. Eine Entschuldigung ohne Ausrede. Das sind unsere Beispiele, keine Aufgabenliste, die Frankl uns hinterlassen h\u00e4tte.", + "cue": "quiet conviction, conversational; natural, lightly responsive, without performing" + } + ] + }, + "winner": 0, + "seed": 202621576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.187269056681544, + "ecapa_cosine": 0.603269100189209, + "reward": 0.6505736381513998, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.8232587440870702, + "ecapa_cosine": 0.5988564491271973, + "reward": 0.6180331199041877, + "ranking_skipped": false + } + ], + "edited_seconds": 11.51, + "final_audit": { + "genuineness_0_6": 3.8044306244701147, + "ecapa_cosine": 0.6306815147399902, + "wer": 0.038461538461538464, + "asr": "Und Zuwendung darf klein anfangen. Ein aufgeschobener Anruf, etwas sorgf\u00e4ltig Gemachtes, eine Entschuldigung ohne Ausrede. Das sind unsere Beispiele, keine Aufgabenliste, die Frankel uns hinterlassen h\u00e4tte.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "Vielleicht reicht f\u00fcr heute diese Frage: Wem oder was m\u00f6chte ich Aufmerksamkeit schenken? Nur heute. Und wenn die Antwort Ruhe hei\u00dft, oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "delivery_chunks": [ + { + "text": "Vielleicht reicht f\u00fcr heute diese Frage: Wem oder was m\u00f6chte ich Aufmerksamkeit schenken? Nur heute.", + "cue": "gentle invitation, with breathing space; easy, spontaneous, gently spoken" + }, + { + "text": "Und wenn die Antwort Ruhe hei\u00dft, oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 1, + "seed": 202621576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.6538056675344706, + "ecapa_cosine": 0.5928072333335876, + "reward": 0.6008874222946663, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.7918785447254777, + "ecapa_cosine": 0.6099849343299866, + "reward": 0.6209823458921164, + "ranking_skipped": false + } + ], + "edited_seconds": 12.31, + "final_audit": { + "genuineness_0_6": 3.7667743852362037, + "ecapa_cosine": 0.6100353598594666, + "wer": 0.0, + "asr": "Vielleicht reicht f\u00fcr heute diese Frage. Wem oder was m\u00f6chte ich Aufmerksamkeit schenken? Nur heute. Und wenn die Antwort Ruhe hei\u00dft oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "de", + "turn": { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "Den Sinn des Lebens haben wir nicht gel\u00f6st. Aber wir k\u00f6nnen die Frage miteinander teilen. Und die letzten beiden Kekse. Nehmen wir uns f\u00fcr beides ein bisschen Zeit.", + "delivery_chunks": [ + { + "text": "Den Sinn des Lebens haben wir nicht gel\u00f6st. Aber wir k\u00f6nnen die Frage miteinander teilen. Und die letzten beiden Kekse. Nehmen wir uns f\u00fcr beides ein bisschen Zeit.", + "cue": "warm closing; a soft smile; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 1, + "seed": 202621576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.394378372468054, + "ecapa_cosine": 0.585229218006134, + "reward": 0.6588128067087382, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.381826292723417, + "ecapa_cosine": 0.6867315769195557, + "reward": 0.7085179795200627, + "ranking_skipped": false + } + ], + "edited_seconds": 8.47, + "final_audit": { + "genuineness_0_6": 4.0617482592351735, + "ecapa_cosine": 0.691834032535553, + "wer": 0.03571428571428571, + "asr": "Den Sinn des Lebens haben wir nicht gel\u00f6st, aber wir k\u00f6nnen die Frage miteinander erteilen. Und die letzten beiden Kekse nehmen wir uns f\u00fcr beides ein bisschen Zeit.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer. Preferably something I could remember while looking for my keys.", + "delivery_chunks": [ + { + "text": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer.", + "cue": "warm, intimate welcome; gently curious; easy, spontaneous, gently spoken" + }, + { + "text": "Preferably something I could remember while looking for my keys.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.685185866896063, + "ecapa_cosine": 0.28735098242759705, + "reward": 0.45077431345513713, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.7416702257469296, + "ecapa_cosine": 0.27138465642929077, + "reward": 0.4474981803602229, + "ranking_skipped": false + } + ], + "edited_seconds": 9.35, + "final_audit": { + "genuineness_0_6": 3.7040139865130186, + "ecapa_cosine": 0.32497256994247437, + "wer": 0.0, + "asr": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer. Preferably something I could remember while looking for my keys.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller than explaining the entire universe before tea.", + "delivery_chunks": [ + { + "text": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller than explaining the entire universe before tea.", + "cue": "affectionate dry humour; a small smile; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 1, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.735394185874611, + "ecapa_cosine": 0.3210156559944153, + "reward": 0.4717906768200919, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.0617482592351735, + "ecapa_cosine": 0.40997767448425293, + "reward": 0.5434678588450577, + "ranking_skipped": false + } + ], + "edited_seconds": 10.23, + "final_audit": { + "genuineness_0_6": 3.917399342171848, + "ecapa_cosine": 0.42770758271217346, + "wer": 0.0, + "asr": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller than explaining the entire universe before tea.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "All right. Why does an ordinary afternoon sometimes feel deeply worthwhile, while a day full of achievements can feel strangely empty? What is the difference between being busy and being alive?", + "delivery_chunks": [ + { + "text": "All right. Why does an ordinary afternoon sometimes feel deeply worthwhile, while a day full of achievements can feel strangely empty?", + "cue": "thoughtful, sincere; let the question land; soft natural delivery, thinking aloud" + }, + { + "text": "What is the difference between being busy and being alive?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.7667743852362037, + "ecapa_cosine": 0.40807443857192993, + "reward": 0.5179350847223152, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.685185866896063, + "ecapa_cosine": 0.3155425190925598, + "reward": 0.4648700817876185, + "ranking_skipped": false + } + ], + "edited_seconds": 11.03, + "final_audit": { + "genuineness_0_6": 3.6663577472791076, + "ecapa_cosine": 0.44124263525009155, + "wer": 0.06451612903225806, + "asr": "Alright, why does an ordinary afternoon sometimes feel deeply worthwhile while a day full of achievements can feel strangely empty? What is the difference between being busy and being alive?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Viktor Frankl, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success: what matters enough for us to respond to it?", + "delivery_chunks": [ + { + "text": "Viktor Frankl, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success: what matters enough for us to respond to it?", + "cue": "engaged and clear, without lecturing; casual and sincere, unhurried" + } + ] + }, + "winner": 0, + "seed": 202611080, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.6977379466407, + "ecapa_cosine": 0.4104061722755432, + "reward": 0.5133479150244966, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.198792776791379, + "ecapa_cosine": 0.4641695022583008, + "reward": 0.4986508158617653, + "ranking_skipped": false + } + ], + "edited_seconds": 9.43, + "final_audit": { + "genuineness_0_6": 3.7291181460022926, + "ecapa_cosine": 0.43206724524497986, + "wer": 0.03125, + "asr": "Viktor Frankel, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success. What matters enough for us to respond to it?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "So we are not hunting for one magnificent sentence that explains everybody's life? No universal instruction manual, with a missing page and an impossible little screwdriver?", + "delivery_chunks": [ + { + "text": "So we are not hunting for one magnificent sentence that explains everybody's life?", + "cue": "curious, gently challenging; gentle conversational flow, in the moment" + }, + { + "text": "No universal instruction manual, with a missing page and an impossible little screwdriver?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 1, + "seed": 202611204, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.8420868637040257, + "ecapa_cosine": 0.2492218166589737, + "reward": 0.44478481363815564, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.8044306244701147, + "ecapa_cosine": 0.33668506145477295, + "reward": 0.485378416099896, + "ranking_skipped": false + } + ], + "edited_seconds": 9.91, + "final_audit": { + "genuineness_0_6": 3.942503501661122, + "ecapa_cosine": 0.34044599533081055, + "wer": 0.037037037037037035, + "asr": "So we are not hunting for one magnificent sentence that explains everybody's life. No universal instruction manual with a missing page and impossible little screwdriver?", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Thankfully, no assembly required. For Frankl, meaning is discovered in particular situations, by particular people. What matters to you this morning might be very different from what mattered ten years ago.", + "delivery_chunks": [ + { + "text": "Thankfully, no assembly required. For Frankl, meaning is discovered in particular situations, by particular people. What matters to you this morning might be very different from what mattered ten years ago.", + "cue": "lightly amused, then reflective; natural, lightly responsive, without performing" + } + ] + }, + "winner": 0, + "seed": 202611204, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.879743102937937, + "ecapa_cosine": 0.41741234064102173, + "reward": 0.5320180955653389, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.7542223054915667, + "ecapa_cosine": 0.3937990069389343, + "reward": 0.509751362260431, + "ranking_skipped": false + } + ], + "edited_seconds": 10.87, + "final_audit": { + "genuineness_0_6": 3.672633787151426, + "ecapa_cosine": 0.3922388553619385, + "wer": 0.0967741935483871, + "asr": "Thankfully, no assembly required for Fram. To Frankel, meaning is discovered in particular situations by particular people. What matters to you this morning might be very different from what mattered ten years ago.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping a neighbour carry groceries. Nothing impressive happens. But somebody gets home feeling less alone.", + "delivery_chunks": [ + { + "text": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping a neighbour carry groceries.", + "cue": "warm, quietly moved; easy, spontaneous, gently spoken" + }, + { + "text": "Nothing impressive happens. But somebody gets home feeling less alone.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611204, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.955055581405759, + "ecapa_cosine": 0.40533357858657837, + "reward": 0.5322547544104357, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.6287015080451965, + "ecapa_cosine": 0.32044368982315063, + "reward": 0.46261363724867505, + "ranking_skipped": false + } + ], + "edited_seconds": 11.11, + "final_audit": { + "genuineness_0_6": 3.8295347839593887, + "ecapa_cosine": 0.3668288290500641, + "wer": 0.06666666666666667, + "asr": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping neighbor carry groceries. Nothing impressive happens, but somebody gets home feeling less alone.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "That fits one of Frankl's avenues: what we give through our actions. Another is what we receive through experience, beauty, or love. Meaning does not always require us to produce something.", + "delivery_chunks": [ + { + "text": "That fits one of Frankl's avenues: what we give through our actions. Another is what we receive through experience, beauty, or love. Meaning does not always require us to produce something.", + "cue": "natural explanation with gentle emphasis; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 1, + "seed": 202611204, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.7918785447254777, + "ecapa_cosine": 0.42925208806991577, + "reward": 0.530615922762081, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.199821136426181, + "ecapa_cosine": 0.39051759243011475, + "reward": 0.545243890917239, + "ranking_skipped": false + } + ], + "edited_seconds": 9.75, + "final_audit": { + "genuineness_0_6": 3.99271182063967, + "ecapa_cosine": 0.37624961137771606, + "wer": 0.0625, + "asr": "That fits one of Frankel's avenues what what we give through our actions. Another is what we receive through experience, beauty, or love. Meaning does not always require us to produce something.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Listening to a song without checking my phone. Noticing the ridiculous courage of a flower growing through the pavement. Really hearing someone, instead of silently preparing my clever reply.", + "delivery_chunks": [ + { + "text": "Listening to a song without checking my phone. Noticing the ridiculous courage of a flower growing through the pavement.", + "cue": "soft delight and recognition; soft natural delivery, thinking aloud" + }, + { + "text": "Really hearing someone, instead of silently preparing my clever reply.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 1, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.6977379466407, + "ecapa_cosine": 0.29431775212287903, + "reward": 0.4553037049481645, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.187269056681544, + "ecapa_cosine": 0.314384400844574, + "reward": 0.5061312884790823, + "ranking_skipped": false + } + ], + "edited_seconds": 10.87, + "final_audit": { + "genuineness_0_6": 4.130784697830677, + "ecapa_cosine": 0.30813080072402954, + "wer": 0.0, + "asr": "Listening to a song without checking my phone, noticing the ridiculous courage of a flower growing through the pavement. Really hearing someone instead of silently preparing my clever reply.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "My clever replies have a waiting list. But yes. Attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours.", + "delivery_chunks": [ + { + "text": "My clever replies have a waiting list. But yes. Attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours.", + "cue": "playful self-awareness, then tender; casual and sincere, unhurried" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.8295347839593887, + "ecapa_cosine": 0.4023711681365967, + "reward": 0.5203134827315807, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.8609149833209813, + "ecapa_cosine": 0.3545559048652649, + "reward": 0.49902086770938087, + "ranking_skipped": false + } + ], + "edited_seconds": 8.79, + "final_audit": { + "genuineness_0_6": 4.237477375660092, + "ecapa_cosine": 0.3712851405143738, + "wer": 0.0, + "asr": "My clever replies have a waiting list, but yes, attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Here is the difficult part. What about grief? When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss them terribly?", + "delivery_chunks": [ + { + "text": "Here is the difficult part. What about grief?", + "cue": "slower, vulnerable but not theatrical; gentle conversational flow, in the moment" + }, + { + "text": "When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss them terribly?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.8860191428102553, + "ecapa_cosine": 0.3949676752090454, + "reward": 0.521318766172044, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.879743102937937, + "ecapa_cosine": 0.31718772649765015, + "reward": 0.4819057884936531, + "ranking_skipped": false + } + ], + "edited_seconds": 9.03, + "final_audit": { + "genuineness_0_6": 3.8420868637040257, + "ecapa_cosine": 0.3618951141834259, + "wer": 0.0, + "asr": "Here is the difficult part. What about grief? When the person you want to call is gone and an ordinary sound in the kitchen suddenly makes you miss them terribly.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Then I would not rush in with a lesson. Frankl's third avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain.", + "delivery_chunks": [ + { + "text": "Then I would not rush in with a lesson. Frankl's third avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain.", + "cue": "compassionate, grounded; a small pause before answering; natural, lightly responsive, without performing" + } + ] + }, + "winner": 1, + "seed": 202611328, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.955055581405759, + "ecapa_cosine": 0.41150182485580444, + "reward": 0.5353388775450487, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.8169827042147517, + "ecapa_cosine": 0.5197121500968933, + "reward": 0.5779379670663427, + "ranking_skipped": false + } + ], + "edited_seconds": 9.83, + "final_audit": { + "genuineness_0_6": 3.980159740895033, + "ecapa_cosine": 0.3933611512184143, + "wer": 0.06060606060606061, + "asr": "Then I would not rush in with the lesson. Frankel's Third Avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the burden. We do not owe the world a beautiful explanation for everything that hurts.", + "delivery_chunks": [ + { + "text": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the burden.", + "cue": "firm but gentle; easy, spontaneous, gently spoken" + }, + { + "text": "We do not owe the world a beautiful explanation for everything that hurts.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 1, + "seed": 202611452, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.537698929896578, + "ecapa_cosine": 0.3693798780441284, + "reward": 0.4794981831801124, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.6287015080451965, + "ecapa_cosine": 0.3638482093811035, + "reward": 0.4843158970276515, + "ranking_skipped": false + } + ], + "edited_seconds": 10.31, + "final_audit": { + "genuineness_0_6": 3.6035973485559225, + "ecapa_cosine": 0.36235836148262024, + "wer": 0.06451612903225806, + "asr": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the bird. We do not o' owe the world a beautiful explanation for everything that hurts.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Exactly. Sometimes the meaningful act is letting somebody sit beside you. Or saying, today is difficult. A life does not lose its worth because the person living it is exhausted.", + "delivery_chunks": [ + { + "text": "Exactly. Sometimes the meaningful act is letting somebody sit beside you. Or saying, today is difficult. A life does not lose its worth because the person living it is exhausted.", + "cue": "quiet reassurance, no grand speech; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202611452, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.218649256043136, + "ecapa_cosine": 0.42403408885002136, + "reward": 0.563571149095272, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.300237774383277, + "ecapa_cosine": 0.31259676814079285, + "reward": 0.5146515319356695, + "ranking_skipped": false + } + ], + "edited_seconds": 9.19, + "final_audit": { + "genuineness_0_6": 4.256305495277047, + "ecapa_cosine": 0.4249717593193054, + "wer": 0.0, + "asr": "Exactly. Sometimes the meaningful act is letting somebody sit beside you or saying, today is difficult. A life does not lose its worth because the person living it is exhausted.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Imagine a father teaching his child to repair a bicycle. Years later, the child cannot remember the instructions. But they remember his patience. The feeling that mistakes were allowed.", + "delivery_chunks": [ + { + "text": "Imagine a father teaching his child to repair a bicycle. Years later, the child cannot remember the instructions.", + "cue": "tender, painting a simple imagined scene; soft natural delivery, thinking aloud" + }, + { + "text": "But they remember his patience. The feeling that mistakes were allowed.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 1, + "seed": 202611452, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.7918785447254777, + "ecapa_cosine": 0.27153122425079346, + "reward": 0.45175549085251987, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.8044306244701147, + "ecapa_cosine": 0.2781844735145569, + "reward": 0.456128122129788, + "ranking_skipped": false + } + ], + "edited_seconds": 10.87, + "final_audit": { + "genuineness_0_6": 3.760498345363885, + "ecapa_cosine": 0.27496063709259033, + "wer": 0.0, + "asr": "Imagine a father teaching his child to repair a bicycle. Years later the child cannot remember the instructions. But they remember his patience, the feeling that mistakes were allowed.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "That is a lovely thought. What survives us may be a way of treating people. A little more patience travelling through the world, long after the bicycle has rusted.", + "delivery_chunks": [ + { + "text": "That is a lovely thought. What survives us may be a way of treating people. A little more patience travelling through the world, long after the bicycle has rusted.", + "cue": "gently moved, unhurried; casual and sincere, unhurried" + } + ] + }, + "winner": 0, + "seed": 202611452, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.381826292723417, + "ecapa_cosine": 0.47301432490348816, + "reward": 0.6016593535120289, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.155888857319951, + "ecapa_cosine": 0.3827615976333618, + "reward": 0.5377048702600102, + "ranking_skipped": false + } + ], + "edited_seconds": 8.39, + "final_audit": { + "genuineness_0_6": 4.256305495277047, + "ecapa_cosine": 0.4721708297729492, + "wer": 0.034482758620689655, + "asr": "That is a lovely thought. What survives us may be a way of treating people. A little more patience traveling through the world long after the bicycle has rusted.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Maybe the mystery stays. We can disagree about the universe and still recognise a moment that asks for care. We do not need certainty about everything before we can love something.", + "delivery_chunks": [ + { + "text": "Maybe the mystery stays. We can disagree about the universe and still recognise a moment that asks for care.", + "cue": "thoughtful, open rather than conclusive; gentle conversational flow, in the moment" + }, + { + "text": "We do not need certainty about everything before we can love something.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 0, + "seed": 202611576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.5690791292581707, + "ecapa_cosine": 0.4283987879753113, + "reward": 0.5116226547591698, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.584769228938967, + "ecapa_cosine": 0.36201679706573486, + "reward": 0.4797391676111147, + "ranking_skipped": false + } + ], + "edited_seconds": 9.83, + "final_audit": { + "genuineness_0_6": 3.6255634881090373, + "ecapa_cosine": 0.4083341956138611, + "wer": 0.03225806451612903, + "asr": "Maybe the mystery stays, we can disagree about the universe and still recognize a moment that asks for care. We do not need certainty about everything before we can love something.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "And care can be modest. A call you keep postponing. Something you make with attention. An apology without excuses. These are our examples, not a checklist Frankl handed down.", + "delivery_chunks": [ + { + "text": "And care can be modest. A call you keep postponing. Something you make with attention. An apology without excuses. These are our examples, not a checklist Frankl handed down.", + "cue": "quiet conviction, conversational; natural, lightly responsive, without performing" + } + ] + }, + "winner": 1, + "seed": 202611576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.735394185874611, + "ecapa_cosine": 0.42531338334083557, + "reward": 0.523939540493302, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.6789098270237446, + "ecapa_cosine": 0.5004451274871826, + "reward": 0.5567983826622367, + "ranking_skipped": false + } + ], + "edited_seconds": 9.51, + "final_audit": { + "genuineness_0_6": 3.8169827042147517, + "ecapa_cosine": 0.5154814124107361, + "wer": 0.034482758620689655, + "asr": "And care can be modest. A call you keep postponing, something you make with attention, an apology without excuses. These are our examples, not a checklist Frankel handed down.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "For today, perhaps ask: who or what deserves my attention? Not forever. Just today. And if the answer is rest, or letting someone help, that can be an honest beginning.", + "delivery_chunks": [ + { + "text": "For today, perhaps ask: who or what deserves my attention? Not forever. Just today.", + "cue": "gentle invitation, with breathing space; easy, spontaneous, gently spoken" + }, + { + "text": "And if the answer is rest, or letting someone help, that can be an honest beginning.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + "winner": 1, + "seed": 202611576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 3.8420868637040257, + "ecapa_cosine": 0.19836321473121643, + "reward": 0.419355512674277, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 3.8169827042147517, + "ecapa_cosine": 0.22007501125335693, + "reward": 0.42811939764457446, + "ranking_skipped": false + } + ], + "edited_seconds": 9.91, + "final_audit": { + "genuineness_0_6": 3.8546389434486628, + "ecapa_cosine": 0.18450607359409332, + "wer": 0.0, + "asr": "For today, perhaps ask, who or what deserves my attention? Not forever, just today. And if the answer is rest or letting someone help, that can be an honest beginning.", + "alignment_ok": true, + "review_required": false + } + }, + { + "n": 2, + "language": "en", + "turn": { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "We have not solved the meaning of life. But we have someone to share the question with. And two biscuits left. Let's take our time with both.", + "delivery_chunks": [ + { + "text": "We have not solved the meaning of life. But we have someone to share the question with. And two biscuits left. Let's take our time with both.", + "cue": "warm closing; a soft smile; relaxed, unforced, like talking to a friend" + } + ] + }, + "winner": 0, + "seed": 202611576, + "candidates": [ + { + "index": 0, + "genuineness_0_6": 4.24375341553241, + "ecapa_cosine": 0.4882807731628418, + "reward": 0.5977865045424551, + "ranking_skipped": false + }, + { + "index": 1, + "genuineness_0_6": 4.250029455404729, + "ecapa_cosine": 0.4020680785179138, + "reward": 0.5552031605426844, + "ranking_skipped": false + } + ], + "edited_seconds": 8.07, + "final_audit": { + "genuineness_0_6": 4.268857575021684, + "ecapa_cosine": 0.47426122426986694, + "wer": 0.0, + "asr": "We have not solved the meaning of life, but we have someone to share the question with, and two biscuits left. Let's take our time with both.", + "alignment_ok": true, + "review_required": false + } + } + ] +} diff --git a/optimized_pipeline/benchmarks/n-comparison-2026-11-08.json b/optimized_pipeline/benchmarks/n-comparison-2026-11-08.json new file mode 100644 index 0000000000000000000000000000000000000000..779fd4f13ce7973533f73bff823bb2d98d701ed4 --- /dev/null +++ b/optimized_pipeline/benchmarks/n-comparison-2026-11-08.json @@ -0,0 +1,171 @@ +{ + "recipe": "approved sparse spontaneous", + "hardware": "RTX 3090 24 GB; shared host", + "episodes": [ + { + "language": "de", + "seconds": 220.752, + "inference_seconds": 55.24105732887983, + "useful_rtf": 0.25028796759947364, + "mean_genuineness": 3.916457936191, + "mean_speaker_cosine": 0.5527790442109108, + "mean_wer": 0.012125723738626965, + "review_turns": [], + "n": 1 + }, + { + "language": "en", + "seconds": 199.296, + "inference_seconds": 68.5611028149724, + "useful_rtf": 0.3440613379584102, + "mean_genuineness": 3.8627977952826766, + "mean_speaker_cosine": 0.35182359889149667, + "mean_wer": 0.021213774985674318, + "review_turns": [], + "n": 1 + }, + { + "language": "de", + "seconds": 222.264, + "inference_seconds": 115.80334348231554, + "useful_rtf": 0.5210968072821651, + "mean_genuineness": 3.896845311590005, + "mean_speaker_cosine": 0.6304136544466019, + "mean_wer": 0.025642102819522172, + "review_turns": [], + "n": 2 + }, + { + "language": "en", + "seconds": 199.536, + "inference_seconds": 122.76562970131636, + "useful_rtf": 0.6153357210230884, + "mean_genuineness": 3.9043765594367867, + "mean_speaker_cosine": 0.3826735012233257, + "mean_wer": 0.029254489884008795, + "review_turns": [], + "n": 2 + }, + { + "language": "de", + "seconds": 219.384, + "inference_seconds": 179.97724448144436, + "useful_rtf": 0.8205025962226777, + "mean_genuineness": 3.9426604026579297, + "mean_speaker_cosine": 0.6397665053606033, + "mean_wer": 0.019823127887644017, + "review_turns": [], + "n": 4 + }, + { + "language": "en", + "seconds": 193.296, + "inference_seconds": 195.8277133256197, + "useful_rtf": 1.0132338869230595, + "mean_genuineness": 3.8799000039347447, + "mean_speaker_cosine": 0.40697828829288485, + "mean_wer": 0.05496788191518447, + "review_turns": [ + 6 + ], + "n": 4 + } + ], + "components": { + "1": { + "batch_wall_seconds": 123.80216014385223, + "token_seconds": 113.22087007761002, + "codec_seconds": 9.914094902575016, + "scoring_seconds": 0.0, + "graph_capture_seconds": 4.188800357282162 + }, + "2": { + "batch_wall_seconds": 238.5689731836319, + "token_seconds": 209.57311402261257, + "codec_seconds": 18.182101391255856, + "scoring_seconds": 10.071458324790001, + "graph_capture_seconds": 1.0061824768781662 + }, + "4": { + "batch_wall_seconds": 375.80495780706406, + "token_seconds": 324.84918797016144, + "codec_seconds": 24.84566230326891, + "scoring_seconds": 21.24852853268385, + "graph_capture_seconds": 1.07996017485857 + } + }, + "caveats": [ + "N1 and N2 run with an unrelated training job on the same GPU, using separate token and codec/judge phases. Prior N4 used integrated execution under different GPU load. Timing differences are not an isolated causal effect of N. The training job ended before the final audit; GPU load was not constant throughout the session.", + "Same words, sparse cues, reference pair, temperature 1.0, CFG 2.5 and 50/50 reward. Fresh generation; batch grouping and seeds differ, so the runs are not nested candidate subsets.", + "N1 skips online ranking and keeps its only take. All selected outputs get the same final diagnostic audit; no silent content repair.", + "Genuineness, ECAPA cosine and ASR WER are imperfect model estimates. Forty turns per mode do not establish a universal quality ranking.", + "Prior strict English N4 contains an incomplete turn 6. Its separately labeled repaired listening copy is not used in this table.", + "Useful RTF divides production time by final edited audio duration. Loading, correctness probes, final audit and MP3 export are excluded. Phased production is a sum of stage work, not request-to-first-audio latency." + ], + "date": "2026-11-08", + "successful_process_start_to_four_mp3_exports_seconds": 660.6962466239929, + "shared_generation": { + "n": [ + 2, + 1 + ], + "policy_load_seconds": 21.74578709155321, + "decoder_judge_load_seconds": 12.16219723969698, + "generation_job_seconds": 436.9636531993747, + "phased": true, + "concurrent_unrelated_training": true, + "note": "Policy and codec/judges do not occupy VRAM together. Eight-candidate policy batches. Not hardware-load matched to prior N4.", + "timer_scope": "After Python imports/setup; complete process-to-exports is measured separately." + }, + "prompt_scripts_sha256": { + "script-spontaneous-en.json": "21d1aab0d49ca9e66b56e4c1097ba14b274d251cc1ba3f888383499fdc064a5f", + "script-spontaneous-de.json": "da7b4050b7aaedd4176f0304441495ec2a216816b4f5a1d160ceb33373defa88" + }, + "temperature": 1.0, + "cfg": 2.5, + "voice_conversion": false, + "n1_online_ranking": false, + "initial_integrated_attempt": "Aborted with CUDA OOM after unrelated training occupied additional VRAM. Not included in successful timing. Its live service restoration was verified before the phased run.", + "validation": { + "1": { + "passed": true, + "episodes": 2, + "turns": 40, + "candidates": 40, + "review_turns": [], + "checks": [ + "pure 50/50 argmax; no WER gate", + "correct reference per speaker", + "selected PCM equals candidate", + "exact prompt and preserved transcript", + "MP3 hashes/format", + "400ms gaps", + "batch timing counted once", + "recorded prefill/token and decoder correctness checks" + ] + }, + "2": { + "passed": true, + "episodes": 2, + "turns": 40, + "candidates": 80, + "review_turns": [], + "checks": [ + "pure 50/50 argmax; no WER gate", + "correct reference per speaker", + "selected PCM equals candidate", + "exact prompt and preserved transcript", + "MP3 hashes/format", + "400ms gaps", + "batch timing counted once", + "recorded prefill/token and decoder correctness checks" + ] + } + }, + "browser_validation": { + "passed": true, + "audio_players_actually_played": 7, + "mobile_overflow": false, + "page_errors": [] + } +} diff --git a/optimized_pipeline/benchmarks/spontaneous-2026-11-08.json b/optimized_pipeline/benchmarks/spontaneous-2026-11-08.json new file mode 100644 index 0000000000000000000000000000000000000000..cc11ccee788728bcc6ec996422108162dcb76d4d --- /dev/null +++ b/optimized_pipeline/benchmarks/spontaneous-2026-11-08.json @@ -0,0 +1,118 @@ +{ + "date": "2026-11-08", + "hardware": "single RTX 3090 24 GB, shared host", + "prompt_style": "spontaneous", + "n": 4, + "groups": 2, + "semantic_bucket": 512, + "codec_chunk_frames": 26, + "temperature": 1.0, + "cfg": 2.5, + "reward": "0.5*clip(genuineness/6,0,1) + 0.5*clip(ecapa_cosine,0,1)", + "reference_sha256": { + "S1": "9d5a7823fea82182d6a3ec378e15ae03b0bd61f028c6f50fb6c5b82fb1f1b7dd", + "S2": "d2da04db22aeb44206e4f935e95919846e3e5bb4cb116503a7a260c9f48752cd" + }, + "episodes": [ + { + "language": "de", + "seconds": 219.384, + "inference_seconds": 179.97724448144436, + "useful_rtf": 0.8205025962226777, + "mean_genuineness": 3.9426604026579297, + "mean_speaker_cosine": 0.6397665053606033, + "mean_wer": 0.019823127887644017, + "review_turns": [] + }, + { + "language": "en", + "seconds": 193.296, + "inference_seconds": 195.8277133256197, + "useful_rtf": 1.0132338869230595, + "mean_genuineness": 3.8799000039347447, + "mean_speaker_cosine": 0.40697828829288485, + "mean_wer": 0.05496788191518447, + "review_turns": [ + 6 + ] + } + ], + "components": { + "batch_wall_seconds": 375.80495780706406, + "token_seconds": 324.84918797016144, + "codec_seconds": 24.84566230326891, + "ears_seconds": 4.3523701801896095, + "speaker_seconds": 3.077803559601307, + "scoring_seconds": 21.24852853268385, + "graph_capture_seconds": 1.07996017485857 + }, + "archive": { + "cpu_seconds": 24.86866183578968, + "blocked_seconds": 1.0763142108917236, + "bounded_pending_batches": 1 + }, + "process_start_to_exports_s": 645.5937263965607, + "validation": { + "passed": true, + "episodes": 2, + "turns": 40, + "candidates": 160, + "review_turns": [ + [ + "en", + 6, + 0.7 + ] + ], + "checks": [ + "pure 50/50 argmax; no WER gate", + "correct reference per speaker", + "selected PCM equals candidate", + "exact prompt and preserved transcript", + "MP3 hashes/format", + "400ms gaps", + "batch timing counted once", + "old versus new runner GPU token/PCM invariance" + ] + }, + "caveats": [ + "Existing compiler cache; no repeated timing sweep. First production batch includes capture.", + "Shared host, new prompts and 512 rather than earlier 256 semantic buckets; not an isolated throughput ablation.", + "English turn 6 terminates after its first sentence. Strict argmax output is preserved; a separately labeled listening repair is not the strict experiment.", + "Scores are model estimates; the listener approved the sparse spontaneous style on 8 November 2026, including the separately labeled complete English listening copy." + ], + "additional_listening_copy": { + "changed_turn_zero_based": 6, + "original_winner": 0, + "original_reward": 0.5001108025511105, + "policy": "Additional content-repaired listening copy only. Highest original 50/50 reward among alternatives passing content and alignment review. This adds a content eligibility check and is NOT the strict reward experiment. Original candidates, argmax, episode and audit are unchanged. No new synthesis or voice conversion.", + "generation_seconds": 0, + "replacement_candidate": 1, + "replacement_reward": 0.49966918770223856, + "replacement_wer": 0.03333333333333333, + "seconds": 201.216 + }, + "optimization_flags": { + "HVS_CHUNK_RAMP": "1", + "HVS_CODEC_FUSED": "1", + "HVS_CODEC_GRAPH": "1", + "HVS_FAST_SAMPLE": "1", + "HVS_LARGE17_LAYERWISE": "1", + "HVS_LOCAL_COMPILE": "0", + "HVS_LOCAL_TRITON": "1", + "HVS_RAMP_START": "3", + "HVS_RL_PRECISION": "bf16_merged", + "HVS_SEMANTIC_BANKS": "2", + "HVS_SEMANTIC_BUCKET": "512", + "HVS_SEMANTIC_COMPILE": "1", + "HVS_SEMANTIC_CUDA_GRAPH": "1" + }, + "browser_validation": { + "passed": true, + "audio_players_actually_played": 7, + "mobile_overflow": false, + "page_errors": [] + }, + "current_default": "spontaneous", + "listener_approved": "2026-11-08" +} diff --git a/optimized_pipeline/browser_verify.cjs b/optimized_pipeline/browser_verify.cjs new file mode 100644 index 0000000000000000000000000000000000000000..76ba4149390de2a0595af855743c604b48c76df0 --- /dev/null +++ b/optimized_pipeline/browser_verify.cjs @@ -0,0 +1,45 @@ +// NODE_PATH=/path/to/node_modules node browser_verify.cjs /path/to/index.html +// Uses the installed Chrome; does not download another browser or touch GPUs. +const {chromium}=require('playwright'); +const fs=require('fs'); +const path=require('path'); +const {pathToFileURL}=require('url'); + +(async()=>{ + const target=path.resolve(process.argv[2]||'podcast-episodes-stream-comparison/index.html'); + const expected=Number(process.argv[3]||8); + const browser=await chromium.launch({executablePath:process.env.CHROME_BIN||'/usr/bin/google-chrome', + headless:true,args:['--disable-gpu','--no-sandbox','--mute-audio', + '--autoplay-policy=no-user-gesture-required','--allow-file-access-from-files']}); + try { + const page=await browser.newPage({viewport:{width:1280,height:1000}}); + const errors=[];page.on('pageerror',e=>errors.push(String(e))); + await page.goto(pathToFileURL(target).href); + const count=await page.locator('audio').count(); + if(count!==expected)throw new Error(`Expected ${expected} audio players, got ${count}`); + const results=[]; + for(let i=0;i{a.preload='auto';a.load()}); + await page.waitForFunction(i=>document.querySelectorAll('audio')[i].readyState>=2,i,{timeout:30000}); + await page.locator('audio').nth(i).evaluate(a=>a.play()); + // Starting an audio output device can take longer than 400 ms on a + // shared headless host. Require actual playback progress, not a delay. + await page.waitForFunction(i=>document.querySelectorAll('audio')[i].currentTime>=.2,i,{timeout:15000}); + const report=await page.locator('audio').nth(i).evaluate(a=>{ + const r={source:a.getAttribute('src'),duration:a.duration,currentTime:a.currentTime,error:a.error?.message||null}; + a.pause();return r; + }); + if(report.error||report.currentTime<.1||report.duration<1)throw new Error(JSON.stringify(report)); + results.push(report); + } + await page.screenshot({path:path.join(path.dirname(target),'browser-desktop.png'),fullPage:true}); + await page.setViewportSize({width:390,height:844}); + const overflow=await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth+2); + await page.screenshot({path:path.join(path.dirname(target),'browser-mobile.png'),fullPage:true}); + if(errors.length)throw new Error(errors.join('\n')); + fs.writeFileSync(path.join(path.dirname(target),'browser-validation.json'),JSON.stringify( + {passed:!overflow,played:results,mobile_body_overflow:overflow,page_errors:errors},null,2)); + if(overflow)throw new Error('Unexpected horizontal overflow on mobile'); + console.log(`All ${expected} audio players actually played; desktop/mobile checks passed.`); + } finally {await browser.close()} +})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/optimized_pipeline/compare_n.py b/optimized_pipeline/compare_n.py new file mode 100644 index 0000000000000000000000000000000000000000..641be5c79a6368dad8c03730fc8543527a1384bc --- /dev/null +++ b/optimized_pipeline/compare_n.py @@ -0,0 +1,33 @@ +"""Generate N=2 and N=1 with one model load; audit/export each run afterwards.""" +import argparse,json,time,gc +from pathlib import Path +from recipe import HERE,dump +from run import setup +from speaker_run import arguments,main as generate +from inputs import load_inputs + +def main(): + p=argparse.ArgumentParser(description=__doc__);p.add_argument('--model',required=True);p.add_argument('--output',required=True);p.add_argument('--device',default='cuda:0');a=p.parse_args() + setup(a.device) + import torch + from generation import Generator + from speaker_scoring import SpeakerScorer + torch.set_num_threads(4);torch.cuda.set_device(a.device) + root=Path(a.output).resolve();root.mkdir(parents=True,exist_ok=True) + started=time.perf_counter() + template=arguments(['--model',a.model,'--device',a.device]) + refs,_,_=load_inputs(template);scorer=SpeakerScorer(a.device,refs);g=Generator(a.model,refs,a.device) + shared_load=time.perf_counter()-started + runs=[] + try: + for n,groups in [(2,4),(1,8)]: + out=root/f'n{n}'/'generation' + args=arguments(['--model',a.model,'--device',a.device,'--n',str(n),'--groups',str(groups),'--output',str(out)]) + out.mkdir(parents=True,exist_ok=True);dump(out/'process-start.json',dict(created_unix=time.time())) + generate(args,resources=(g,scorer)) + runs.append(dict(n=n,groups=groups,path=str(out))) + finally: + g.close();del scorer,g;gc.collect();torch.cuda.empty_cache() + dump(root/'generation-complete.json',dict(runs=runs,shared_load_seconds=shared_load,seconds=time.perf_counter()-started, + note='Two fresh candidate pools; same scripts/references/settings. Eight simultaneous candidates via N2×4 turns or N1×8 turns. Random draws/batch assignment differ from N4; not matched sample trajectories. N1 has no online ranking.')) +if __name__=='__main__':main() diff --git a/optimized_pipeline/compare_report.py b/optimized_pipeline/compare_report.py new file mode 100644 index 0000000000000000000000000000000000000000..bfb8f3ff84d998af6ebadc87a418188470f53834 --- /dev/null +++ b/optimized_pipeline/compare_report.py @@ -0,0 +1,55 @@ +"""Build a listening comparison from audited, already-generated N=1/2/4 episodes.""" +import argparse,html,json,os +from pathlib import Path +from recipe import dump + +def main(): + p=argparse.ArgumentParser(description=__doc__) + for n in (1,2,4):p.add_argument(f'--n{n}',required=True) + p.add_argument('--output',required=True);a=p.parse_args();out=Path(a.output).resolve();out.mkdir(parents=True,exist_ok=True) + rows=[];cards=[];configs={};components={};measurements={} + def link(path):return html.escape(os.path.relpath(path,out)) + for n in (1,2,4): + root=Path(getattr(a,f'n{n}')).resolve();m=json.loads((root/'manifest.json').read_text());configs[n]=m['configuration'] + assert configs[n]['n']==n and configs[n]['prompt_style']=='spontaneous' + runs=Path(m['generated_from']);batch=json.loads((runs/'production-batches.json').read_text()) + components[n]={key:sum(x.get(key,0) for x in batch) for key in ('batch_wall_seconds','token_seconds','codec_seconds','scoring_seconds','graph_capture_seconds')} + measurements[n]=m['stage_times'] + for e in m['episodes']: + row={key:e[key] for key in ('language','seconds','inference_seconds','useful_rtf','mean_genuineness','mean_speaker_cosine','mean_wer','review_turns')};row['n']=n;rows.append(row) + label=f"{e['language'].upper()} · {'Single take' if n==1 else f'Best-of-{n}'}" + cards.append(f"") + # Compare effective spoken scripts and cues, not machine-specific file paths. + for n in (1,2): + assert sorted(configs[n]['scripts'].values())==sorted(configs[4]['scripts'].values()) + if configs[4].get('effective_jobs'):assert configs[n]['effective_jobs']==configs[4]['effective_jobs'] + assert configs[n]['general']==configs[4]['general'] + for speaker in configs[4]['references']: + assert configs[n]['references'][speaker]['sha256']==configs[4]['references'][speaker]['sha256'] + repaired=Path(a.n4).resolve()/'meaning-of-life-en-spontaneous-listening-repair.mp3' + if repaired.exists(): + cards.append(f"

EN · N4 complete listening copy

Download MP3

The previously approved listening version. Only incomplete turn 6 was replaced with another saved candidate after a content check. This is not the strict argmax shown in the metrics table.

") + table=''.join(f"{r['language'].upper()}{r['n']}{r['seconds']:.1f} s{r['inference_seconds']:.1f} s{r['useful_rtf']:.3f}{r['mean_genuineness']:.3f}{r['mean_speaker_cosine']:.3f}{r['mean_wer']:.1%}{len(r['review_turns'])}/20" for r in sorted(rows,key=lambda r:(r['language'],r['n']))) + stages=''.join(f"{n}{c['token_seconds']:.1f} s{c['codec_seconds']:.1f} s{c['scoring_seconds']:.1f} s{c['batch_wall_seconds']:.1f} s" for n,c in components.items()) + caveats=['N1 and N2 run with an unrelated training job on the same GPU, using separate token and codec/judge phases. Prior N4 used integrated execution under different GPU load. Timing differences are not an isolated causal effect of N.', + 'Same words, sparse cues, reference pair, temperature 1.0, CFG 2.5 and 50/50 reward. Fresh generation; batch grouping and seeds differ, so the runs are not nested candidate subsets.', + 'N1 skips online ranking and keeps its only take. All selected outputs get the same final diagnostic audit; no silent content repair.', + 'Genuineness, ECAPA cosine and ASR WER are imperfect model estimates. Forty turns per mode do not establish a universal quality ranking.', + 'Prior strict English N4 contains an incomplete turn 6. Its separately labeled repaired listening copy is not used in this table.', + 'Useful RTF divides production time by final edited audio duration. Loading, correctness probes, final audit and MP3 export are excluded. Phased production is a sum of stage work, not request-to-first-audio latency.'] + payload=dict(recipe='approved sparse spontaneous',hardware='RTX 3090 24 GB; shared host',episodes=rows,components=components,caveats=caveats) + dump(out/'comparison.json',payload) + (out/'index.html').write_text(f'''Podcast · Single take versus Best-of-2 and Best-of-4 + +

Same podcast, fewer candidate takes

Two twenty-turn episodes about meaning, responsibility and everyday care. The approved prompt asks for authentic, genuine, relaxed and gentle spontaneous delivery, using the same German reference voices in both languages. No voice conversion.

+
These are real fresh generations. The shared GPU workload changed after the N4 baseline. Read the timing limits below before comparing speed.
+

Measured results

{table}
LanguageNFinal audioGenerate + rankRTF ↓Genuine / 6 ↑Speaker cosine ↑Mean turn WER ↓Review flags
+

For N above one: reward = 0.5 × clip(genuineness / 6, 0, 1) + 0.5 × clip(reference ECAPA cosine, 0, 1). WER never selects the winner. N=1 has no choice or retry.

+

Listen

{''.join(cards)}
+

Where the production time goes · both languages

{stages}
NPolicy tokensCodecOnline rankingProduction sum
+

How to interpret this comparison

    {''.join('
  • '+html.escape(x)+'
  • ' for x in caveats)}
+

Each speaker turn is generated independently. N2 groups four turns and N1 groups eight turns per policy batch, keeping eight candidates in flight. N4 grouped two turns × four candidates. Deferred decoding lowers simultaneous VRAM use; it is an offline fallback, not streaming.

+

Further speed work

The conservative next step is a warmed, dedicated GPU worker and cached reference embeddings. Then test length-aware grouping and safe finished-row compaction: long candidates keep batches running after other rows have ended. Do not shorten the cap without checking that all words are present. Compare N on the same idle GPU and warm-up policy before claiming a percentage speedup.

+

Machine-readable results · Weights, current defaults and full guides

''') + print(json.dumps(payload,indent=2)) +if __name__=='__main__':main() diff --git a/optimized_pipeline/finish.py b/optimized_pipeline/finish.py new file mode 100644 index 0000000000000000000000000000000000000000..f7ba1308f7480cf165d71b2190066a40eb5445f0 --- /dev/null +++ b/optimized_pipeline/finish.py @@ -0,0 +1,180 @@ +"""Independent final audit, word-clock editing and listener comparison export. + +Streaming commits remain untouched. The polished MP3 is a separate offline +assembly with boundary trims/fades and a 400ms word-to-word turn gap. +""" +import argparse +import gc +import html +import importlib.util +import json +from pathlib import Path +import statistics +import shutil +import sys +import time +from concurrent.futures import ProcessPoolExecutor +from recipe import HERE, WORKSPACE, SR, GENERAL, dump, sha, errors, reward + +def audio_module(): + spec=importlib.util.spec_from_file_location('podcast_export',HERE/'runtime/audio_export.py') + module=importlib.util.module_from_spec(spec); spec.loader.exec_module(module) + module.ROOT=HERE + return module + +def safe_export(wave,path,title,language): + """Publish a filename only after encoding and full decode validation succeed.""" + path=Path(path) + pending=path.with_name('.'+path.stem+'.pending.mp3') + receipt=audio_module().export(wave,pending,title,language) + pending.replace(path) + pending.with_suffix('.source.flac').replace(path.with_suffix('.source.flac')) + receipt['file']=path.name + return receipt + +def export_episode(job): + import soundfile as sf + import numpy as np + name,lang,rows,out=job + out=Path(out); audio=audio_module() + wave,timeline=audio.assemble(rows) + for timing,row in zip(timeline,rows): + timing['timing_basis']=row['edit'].get('timing_basis','forced_alignment_estimate') + stem=f'meaning-of-life-{lang}-{name}' + tick=time.perf_counter() + receipt=safe_export(wave,out/(stem+'.mp3'),f'Meaning of life — {name} — authentic/genuine',lang) + receipt.update(language=lang,variant=name,turns=len(rows),export_seconds=time.perf_counter()-tick, + mean_genuineness=statistics.mean(r['audit']['ears']['genuineness_0_6'] for r in rows), + mean_wer=statistics.mean(r['audit']['wer'] for r in rows), + mean_ce_diagnostic=statistics.mean(r['audit']['ears']['audiobox:CE'] for r in rows), + mean_mos_diagnostic=statistics.mean(r['audit']['ears']['dnsmos:P808_MOS'] for r in rows), + inference_seconds=sum(r['performance']['wall_seconds'] for r in rows), + median_first_commit=statistics.median(r['performance']['first_commit_seconds'] for r in rows), + review_turns=[r['turn']['index'] for r in rows if r['audit']['review_required']]) + receipt['useful_rtf']=receipt['inference_seconds']/(len(wave)/SR) + dump(out/(stem+'.timeline.json'),timeline) + dump(out/(stem+'.audit.json'),rows) + (out/(stem+'.srt')).write_text('\n\n'.join(str(i+1)+'\n'+audio.stamp(t['speech_start_s'])+ + ' --> '+audio.stamp(t['speech_end_s'])+'\n'+t['speaker']+': '+t['text'] for i,t in enumerate(timeline))+'\n') + # Exact emitted PCM: preserve every commit and its natural tail, with an + # explicitly artificial 400ms inter-turn gap for this replay file only. + chunks=[] + for row in rows: + folder=Path(row['source_folder']) + chunks.append(sf.read(folder/'raw.flac',dtype='float32')[0]) + chunks.append(np.zeros(round(.4*SR),np.float32)) + stream_path=out/(stem+'-untrimmed-stream.flac') + sf.write(stream_path,np.concatenate(chunks[:-1]),SR,subtype='PCM_24') + receipt['untrimmed_stream_file']=stream_path.name + return receipt + +def build_page(out,receipts,configuration,stage_times): + headers='Language / methodLengthMedian first commitUseful RTFGenuineness / 6WERReview turns' + table=[];cards=[] + for r in receipts: + seconds=round(r['seconds']);duration=f'{seconds//60}:{seconds%60:02d}' + table.append(f"{r['language'].upper()} · {r['variant']}{duration}{r['median_first_commit']:.2f}s{r['useful_rtf']:.2f}{r['mean_genuineness']:.2f}{r['mean_wer']:.1%}{len(r['review_turns'])}") + stem=Path(r['file']).stem + review=('Review flagged turns (zero-based): '+', '.join(map(str,r['review_turns']))) if r['review_turns'] else 'No turns exceeded the audit review threshold.' + cards.append(f"

{r['language'].upper()} · {r['variant']}

{duration} · MP3, mono, 192 kbps

Download edited episode · Untrimmed commit replay

Genuineness {r['mean_genuineness']:.2f}/6 · WER {r['mean_wer']:.1%}

{review}

Per-turn scores and transcripts · Subtitles

") + reference_cards=''.join(f"

{html.escape(s)} ·

" for s,v in configuration['references'].items()) + content=f''' +Podcast: single GPU, new references and causal search +

Podcast listening comparison

New generations using the Podcast checkpoint and its two published German reference clips, identical for English and German. General direction: Very authentic, very genuine. No pleasantness instruction, no voice conversion and no Content Enjoyment in the reward.

+
{headers}{''.join(table)}
+

RTF = synthesis and online selection time / final edited audio duration; lower is faster. Loading, final audit and MP3 export are measured separately. First commit includes online ranking for search and a complete turn for whole-turn Best-of-N; it is not an end-to-end browser playback measurement. The shared RTX 3090 also ran another user's training job. Means are model estimates, not listening-test results.

+
{''.join(cards)}

What changes between methods?

+

Single: one sampled continuation, no selection. Best-of-N: N batched complete turns, ranked by normalized genuineness divided by (1 + WER). Chunk-N: N continuations of the same prefix, score cumulative decoded speech every 13 frames (1.04 seconds), commit the winner and fork its semantic CFG caches and causal codec state. The full unspoken script suffix is free in prefix WER. This is a causal search experiment, not conventional token beam search.

+

The polished files use a separate final forced-alignment pass, small fades outside speech and a 400ms word-to-word gap. If alignment fails, that turn is flagged for review and retained untrimmed; its timeline explicitly uses unverified clip edges instead of claimed word times. This editing cannot retroactively change audio already emitted live. The untrimmed replay links preserve those emitted samples, with a 400ms inter-turn gap; commit timestamps are in the run logs. Very short-window quality scores and ASR are uncertain; chunk search is not guaranteed to improve naturalness.

+

Exact shared references

{reference_cards} +

Prompt

{html.escape(GENERAL)}
+

Reproduce and inspect

Pipeline manual · Manifest and measurements

The manifest records the local run directory containing code, candidate audio, scores and immutable commit logs.

+
{html.escape(json.dumps(stage_times,indent=2))}
''' + (out/'index.html').write_text(content) + +def main(args): + from run import setup + setup(args.device) + import numpy as np + import soundfile as sf + import torch + from scoring import Scorer, audio16 + from align_engine import QwenAligner + from generate import crop + torch.set_num_threads(4);torch.cuda.set_device(args.device) + runs=Path(args.runs).resolve();out=Path(args.output).resolve();out.mkdir(parents=True,exist_ok=True) + configuration=json.loads((runs/'configuration.json').read_text()) + (out/'references').mkdir(exist_ok=True) + for item in configuration['references'].values(): + shutil.copyfile(HERE/item['path'],out/'references'/Path(item['path']).name) + shutil.copyfile(HERE/'references/PROVENANCE.json',out/'references/PROVENANCE.json') + shutil.copyfile(HERE/'README.md',out/'PIPELINE.md') + paths=sorted(runs.glob('*/*/result.json')) + if not paths:raise ValueError('No generated turns') + tick=time.perf_counter() + scorer=Scorer(args.device,args.asr_url) + aligner=QwenAligner(device=args.device) + assert aligner.ok + load_s=time.perf_counter()-tick;audit_start=time.perf_counter();groups={} + for path in paths: + row=json.loads(path.read_text());folder=path.parent;checked=folder/'audited.json' + if checked.exists(): + row=json.loads(checked.read_text()) + else: + wave,sr=sf.read(folder/'raw.flac',dtype='float32');assert sr==SR + start=time.perf_counter() + alignment=aligner.align(audio16(wave),row['turn']['text'].split(),language='German' if row['language']=='de' else 'English') + good=bool(alignment) and all(w[3]>.5 for w in alignment) + first,last=(float(alignment[0][1]),float(alignment[-1][2])) if good else (0.,len(wave)/SR) + good=good and 0<=first.15 or not good, + 'alignment':report,'wall_seconds':time.perf_counter()-start,**timing}) + dump(checked,row) + print('AUDIT',row['variant'],row['language'],row['turn']['index'], + 'WER',round(score['wer'],3),'G',round(score['ears']['genuineness_0_6'],2),flush=True) + groups.setdefault((row['variant'],row['language']),[]).append(row) + audit_s=time.perf_counter()-audit_start + del scorer,aligner;gc.collect();torch.cuda.empty_cache() + dump(runs/'gpu-finished.json',dict(finished_unix=time.time(),audit_load_seconds=load_s,audit_seconds=audit_s)) + jobs=[(name,lang,sorted(rows,key=lambda r:r['turn']['index']),str(out)) for (name,lang),rows in sorted(groups.items())] + export_start=time.perf_counter() + with ProcessPoolExecutor(max_workers=2) as pool: + receipts=list(pool.map(export_episode,jobs)) + times=dict(final_audit_load_seconds=load_s,final_audit_seconds=audit_s, + export_wall_seconds=time.perf_counter()-export_start, + retained_turn_count=len(paths), + retained_turn_inference_seconds=sum(r['inference_seconds'] for r in receipts), + retained_turn_audit_seconds=sum(r['audit']['wall_seconds'] for rows in groups.values() for r in rows), + final_audit_scope_note='Final audit timing describes this invocation; previously audited turns are reused. retained_turn_audit_seconds sums all retained per-turn audits, excluding model loading.') + if (runs/'generation-complete.json').exists(): + times['generation']=json.loads((runs/'generation-complete.json').read_text()) + times['generation_scope_note']='Generation timing describes the latest invocation only; resumption can retain earlier turns. Episode inference_seconds sums the retained turns. Discarded experiments are not included.' + dump(out/'manifest.json',dict(configuration=configuration,episodes=receipts,stage_times=times, + generated_from=str(runs),code_sha256={p.name:sha(p) for p in HERE.glob('*.py')})) + build_page(out,receipts,configuration,times) + print('EXPORTED',len(receipts),'episodes',out,flush=True) + +if __name__=='__main__': + p=argparse.ArgumentParser(description=__doc__) + p.add_argument('--runs',default=str(HERE/'runs')) + p.add_argument('--output',default=str(WORKSPACE/'podcast-episodes-stream-comparison')) + p.add_argument('--device',default='cuda:1');p.add_argument('--asr-url',default=None) + main(p.parse_args()) diff --git a/optimized_pipeline/finish_comparison.py b/optimized_pipeline/finish_comparison.py new file mode 100644 index 0000000000000000000000000000000000000000..feef2a353fb50a30002eaf7dea2370b853b9f52e --- /dev/null +++ b/optimized_pipeline/finish_comparison.py @@ -0,0 +1,21 @@ +"""Audit/export all generated N modes with one reusable set of frozen judges.""" +import argparse,gc,json,time +from pathlib import Path +from types import SimpleNamespace +from recipe import dump +from speaker_finish import main as finish +from run import setup + +def main(): + p=argparse.ArgumentParser(description=__doc__);p.add_argument('--runs',required=True);p.add_argument('--output');p.add_argument('--device',default='cuda:0');p.add_argument('--asr-url');a=p.parse_args();setup(a.device) + import torch + from speaker_scoring import SpeakerScorer + from audit_alignment import BoundaryAligner + torch.set_num_threads(4);root=Path(a.runs);out=Path(a.output or a.runs);ns=json.loads((root/'generation-complete.json').read_text())['n'];tick=time.perf_counter() + config=json.loads((root/f'n{ns[0]}/generation/configuration.json').read_text()) + scorer=SpeakerScorer(a.device,config['references'],load_asr=True,asr_url=a.asr_url);aligner=BoundaryAligner(a.device) + for n in ns:finish(SimpleNamespace(runs=str(root/f'n{n}/generation'),output=str(out/f'n{n}'),device=a.device,asr_url=a.asr_url),resources=(scorer,aligner)) + del scorer,aligner;gc.collect();torch.cuda.empty_cache() + dump(root/'gpu-finished.json',dict(n=ns,seconds=time.perf_counter()-tick,finished_unix=time.time())) + dump(out/'exports-complete.json',dict(n=ns,time=time.time())) +if __name__=='__main__':main() diff --git a/optimized_pipeline/generation.py b/optimized_pipeline/generation.py new file mode 100644 index 0000000000000000000000000000000000000000..d79563fe23425ecd869d3a74904dcdab1a2a32ca --- /dev/null +++ b/optimized_pipeline/generation.py @@ -0,0 +1,384 @@ +"""Large Podcast model: batched turns and genuine causal winner-of-N search. + +All branches share weights, never mutable KV state. The selected semantic KV +is copied in place to preserve CUDA graph addresses; codec state forks too. +""" +import os +import gc +import json +import time +from types import MethodType +from pathlib import Path +import numpy as np +import torch +from recipe import SR, specification, chunk_choice +from performance_core import combine_branches, StreamingCodec, _stable_cache_update + +class DecoderOnly: + """Streaming codec without allocating unused encoder states on the GPU. + + The decoder is identical to upstream _decode_frame. Avoid its device probe: + after encoder offload, next(codec.parameters()) points to CPU. + """ + def __init__(self, codec, n, pad=-1): + self.codec, self.n, self.pad = codec, n, pad + self.modules = [m for m in codec.decoder.modules() if hasattr(m, '_init_streaming_state')] + def __enter__(self): + for module in self.modules: + assert module._streaming_state is None + module._streaming_state = module._init_streaming_state(self.n) + return self + def __exit__(self, *args): + for module in self.modules: + module._streaming_state = None + def decode(self, codes): + valid = codes[:,:,0].ne(self.pad) + lengths = valid.sum(-1) + codes = codes.masked_fill(~valid.unsqueeze(-1), 0) + for module in self.modules: + module._streaming_state.set_exec_mask(lengths > 0) + with torch.autocast('cuda', dtype=torch.bfloat16): + audio = self.codec.quantizer.decode_codes(codes.permute(2,0,1).contiguous()).float() + for module in self.codec.decoder: + audio, lengths = module(audio, lengths) + audio, lengths = self.codec._restore_channels_from_codec(audio, lengths) + return audio.float().mean(1), lengths + +class DecoderGraph(DecoderOnly): + """One persistent graph for the common chunk shape, including N>1. + + Short terminal blocks use the same state eagerly. Unlike the demo's batch-1 + bank, this captures only one useful shape instead of all twenty shapes. + """ + def __init__(self, codec, n, pad=-1, frames=13): + super().__init__(codec,n,pad) + self.frames=frames + self.states=[m._init_streaming_state(n) for m in self.modules] + self.graph=None + self.capture_seconds=0. + def reset(self): + for state in self.states:state.reset(torch.ones_like(state.exec_mask)) + def __enter__(self): + for module,state in zip(self.modules,self.states): + assert module._streaming_state is None + module._streaming_state=state + if hasattr(type(module),'_update_streaming_cache'): + module._update_streaming_cache=MethodType(_stable_cache_update,module) + if self.graph is None: + tick=time.perf_counter() + device=next(self.codec.decoder.parameters()).device + self.static=torch.zeros(self.n,self.frames,12,dtype=torch.long,device=device) + stream=torch.cuda.Stream(device=device) + stream.wait_stream(torch.cuda.current_stream(device)) + with torch.cuda.stream(stream): + for _ in range(2):super().decode(self.static) + torch.cuda.current_stream(device).wait_stream(stream) + self.reset() + self.graph=torch.cuda.CUDAGraph() + with torch.cuda.graph(self.graph,stream=stream):self.output=super().decode(self.static) + torch.cuda.current_stream(device).wait_stream(stream) + torch.cuda.synchronize(device) + self.capture_seconds=time.perf_counter()-tick + self.reset() + return self + def __exit__(self,*args): + for module in self.modules: + module._streaming_state=None + module.__dict__.pop('_update_streaming_cache',None) + def decode(self,codes): + if codes.shape[1]!=self.frames:return super().decode(codes) + self.static.copy_(codes) + self.graph.replay() + return self.output[0].clone(),self.output[1].clone() + +def fork_codec(codec,indexes,n): + """Preserve tensor addresses used by the decoder graph while cloning rows.""" + for module in codec.decoder.modules(): + state=getattr(module,'_streaming_state',None) + if state is None:continue + for name,value in vars(state).items(): + if torch.is_tensor(value): + if value.ndim==0 or value.shape[0]!=n: + raise ValueError(f'Unknown codec state shape: {name} {tuple(value.shape)}') + value.copy_(value.index_select(0,indexes)) + +def prefill_bounded(bank, ids, mask, microbatch=2): + """Bound transient MLP activations; the same batched KV layout is retained.""" + length = ids.shape[1] + bank.allowed.zero_() + bank.allowed[:, :length].copy_(mask) + bank.position.fill_(length) + local = [] + for start in range(0, len(ids), microbatch): + stop = min(len(ids), start+microbatch) + out = bank.forward(inputs_embeds=bank.model._build_inputs_embeds(ids[start:stop]), + input_ids=None, attention_mask=mask[start:stop], past_key_values=None, + use_cache=True, return_dict=True) + if not bank.cache: + for key, value in out.past_key_values: + shape = (bank.nb, bank.capacity, *key.shape[2:]) + bank.cache.append((key.new_zeros(shape), value.new_zeros(shape))) + for (key,value),(stored_key,stored_value) in zip(out.past_key_values,bank.cache): + stored_key[start:stop,:length].copy_(key) + stored_value[start:stop,:length].copy_(value) + local.append(bank.model._global_hidden_to_local(out.last_hidden_state[:,-1]).to( + bank.model.local_transformer.ln_f.weight.dtype)) + del out + return torch.cat(local) + +def fork_semantic(bank, winner, n, branches, used): + indexes = torch.tensor([winner+b*n for b in range(branches) for _ in range(n)], + device=bank.device) + # Only past positions have meaning. Retain allocations/addresses held by graphs. + for pair in bank.cache: + for value in pair: + value[:, :used].copy_(value[:, :used].index_select(0, indexes)) + for value in (bank.allowed, bank.ids, bank.query_valid): + value.copy_(value.index_select(0, indexes)) + return indexes + +class Generator: + def __init__(self, model_root, reference_config, device, scorer=None): + from transformers.dynamic_module_utils import get_class_from_dynamic_module + from phased_generate import TokenEngine + from recipe import HERE, references + import soundfile as sf + self.device, self.scorer = device, scorer + root = Path(model_root) + Processor = get_class_from_dynamic_module('processing_moss_tts.MossTTSLocalProcessor', str(root)) + self.proc = Processor.from_pretrained(str(root), codec_path=os.environ.get('PODCAST_CODEC','OpenMOSS-Team/MOSS-Audio-Tokenizer-v2'), + codec_weight_dtype='bf16', codec_compute_dtype='bf16') + self.proc.audio_tokenizer.to(device).eval() + refs = {} + paths = references(reference_config) + for name, item in reference_config.items(): + if item.get('codes'): + with np.load(HERE/item['codes']) as source: + refs[name] = torch.from_numpy(source[item['code_key']].astype(np.int64)) + else: + wave, sr = sf.read(paths[name], dtype='float32', always_2d=True) + with torch.cuda.device(device), torch.autocast('cuda', dtype=torch.bfloat16): + refs[name] = self.proc.encode_audios_from_wav(torch.from_numpy(wave.mean(1)).unsqueeze(0), sr, n_vq=12)[0].cpu() + assert refs[name].ndim == 2 and refs[name].shape[1] == 12 and 63 <= len(refs[name]) <= 250 + # Prove decoder-only residency against the upstream streaming primitive + # before enabling it; this also checks heterogeneous padded batch rows. + with torch.inference_mode(), torch.cuda.device(device): + audio_pad=int(json.loads((root/'config.json').read_text())['audio_pad_token_id']) + test_codes=next(iter(refs.values()))[:26].to(device).unsqueeze(0).repeat(4,1,1) + test_codes[2,13:]=audio_pad + test_codes[3,21:]=audio_pad + def decode_test(factory): + chunks=[];lengths=[] + with factory(self.proc.audio_tokenizer,4,audio_pad) as stream: + for part in test_codes.split(13,dim=1): + audio,size=stream.decode(part) + chunks.append(audio.clone());lengths.append(size.clone()) + torch.cuda.synchronize(device) + return chunks,lengths + native,native_sizes=decode_test(StreamingCodec) + # Reference encoding has finished. The large encoder is never called + # by synthesis, so keep it in CPU RAM rather than occupying VRAM. + self.proc.audio_tokenizer.encoder.to('cpu') + gc.collect() + torch.cuda.empty_cache() + with torch.inference_mode(),torch.cuda.device(device): + direct,direct_sizes=decode_test(DecoderOnly) + assert all(torch.equal(a,b) for a,b in zip(native,direct)) + assert all(torch.equal(a,b) for a,b in zip(native_sizes,direct_sizes)) + import codec_fused + codec_fused.install(self.proc.audio_tokenizer) + fused,fused_sizes=decode_test(DecoderOnly) + exact=all(torch.equal(a,b) for a,b in zip(native,fused)) and all(torch.equal(a,b) for a,b in zip(native_sizes,fused_sizes)) + if not exact: + codec_fused.uninstall(self.proc.audio_tokenizer) + self.codec_validation=dict(decoder_only_bit_identical=True,fused_bit_identical=exact, + fused_enabled=exact,batch_size=4,frames=26,heterogeneous_lengths=True) + graph_stream=DecoderGraph(self.proc.audio_tokenizer,4,audio_pad,13) + graph_audio=[];graph_sizes=[] + with graph_stream as stream: + for part in test_codes.split(13,dim=1): + audio,size=stream.decode(part);graph_audio.append(audio);graph_sizes.append(size) + self.codec_validation['graph_bit_identical']=all(torch.equal(a,b) for a,b in zip(native,graph_audio)) and all(torch.equal(a,b) for a,b in zip(native_sizes,graph_sizes)) + assert self.codec_validation['graph_bit_identical'], 'Batched codec graph changed PCM' + self.codec_streams={(4,13):graph_stream} + del native,native_sizes,direct,direct_sizes,fused,fused_sizes,test_codes + print('CODEC CHECK',self.codec_validation,flush=True) + # Avoid redundant FP32 allocations in the model constructor. + previous = torch.get_default_dtype() + torch.set_default_dtype(torch.bfloat16) + try: + self.engine = TokenEngine(root, self.proc, refs) + finally: + torch.set_default_dtype(previous) + assert self.engine.device == device + self.engine.fast.graph_limit = 2 + gc.collect() + torch.cuda.empty_cache() + print('RESIDENT GPU GB',round(torch.cuda.memory_allocated(device)/1e9,3), + 'policy GB',round(sum(p.numel()*p.element_size() for p in self.engine.model.parameters())/1e9,3), + 'codec GPU GB',round(sum(p.numel()*p.element_size() for p in self.proc.audio_tokenizer.parameters() if p.is_cuda)/1e9,3),flush=True) + + @torch.inference_mode() + def run(self, turn, language, n=4, mode='turn', chunk_frames=13, max_frames=320, + temperature=1., guidance=2.5, seed=8117, on_commit=None, force_winner=None): + if not 1 <= n <= 16 or mode not in ('turn', 'chunk') or not 1 <= chunk_frames <= 40: + raise ValueError('N must be 1..16; mode turn/chunk; chunk 1..40 codec frames') + if self.scorer is None and n > 1 and force_winner is None: + raise ValueError('N>1 needs a scorer') + eng = self.engine + model, cfg = eng.model, eng.model.config + spec = specification(turn, language) + p = dict(max_new_tokens=max_frames, audio_temperature=temperature, audio_top_p=.95, + audio_top_k=50, audio_repetition_penalty=1., text_temperature=1., text_top_p=1., text_top_k=50) + started = time.perf_counter() + with torch.cuda.device(self.device), torch.autocast('cuda', dtype=torch.bfloat16): + branches = [eng.pack(spec['prompt'], spec, eng.refs[turn['speaker']], n)] + if guidance != 1: + branches.append(eng.pack(spec['unconditional'], spec, eng.refs[turn['speaker']], n)) + ids, initial = combine_branches(branches, cfg.pad_token_id, cfg.audio_pad_token_id) + nb, length = len(branches), ids.shape[1] + masks = torch.zeros(n*nb, length+max_frames, dtype=torch.bool, device=self.device) + masks[:, :length] = initial + bank = eng.fast.semantic.prepare(ids, max_frames) + model_input = ids + finished = torch.zeros(n, dtype=torch.bool, device=self.device) + codes = torch.empty(n, 0, 12, dtype=torch.long, device=self.device) + pcm = [np.empty(0, np.float32) for _ in range(n)] + torch.manual_seed(seed) + torch.cuda.manual_seed_all(seed) + steps, committed, first_commit, winner = 0, 0, None, 0 + previous_progress, stagnant = 0, 0 + timeline, final_scores = [], None + generation_s, codec_s, fork_s = 0., 0., 0. + capture_before = eng.fast.capture_seconds + torch.cuda.reset_peak_memory_stats(self.device) + decoder = self.proc.audio_tokenizer + stream_key=(n,chunk_frames) + if stream_key not in self.codec_streams: + self.codec_streams[stream_key]=DecoderGraph(decoder,n,cfg.audio_pad_token_id,chunk_frames) + assert self.codec_streams[stream_key].pad==cfg.audio_pad_token_id + with self.codec_streams[stream_key] as streaming: + while steps < max_frames: + tick = time.perf_counter() + new = [] + for _ in range(min(chunk_frames, max_frames-steps)): + mask = masks[:, :length+steps] + local = prefill_bounded(bank, model_input, mask) if steps == 0 else bank.decode(model_input, mask) + token, sampled = eng.fast.frame(local, n, nb, guidance, p, graph=True) + continues = token.eq(cfg.audio_assistant_slot_token_id) & ~finished + finished |= token.eq(cfg.audio_end_token_id) + if not bool(continues.any()): + break + frame = sampled.masked_fill(~continues.unsqueeze(-1), cfg.audio_pad_token_id) + new.append(frame.clone()) + row = model._build_generation_row(n, ids.device, frame) + row[:,0,0] = torch.where(continues, row[:,0,0], cfg.pad_token_id) + model_input = row.repeat(nb,1,1) + masks[:,length+steps] = continues.repeat(nb) + steps += 1 + torch.cuda.synchronize(self.device) + elapsed = time.perf_counter()-tick + generation_s += elapsed + tick = time.perf_counter() + if new: + chunk = torch.stack(new, dim=1) + codes = torch.cat((codes, chunk), dim=1) + wave, sizes = streaming.decode(chunk) + for i in range(n): + part = wave[i,:int(sizes[i])].float().cpu().numpy().copy() + pcm[i] = np.concatenate((pcm[i], part)) + codec_elapsed = time.perf_counter()-tick + codec_s += codec_elapsed + endpoint = steps >= max_frames or bool(finished.all()) or not new + entry = dict(frame=steps, generation_seconds=elapsed, codec_seconds=codec_elapsed) + choose = mode == 'chunk' and n > 1 + if choose: + if force_winner is not None: + winner = force_winner + scores = [] + else: + # Ears sees the cumulative prefix: 1s alone is too noisy. + with torch.autocast('cuda', enabled=False): + scores, timing = self.scorer.score(pcm, turn['text'], + [endpoint or bool(f) for f in finished.cpu()]) + entry.update(timing) + winner,complete,guarded=chunk_choice(scores,turn['text'],finished.cpu().tolist(),previous_progress,stagnant) + if guarded: + entry['progress_guard'] = True + progress = scores[winner]['matched_words'] + stagnant = stagnant+1 if progress <= previous_progress else 0 + previous_progress = max(previous_progress, progress) + if complete: + endpoint = True + entry['script_complete_stop'] = True + entry.update(winner=winner, scores=scores) + final_scores = scores + if n == 1 or choose: + if not len(pcm[winner]): + raise RuntimeError('Winner has no audio') + part = pcm[winner][committed:].copy() + if len(part): + if first_commit is None: + first_commit = time.perf_counter()-started + entry.update(commit_start_s=committed/SR, + commit_end_s=len(pcm[winner])/SR, + commit_wall_seconds=time.perf_counter()-started) + if on_commit: + on_commit(part, entry) + committed = len(pcm[winner]) + timeline.append(entry) + if endpoint: + break + if choose: + tick = time.perf_counter() + branch_index = fork_semantic(bank, winner, n, nb, length+steps) + masks = masks.index_select(0, branch_index) + model_input = model_input.index_select(0, branch_index) + index = torch.full((n,), winner, dtype=torch.long, device=self.device) + codes = codes.index_select(0, index) + finished = finished.index_select(0, index) + pcm = [pcm[winner].copy() for _ in range(n)] + fork_codec(decoder,index,n) + torch.cuda.synchronize(self.device) + fork_s += time.perf_counter()-tick + # N=1 has no ranking cost. Whole-turn selection waits for all N. + if mode == 'turn' and n > 1: + if force_winner is None: + with torch.autocast('cuda', enabled=False): + final_scores, timing = self.scorer.score(pcm, turn['text']) + timeline.append({'final_scoring': True, **timing, 'scores': final_scores}) + eligible = [i for i,s in enumerate(final_scores) if s['wer'] <= .15] or list(range(n)) + winner = max(eligible, key=lambda i: (final_scores[i]['reward'], -i)) + else: + winner = force_winner + first_commit = time.perf_counter()-started + if on_commit: + on_commit(pcm[winner], {'winner': winner, 'commit_start_s': 0., + 'commit_end_s': len(pcm[winner])/SR, 'commit_wall_seconds': first_commit}) + raw = pcm[winner] + if not len(raw): + raise RuntimeError('Empty output') + selected_codes = codes[winner][codes[winner,:,0] != cfg.audio_pad_token_id].cpu() + wall = time.perf_counter()-started + perf = dict(n=n, mode=mode, chunk_frames=chunk_frames, chunk_seconds=chunk_frames*.08, + seed=seed, temperature=temperature, cfg=guidance, device=self.device, + wall_seconds=wall, raw_seconds=len(raw)/SR, raw_rtf=wall/(len(raw)/SR), + first_commit_seconds=first_commit, token_seconds=generation_s, codec_seconds=codec_s, + fork_seconds=fork_s, scoring_seconds=sum(t.get('scoring_seconds',0) for t in timeline), + graph_capture_seconds=eng.fast.capture_seconds-capture_before, + max_memory_allocated_bytes=torch.cuda.max_memory_allocated(self.device), + max_memory_reserved_bytes=torch.cuda.max_memory_reserved(self.device), + hit_frame_cap=steps >= max_frames, winner=winner, timeline=timeline, + final_scores=final_scores, prompt_tokens=length,codec_validation=self.codec_validation, + codec_graph_capture_seconds=self.codec_streams[stream_key].capture_seconds, + completion_rule='suffix_confirmed_reward_winner_v2') + arrivals=[e['commit_wall_seconds']-e['commit_start_s'] for e in timeline if 'commit_wall_seconds' in e] + perf['minimum_gap_free_start_seconds']=max(arrivals) if arrivals else first_commit + return raw, selected_codes, perf, pcm if mode == 'turn' else None + + def close(self): + self.engine.close() + self.codec_streams.clear() + self.proc.audio_tokenizer.to('cpu') + gc.collect() + torch.cuda.empty_cache() diff --git a/optimized_pipeline/inputs.py b/optimized_pipeline/inputs.py new file mode 100644 index 0000000000000000000000000000000000000000..08b4ec52c0c76c5d0841c9c71fbf0a72bb9cea53 --- /dev/null +++ b/optimized_pipeline/inputs.py @@ -0,0 +1,35 @@ +"""Validated custom scripts and fixed reference routing; never rewrite literal words.""" +import copy,json +from pathlib import Path +from recipe import HERE,sha +from languages import LANGUAGES + +def load_inputs(a): + refpath=Path(a.references).resolve() + refs=json.loads(refpath.read_text()) + custom=refpath!=HERE/'references.json' + for speaker,ref in refs.items(): + if custom: + ref['path']=str((refpath.parent/ref['path']).resolve()) + if ref.get('codes'):ref['codes']=str((refpath.parent/ref['codes']).resolve()) + ref.setdefault('sha256',sha(HERE/ref['path'])) + names={'legacy':'script','sentence':'script-speaker','spontaneous':'script-spontaneous'} + scripts=[Path(x).resolve() for x in a.script] if a.script else [HERE/f"{names[a.prompt_style]}-{l}.json" for l in ('en','de')] + jobs=[];seen=set() + for path in scripts: + script=json.loads(path.read_text());lang=script['language'] + if lang not in LANGUAGES:raise ValueError('Supported languages: en, de, nl, fr, es') + for i,source in enumerate(script['turns'][:a.limit or None]): + t=copy.deepcopy(source);t.setdefault('index',i) + if (lang,t['index']) in seen:raise ValueError('Duplicate language/turn index') + seen.add((lang,t['index'])) + if not t.get('text','').strip() or t['speaker'] not in refs:raise ValueError('Missing text or speaker reference') + t.setdefault('direction','warm and sincere') + if a.prompt_style=='spontaneous' and not t.get('delivery_chunks'): + t['delivery_chunks']=[dict(text=t['text'],cue=t['direction']+'; relaxed, spontaneous, gently spoken')] + if t.get('delivery_chunks'): + if not 1<=len(t['delivery_chunks'])<=2 or ' '.join(c['text'] for c in t['delivery_chunks'])!=t['text']: + raise ValueError('Use at most two delivery chunks, preserving the exact literal text') + jobs.append((lang,t)) + if not jobs:raise ValueError('Empty script') + return refs,scripts,jobs diff --git a/optimized_pipeline/languages.py b/optimized_pipeline/languages.py new file mode 100644 index 0000000000000000000000000000000000000000..6545dfa3dceb520be5f14fe4885baa0be4cd6e93 --- /dev/null +++ b/optimized_pipeline/languages.py @@ -0,0 +1,7 @@ +"""Explicit conditioning/audit language routing for the five Podcast languages.""" +LANGUAGES={'en':'English','de':'German','nl':'Dutch','fr':'French','es':'Spanish'} +LANGUAGE_SEEDS={'en':0,'de':10000,'nl':20000,'fr':30000,'es':40000} +QWEN_ALIGNMENT_LANGUAGES={'en','de','fr','es'} +def language_name(code): + try:return LANGUAGES[code] + except KeyError:raise ValueError(f'Unsupported Podcast language: {code}') from None diff --git a/optimized_pipeline/low_memory_compare.py b/optimized_pipeline/low_memory_compare.py new file mode 100644 index 0000000000000000000000000000000000000000..c4b3085a909812487192f99de5363538458ced54 --- /dev/null +++ b/optimized_pipeline/low_memory_compare.py @@ -0,0 +1,144 @@ +"""Phased configurable Best-of-N comparison: policy -> release -> codec + judges -> final audit. + +The exact same sampling loop can defer waveform decoding. Stored acoustic tokens +allow scoring/reassembly without simultaneously keeping policy and codec in VRAM. +No cross-stage speedup claim: record stage costs and concurrent GPU workloads. +""" +import argparse,gc,json,os,time +from pathlib import Path +from concurrent.futures import ThreadPoolExecutor +from recipe import HERE,GENERAL,MODEL_REPO,MODEL_REVISION,dump,sha +from run import setup +from inputs import load_inputs +from speaker_run import arguments +from languages import LANGUAGE_SEEDS + +def main(): + p=argparse.ArgumentParser(description=__doc__);p.add_argument('--model',required=True);p.add_argument('--output',required=True);p.add_argument('--device',default='cuda:0');p.add_argument('--script',action='append');p.add_argument('--n-values',type=int,nargs='+',default=[2,1]);p.add_argument('--candidates',type=int,default=8);a=p.parse_args() + if not a.n_values or len(set(a.n_values))!=len(a.n_values) or any(n<1 or n>a.candidates or a.candidates%n for n in a.n_values) or not 1<=a.candidates<=16:raise ValueError('N values must divide the 1..16 simultaneous candidate budget') + setup(a.device) + import numpy as np + import torch + from transformers.dynamic_module_utils import get_class_from_dynamic_module + from safetensors.torch import save_file,load_file + from phased_generate import TokenEngine + from offline_batch import OfflineBatch + from generation import DecoderOnly,DecoderGraph + from speaker_scoring import SpeakerScorer,FORMULA,ECAPA_REPO,ECAPA_REVISION + from archive import archive_batch + torch.set_num_threads(4);torch.cuda.set_device(a.device);torch._dynamo.config.cache_size_limit=64 + out=Path(a.output).resolve();out.mkdir(parents=True,exist_ok=True);start=time.perf_counter() + defaults=arguments(['--model',a.model,'--device',a.device]+[x for path in (a.script or []) for x in ('--script',path)]);refs,scripts,jobs=load_inputs(defaults) + modes=[(n,a.candidates//n) for n in a.n_values] + source={str(f.relative_to(HERE)):sha(f) for f in list(HERE.glob('*.py'))+list((HERE/'runtime').glob('*.py'))} + Processor=get_class_from_dynamic_module('processing_moss_tts.MossTTSLocalProcessor',a.model) + proc=Processor.from_pretrained(a.model,codec_path=os.environ.get('PODCAST_CODEC','OpenMOSS-Team/MOSS-Audio-Tokenizer-v2'),codec_weight_dtype='bf16',codec_compute_dtype='bf16') + anchors={} + for name,r in refs.items(): + if not r.get('codes'):raise ValueError('This memory-constrained comparison requires prepared reference codes') + with np.load(HERE/r['codes']) as data:anchors[name]=torch.from_numpy(data[r['code_key']].astype(np.int64)) + from types import SimpleNamespace + old=torch.get_default_dtype() + try: + torch.set_default_dtype(torch.bfloat16);engine=TokenEngine(Path(a.model),proc,anchors) + finally:torch.set_default_dtype(old) + engine.fast.semantic.limit=1;engine.fast.graph_limit=1 + g=SimpleNamespace(device=a.device,engine=engine,proc=proc,codec_streams={});offline=OfflineBatch(g) + policy_load=time.perf_counter()-start;all_batches=[] + for n,groups in modes: + folder=out/f'n{n}'/'generation' + if (folder/'configuration.json').exists():raise ValueError('Phased runs require a fresh output directory; saved candidates must not be mixed with a new run') + folder.mkdir(parents=True,exist_ok=True);(folder/'codes').mkdir(exist_ok=True) + dump(folder/'process-start.json',dict(created_unix=time.time())) + config=dict(model=MODEL_REPO,revision=MODEL_REVISION,general=GENERAL,references=refs, + reference_codes_sha256={s:sha(HERE/r['codes']) for s,r in refs.items()},scripts={str(f):sha(f) for f in scripts}, + effective_jobs=[[lang,t] for lang,t in jobs],n=n,mode='offline-turn',temperature=1.,cfg=2.5, + reward=FORMULA,speaker_model=ECAPA_REPO,speaker_revision=ECAPA_REVISION,wer_role='final audit only; no multiplier or eligibility filter', + voice_conversion=False,prompt_style='spontaneous',device=a.device,requested_groups=groups, + archive_mode='bounded-cpu-thread',execution='phased policy then codec/judges',single_take_online_scoring=False, + optimization_flags={k:v for k,v in os.environ.items() if k.startswith('HVS_') and not k.endswith('CACHE')}) + dump(folder/'configuration.json',config);dump(folder/'source-files.json',source) + # CPU snapshots avoid doubling the GPU KV cache during correctness checks. + offline.check_prefill(jobs[:groups],n) + shared_ok=offline.shared + offline.shared=False + _,expected,_=offline.synthesize(jobs[:1],n=n,max_frames=39,chunk_frames=13,seed=81108,decode_audio=False) + offline.shared=shared_ok + _,actual,_=offline.synthesize(jobs[:1],n=n,max_frames=39,chunk_frames=13,seed=81108,decode_audio=False) + same=len(expected)==len(actual) and all(torch.equal(x,y) for x,y in zip(expected,actual));assert same + dump(folder/'token-regression.json',dict(shared_and_full_prefill_codes_equal=same,n=n,frames=39)) + dump(folder/'prefill-checks.json',dict(enabled=offline.shared,checks=offline.prefill_checks)) + dump(folder/'speed-pilot.json',dict(selected_groups=groups,n=n,probes=[],note=f'Explicit {a.candidates}-candidate batches; phased memory fallback on a shared GPU.')) + for lang in dict.fromkeys(lang for lang,_ in jobs): + pending=[job for job in jobs if job[0]==lang] + for offset in range(0,len(pending),groups): + batch=pending[offset:offset+groups];seed=202611080+LANGUAGE_SEEDS[lang]+batch[0][1]['index']*31 + _,codes,perf=offline.synthesize(batch,n=n,chunk_frames=26,seed=seed,decode_audio=False) + key=f'{lang}-{batch[0][1]["index"]:02d}' + path=folder/'codes'/f'{key}.safetensors';save_file({str(i):c for i,c in enumerate(codes)},str(path)) + row=dict(n=n,groups=groups,language=lang,jobs=batch,codes=str(path),token_performance=perf) + dump(folder/'codes'/f'{key}.json',row);all_batches.append(row) + print('TOKENS',n,key,round(perf['wall_seconds'],2),'s',flush=True) + # Preserve CPU codec; release all policy/graph references before loading judges. + pad=engine.model.config.audio_pad_token_id + engine.close();del offline,g,engine;gc.collect();torch.cuda.empty_cache() + token_done=time.perf_counter() + proc.audio_tokenizer.decoder.to(a.device);proc.audio_tokenizer.quantizer.to(a.device) + scorer=SpeakerScorer(a.device,refs) + decoder_load=time.perf_counter()-token_done;codec=proc.audio_tokenizer + # Real candidate tokens: unfused DecoderOnly versus its optional fused path. + example=load_file(all_batches[0]['codes']);test=torch.full((4,26,12),pad,device=a.device,dtype=torch.long) + for i in range(4): + c=example[str(i)][:26];test[i,:len(c)].copy_(c) + # StreamingCodec probes the first parameter's device, so use DecoderOnly as + # the unfused native arithmetic and compare the optional fused path exactly. + def decode_test(): + with torch.inference_mode(),torch.cuda.device(a.device),DecoderOnly(codec,4,pad) as d:return d.decode(test)[0].clone() + native=decode_test();import codec_fused;codec_fused.install(codec);fused=decode_test() + exact=torch.equal(native,fused) + if not exact:codec_fused.uninstall(codec) + del native,fused,test + decoders={};batches={n:[] for n,_ in modes};archive_times={n:[] for n,_ in modes};waits={n:0. for n,_ in modes};future=None;previous_n=None + pool=ThreadPoolExecutor(max_workers=1) + try: + for row in all_batches: + n=row['n'];folder=out/f'n{n}'/'generation';batch=row['jobs'];raw=load_file(row['codes']);codes=[raw[str(i)] for i in range(len(raw))];count=len(codes) + tick=time.perf_counter();pieces=[[] for _ in codes] + if count not in decoders:decoders[count]=DecoderGraph(codec,count,pad,26) + length=max(map(len,codes));packed=torch.full((count,length,12),pad,device=a.device,dtype=torch.long) + for i,c in enumerate(codes):packed[i,:len(c)].copy_(c) + with torch.inference_mode(),torch.cuda.device(a.device),decoders[count] as d: + for part in packed.split(26,dim=1): + waves,sizes=d.decode(part);waves=waves.cpu().numpy() + for i,size in enumerate(sizes.cpu().tolist()): + if size:pieces[i].append(waves[i,:size].copy()) + waves=[np.concatenate(x) for x in pieces];decode_s=time.perf_counter()-tick + if n==1: + scores=[dict(reward=None,ranking_skipped=True,reference_speaker=t['speaker']) for _,t in batch] + timing=dict(scoring_seconds=0.,ears_seconds=0.,speaker_seconds=0.) + else:scores,timing=scorer.score_speakers(waves,[t['speaker'] for _,t in batch for _ in range(n)]) + phase2=time.perf_counter()-tick;total=row['token_performance']['wall_seconds']+phase2 + perf=dict(row['token_performance']);perf.update(timing,codec_seconds=decode_s,batch_wall_seconds=total,wall_seconds=total/len(batch), + deferred_decode_seconds=phase2,execution='phased',codec_fused_bit_identical=exact) + batches[n].append(dict(language=row['language'],turns=[t['index'] for _,t in batch],**perf)) + dump(folder/'production-batches.json',batches[n]) + if future is not None: + wait=time.perf_counter();archive_times[previous_n].append(future.result());waits[previous_n]+=time.perf_counter()-wait + future=pool.submit(archive_batch,folder,batch,waves,codes,scores,perf,refs,n,total);previous_n=n + if future is not None: + wait=time.perf_counter();archive_times[previous_n].append(future.result());waits[previous_n]+=time.perf_counter()-wait + finally:pool.shutdown(wait=True) + for n,groups in modes: + folder=out/f'n{n}'/'generation';target=torch.stack(list(scorer.targets.values())) + dump(folder/'reference-controls.json',dict(speakers=list(scorer.targets),cosine=(target@target.T).cpu().tolist(),dimensions=int(target.shape[-1]),seconds=scorer.reference_seconds)) + dump(folder/'codec-regression.json',dict(fused_bit_identical=exact,frames=26,batch=4,source='actual generated candidates')) + dump(folder/'archive-timing.json',dict(batches=archive_times[n],blocked_seconds=waits[n],cpu_seconds=sum(x['seconds'] for x in archive_times[n]))) + dump(folder/'generation-complete.json',dict(turns=len(jobs),n=n,groups=groups, + production_seconds=sum(x['batch_wall_seconds'] for x in batches[n]),finished_unix=time.time(),load_seconds=None, + note='Sum of token + decoding + ranking batch times; shared loads/correctness tests/wait between phases are in parent receipt, not per-mode end-to-end latency.')) + decoders.clear();del scorer,proc;gc.collect();torch.cuda.empty_cache() + dump(out/'generation-complete.json',dict(n=a.n_values,policy_load_seconds=policy_load,decoder_judge_load_seconds=decoder_load, + generation_job_seconds=time.perf_counter()-start,phased=True,concurrent_unrelated_training=True, + note='Policy and codec/judges do not occupy VRAM together. Policy batch size is recorded per mode. Not hardware-load matched to prior N4.')) + print('PHASED GENERATION COMPLETE',flush=True) +if __name__=='__main__':main() diff --git a/optimized_pipeline/offline_batch.py b/optimized_pipeline/offline_batch.py new file mode 100644 index 0000000000000000000000000000000000000000..3244d385b081ecd110f50131070acd096e8fecae --- /dev/null +++ b/optimized_pipeline/offline_batch.py @@ -0,0 +1,127 @@ +"""Complete-turn batching across independent podcast segments, without streaming. + +Layout is [all conditional groups, all neutral groups], each group has N takes. +Prompt prefill computes each identical group once, then copies its KV state. +No voice, generated history, or reward is shared between different segments. +""" +import time +from contextlib import nullcontext +import numpy as np +import torch +from recipe import specification, SR +from performance_core import combine_branches +from generation import prefill_bounded, DecoderGraph + +def prefill_repeated(bank,ids,mask,n,microbatch=2): + if len(ids)%n:raise ValueError('Incomplete candidate group') + length=ids.shape[1] + # Never reuse KV for distinct inputs or padding patterns. + for a in range(0,len(ids),n): + if not torch.equal(ids[a:a+n],ids[a:a+1].expand_as(ids[a:a+n])) or not torch.equal(mask[a:a+n],mask[a:a+1].expand_as(mask[a:a+n])): + raise ValueError('Shared prefill requires identical candidate prompts') + bank.allowed.zero_();bank.allowed[:,:length].copy_(mask);bank.position.fill_(length) + local=[] + for a in range(0,len(ids)//n,microbatch): + unique=torch.arange(a,min(a+microbatch,len(ids)//n),device=ids.device)*n + out=bank.forward(inputs_embeds=bank.model._build_inputs_embeds(ids[unique]), + input_ids=None,attention_mask=mask[unique],past_key_values=None,use_cache=True,return_dict=True) + if not bank.cache: + for k,v in out.past_key_values: + shape=(bank.nb,bank.capacity,*k.shape[2:]);bank.cache.append((k.new_zeros(shape),v.new_zeros(shape))) + for (k,v),(stored_k,stored_v) in zip(out.past_key_values,bank.cache): + for j,idx in enumerate(unique.tolist()): + stored_k[idx:idx+n,:length].copy_(k[j:j+1].expand(n,*k.shape[1:])) + stored_v[idx:idx+n,:length].copy_(v[j:j+1].expand(n,*v.shape[1:])) + local.append(bank.model._global_hidden_to_local(out.last_hidden_state[:,-1]).to( + bank.model.local_transformer.ln_f.weight.dtype).repeat_interleave(n,dim=0)) + return torch.cat(local) + +class OfflineBatch: + def __init__(self,generator):self.g=generator;self.shared=True;self.prefill_checks=[] + + def pack(self,jobs,n,guidance): + e=self.g.engine;branches=[] + for kind in (['prompt','unconditional'] if guidance!=1 else ['prompt']): + for language,turn in jobs: + spec=specification(turn,language) + branches.append(e.pack(spec[kind],spec,e.refs[turn['speaker']],n)) + return combine_branches(branches,e.model.config.pad_token_id,e.model.config.audio_pad_token_id) + + @torch.inference_mode() + def check_prefill(self,jobs,n=4): + e=self.g.engine + with torch.cuda.device(self.g.device),torch.autocast('cuda',dtype=torch.bfloat16): + ids,mask=self.pack(jobs,n,2.5);bank=e.fast.semantic.prepare(ids,320) + torch.cuda.synchronize();tick=time.perf_counter() + expected=prefill_bounded(bank,ids,mask).detach().cpu();torch.cuda.synchronize() + baseline_s=time.perf_counter()-tick + cache=[tuple(t[:,:len(mask[0])].detach().cpu() for t in pair) for pair in bank.cache] + tick=time.perf_counter();actual=prefill_repeated(bank,ids,mask,n).detach().cpu();torch.cuda.synchronize() + optimized_s=time.perf_counter()-tick + same_cache=all(torch.equal(t[:,:ids.shape[1]].cpu(),wanted) for pair,old in zip(bank.cache,cache) for t,wanted in zip(pair,old)) + same_local=torch.equal(expected,actual) + result=dict(groups=len(jobs),n=n,baseline_seconds=baseline_s,shared_seconds=optimized_s, + same_cache=same_cache,same_local=same_local,max_abs_local_error=float((expected-actual).abs().max())) + self.shared=self.shared and same_cache and same_local + self.prefill_checks.append(result) + del cache,expected,actual + print('SHARED PREFILL CHECK',result,'enabled',self.shared,flush=True) + return result + + @torch.inference_mode() + def synthesize(self,jobs,n=4,chunk_frames=26,max_frames=320,seed=71108,temperature=1.,guidance=2.5,decode_audio=True): + count=len(jobs);total=count*n + if not 1<=total<=16:raise ValueError('Total simultaneous candidates must be 1..16') + g=self.g;e=g.engine;model=e.model;cfg=model.config + start=time.perf_counter();token_s=codec_s=0. + p=dict(max_new_tokens=max_frames,audio_temperature=temperature,audio_top_p=.95, + audio_top_k=50,audio_repetition_penalty=1.,text_temperature=1.,text_top_p=1.,text_top_k=50) + with torch.cuda.device(g.device),torch.autocast('cuda',dtype=torch.bfloat16): + ids,initial=self.pack(jobs,n,guidance);length=ids.shape[1];nb=2 if guidance!=1 else 1 + masks=torch.zeros(total*nb,length+max_frames,dtype=torch.bool,device=g.device) + masks[:,:length]=initial;bank=e.fast.semantic.prepare(ids,max_frames) + model_input=ids;finished=torch.zeros(total,dtype=torch.bool,device=g.device) + code_parts=[];parts=[[] for _ in range(total)];steps=0 + key=(total,chunk_frames) + if decode_audio and key not in g.codec_streams:g.codec_streams[key]=DecoderGraph(g.proc.audio_tokenizer,total,cfg.audio_pad_token_id,chunk_frames) + capture_before=e.fast.capture_seconds + torch.manual_seed(seed);torch.cuda.manual_seed_all(seed) + torch.cuda.reset_peak_memory_stats(g.device) + with (g.codec_streams[key] if decode_audio else nullcontext()) as decoder: + while steps0 and np.isfinite(w).all() for w in waves) + codes=[c[c[:,0]!=cfg.audio_pad_token_id].cpu().contiguous() for c in code_tensor] + perf=dict(n=n,groups=count,total_candidates=total,wall_seconds=time.perf_counter()-start, + token_seconds=token_s,codec_seconds=codec_s,seed=seed,steps=steps,hit_frame_cap=steps>=max_frames, + deferred_decoding=not decode_audio,shared_prefill=self.shared,chunk_frames=chunk_frames,temperature=temperature,cfg=guidance, + graph_capture_seconds=e.fast.capture_seconds-capture_before, + max_memory_allocated_bytes=torch.cuda.max_memory_allocated(g.device), + max_memory_reserved_bytes=torch.cuda.max_memory_reserved(g.device)) + return waves,codes,perf diff --git a/optimized_pipeline/prepare.py b/optimized_pipeline/prepare.py new file mode 100644 index 0000000000000000000000000000000000000000..f76b421631633d77226f44fd17bb4f9846563bf1 --- /dev/null +++ b/optimized_pipeline/prepare.py @@ -0,0 +1,28 @@ +"""Download only the published assets used by this recipe; no private tokens needed.""" +import argparse, json, shutil +from pathlib import Path +from huggingface_hub import snapshot_download, hf_hub_download +from recipe import HERE, MODEL_REPO, MODEL_REVISION, references +from run import setup + +def main(): + p=argparse.ArgumentParser();p.add_argument('--references-only',action='store_true');a=p.parse_args() + release=json.loads((HERE/'references/source.json').read_text()) + for name in ['de_s1.mp3','de_s2.mp3','de_anchors.npz']: + origin=hf_hub_download(release['repo'],release['directory']+'/'+name,revision=release['revision']) + shutil.copyfile(origin,HERE/'references'/name) + references(json.loads((HERE/'references.json').read_text())) + if a.references_only:return + setup('cpu');import settings + model=snapshot_download(MODEL_REPO,revision=MODEL_REVISION,allow_patterns=['*.py','*.json','*.safetensors','*.txt','*.model','LICENSE','NOTICE.md']) + snapshots={ + 'codec':snapshot_download('OpenMOSS-Team/MOSS-Audio-Tokenizer-v2',revision='f6e20e543b33d2c252a7ef71bdf8aa71e5ff9169'), + 'asr':snapshot_download('nvidia/parakeet-tdt-0.6b-v3',revision='541d1f99c6b0c3cd0b11a95167540bb8edefd82b',allow_patterns=['*.json','*.safetensors','*.txt','*.model','*.py']), + 'aligner':snapshot_download('Qwen/Qwen3-ForcedAligner-0.6B-hf',revision='c07281df297b9905d24a508279258cccf987a064',allow_patterns=['*.json','*.safetensors','*.txt','*.model','*.py']), + } + snapshot_download('speechbrain/spkrec-ecapa-voxceleb',revision='0f99f2d0ebe89ac095bcc5903c4dd8f72b367286',cache_dir=str(Path(settings.HF_CACHE)/'hub'),allow_patterns=['hyperparams.yaml','*.ckpt','label_encoder.txt']) + from ears_reward import EarsModels + EarsModels('cpu').load('medium') + (HERE/'assets.local.json').write_text(json.dumps(dict(model=model,**snapshots),indent=2)) + print('Assets prepared. Policy snapshot:',model) +if __name__=='__main__':main() diff --git a/optimized_pipeline/produce.py b/optimized_pipeline/produce.py new file mode 100644 index 0000000000000000000000000000000000000000..3b0925daa029d90056a9b9e3b8d6631133ae8cdc --- /dev/null +++ b/optimized_pipeline/produce.py @@ -0,0 +1,19 @@ +"""Generate, audit and export an episode with one command. No service management.""" +import argparse,subprocess,sys +from pathlib import Path +HERE=Path(__file__).resolve().parent + +def main(argv=None): + p=argparse.ArgumentParser(description=__doc__,add_help=False) + p.add_argument('--output',default=str(HERE/'outputs/podcast'));p.add_argument('--asr-url') + a,rest=p.parse_known_args(argv) + if '-h' in rest or '--help' in rest: + print('One-command generation + audit + MP3/HTML export. --output is the episode directory. Optional --asr-url supplies an existing raw-float32 Parakeet service.',flush=True) + subprocess.run([sys.executable,str(HERE/'speaker_run.py'),'--help'],check=True);return + out=Path(a.output).resolve();runs=out/'generation' + subprocess.run([sys.executable,str(HERE/'speaker_run.py'),*rest,'--output',str(runs)],check=True) + device=rest[rest.index('--device')+1] if '--device' in rest else 'cuda:0' + args=[sys.executable,str(HERE/'speaker_finish.py'),'--runs',str(runs),'--output',str(out),'--device',device] + if a.asr_url:args+=['--asr-url',a.asr_url] + subprocess.run(args,check=True) +if __name__=='__main__':main() diff --git a/optimized_pipeline/recipe.py b/optimized_pipeline/recipe.py new file mode 100644 index 0000000000000000000000000000000000000000..e568e3973926ebaad9d92d0d256f4be8d5d12b7b --- /dev/null +++ b/optimized_pipeline/recipe.py @@ -0,0 +1,110 @@ +"""Pure configuration, scoring and reproducibility helpers (no GPU imports).""" +import hashlib +import json +import math +import re +from pathlib import Path + +HERE = Path(__file__).resolve().parent +WORKSPACE = HERE.parent +SR = 48000 +FRAME_SECONDS = .08 +GENERAL = ( + 'A warm, emotionally thoughtful two-host podcast conversation. ' + 'Very authentic, very genuine. ' + 'Natural, intimate, spontaneous spoken delivery with clear words, subtle emotion, ' + 'relaxed conversational pacing and brief meaningful pauses. ' + 'Be sincere, without an exaggerated announcer voice or forced laughter. ' + 'Perform only the current speaker turn and speak exactly the SCRIPT. ' + 'Keep the same speaker identity as the reference audio.' +) +MODEL_REPO = 'laion/Humanness-Voice-Podcast' +MODEL_REVISION = '91f8110cd815f2233301a8b1dd16dbbf3fae8e05' + +def dump(path, value): + path = Path(path) + path.parent.mkdir(parents=True, exist_ok=True) + tmp = path.with_suffix(path.suffix + '.tmp') + tmp.write_text(json.dumps(value, ensure_ascii=False, indent=2, allow_nan=False)) + tmp.replace(path) + +def sha(path): + h = hashlib.sha256() + with open(path, 'rb') as f: + for block in iter(lambda: f.read(4*1024*1024), b''): + h.update(block) + return h.hexdigest() + +def tokens(text): + return re.findall(r'\w+', text.casefold()) + +def edit_row(reference, hypothesis): + # Last DP row gives edit distance to every reference prefix. + row = list(range(len(reference)+1)) + for i, word in enumerate(hypothesis, 1): + nxt = [i] + for j, target in enumerate(reference, 1): + nxt.append(min(nxt[-1]+1, row[j]+1, row[j-1]+(word != target))) + row = nxt + return row + +def errors(reference, hypothesis, final=True): + ref, hyp = tokens(reference), tokens(hypothesis) + row = edit_row(ref, hyp) + if final: + endpoint = len(ref) + elif not hyp: + return {'wer': 1., 'matched_words': 0, 'hypothesis_words': 0, + 'reference_words': len(ref), 'edit_count': len(ref)} + else: + endpoint = min(range(1, len(ref)+1), + key=lambda i: (row[i], abs(i-len(hyp)), -i)) if ref else 0 + return {'wer': row[endpoint]/max(1, endpoint), 'matched_words': endpoint, + 'hypothesis_words': len(hyp), 'reference_words': len(ref), + 'edit_count': row[endpoint]} + +def reward(genuineness, wer): + if not all(math.isfinite(x) for x in (genuineness, wer)) or wer < 0: + raise ValueError('Invalid score') + return max(0., min(1., genuineness/6.))/(1.+wer) + +def chunk_choice(scores, text, finished, previous_progress=0, stagnant=0): + """Completion is a property of the reward winner, never a priority class. + + A matched word count alone can hide a substituted ending. Require the last + three target words too, while allowing earlier ASR spelling errors. + """ + ref=tokens(text);tail=ref[-min(3,len(ref)):] + complete={i for i,s in enumerate(scores) if ref and s['matched_words']==len(ref) + and s['hypothesis_words']>=len(ref) and s['wer']<=.12 and tokens(s['asr'])[-len(tail):]==tail} + eligible=[i for i,s in enumerate(scores) if not finished[i] or i in complete] or list(range(len(scores))) + plausible=[i for i in eligible if scores[i]['matched_words']previous_progress] + guarded=stagnant>=2 and bool(progressing) + if guarded:eligible=progressing + winner=max(eligible,key=lambda i:(scores[i]['reward'],-i)) + return winner,winner in complete,guarded + +def specification(turn, language): + if turn.get('delivery_chunks'): + assert ' '.join(c['text'] for c in turn['delivery_chunks']) == turn['text'] + script = '\n'.join(f"({c['cue']}) {c['text']}" for c in turn['delivery_chunks']) + elif turn.get('sentences'): + assert ' '.join(s['text'] for s in turn['sentences']) == turn['text'] + script = '\n'.join(f"(Very genuine, very natural, very authentic; {s['emotion']}) {s['text']}" for s in turn['sentences']) + else: + script = f"({turn['direction']}) {turn['text']}" + return {'prompt': f"GENERAL: {GENERAL}\nSCRIPT:\n{script}", + 'unconditional': 'GENERAL: Keep the same speaker identity as the reference audio. ' + 'Plain neutral conversational delivery.\nSCRIPT:\n'+turn['text'], + 'text': turn['text'], 'lang': language, 'frames': 320, 'free_timing': True} + +def references(config): + result = {} + for speaker, item in config.items(): + path = (HERE/item['path']).resolve() + if sha(path) != item['sha256']: + raise ValueError('Reference changed: '+str(path)) + result[speaker] = path + return result diff --git a/optimized_pipeline/references.json b/optimized_pipeline/references.json new file mode 100644 index 0000000000000000000000000000000000000000..064cbc1c1214b77cfe8874fc01730417c8a94339 --- /dev/null +++ b/optimized_pipeline/references.json @@ -0,0 +1,16 @@ +{ + "S1": { + "path": "references/de_s1.mp3", + "codes": "references/de_anchors.npz", + "code_key": "S1", + "sha256": "9d5a7823fea82182d6a3ec378e15ae03b0bd61f028c6f50fb6c5b82fb1f1b7dd", + "label": "Repository German reference S1" + }, + "S2": { + "path": "references/de_s2.mp3", + "codes": "references/de_anchors.npz", + "code_key": "S2", + "sha256": "d2da04db22aeb44206e4f935e95919846e3e5bb4cb116503a7a260c9f48752cd", + "label": "Repository German reference S2" + } +} \ No newline at end of file diff --git a/optimized_pipeline/references/PROVENANCE.json b/optimized_pipeline/references/PROVENANCE.json new file mode 100644 index 0000000000000000000000000000000000000000..9670d9359144c2fe7d52319d91f73adc1deb614f --- /dev/null +++ b/optimized_pipeline/references/PROVENANCE.json @@ -0,0 +1,30 @@ +[ + { + "pack": "de-synthetic-reference", + "language": "de", + "speaker_files": [ + "de_s1.mp3", + "de_s2.mp3" + ], + "codes": "de_anchors.npz", + "conditioning_frames": { + "S1": 181, + "S2": 163 + }, + "source_terms": "Original source terms; this model release does not relicense source recordings. German anchors were supplied by the experiment owner; English anchors are the previously approved short real-podcast reference excerpts." + }, + { + "pack": "en-real-2", + "language": "en", + "speaker_files": [ + "en_s1.mp3", + "en_s2.mp3" + ], + "codes": "en_anchors.npz", + "conditioning_frames": { + "S1": 117, + "S2": 145 + }, + "source_terms": "Original source terms; this model release does not relicense source recordings. German anchors were supplied by the experiment owner; English anchors are the previously approved short real-podcast reference excerpts." + } +] \ No newline at end of file diff --git a/optimized_pipeline/references/source.json b/optimized_pipeline/references/source.json new file mode 100644 index 0000000000000000000000000000000000000000..d3c772050e5927f095c388aa76f86c143d72f04d --- /dev/null +++ b/optimized_pipeline/references/source.json @@ -0,0 +1,5 @@ +{ + "repo": "laion/Humanness-Voice-Podcast", + "revision": "0947ffdcedf85705683b256ccc310c90ccf3b6a9", + "directory": "examples/references" +} \ No newline at end of file diff --git a/optimized_pipeline/repair_listening.py b/optimized_pipeline/repair_listening.py new file mode 100644 index 0000000000000000000000000000000000000000..4f2562e171a8bcf7ad76c45d94b741f366cfe292 --- /dev/null +++ b/optimized_pipeline/repair_listening.py @@ -0,0 +1,45 @@ +"""Opt-in repair utility for a documented content failure, using saved candidates. +Requires the same loopback raw-float32 Parakeet service used in the experiment. +This is deliberately separate from the default reward and from speaker_finish. +""" +from pathlib import Path +import os,sys,json,time,copy,hashlib +import argparse +p=Path(__file__).resolve().parent +parser=argparse.ArgumentParser(description='Explicit additional content-repaired copy; never modifies strict ranking artifacts') +parser.add_argument('output');parser.add_argument('--language',choices=['en','de'],default='en');parser.add_argument('--turn',type=int,required=True);parser.add_argument('--asr-url',required=True) +a=parser.parse_args() +sys.path.insert(0,str(p)) +from run import setup +setup('cpu') +import numpy as np,soundfile as sf,torch,httpx +from recipe import dump,errors +from scoring import audio16 +from align_engine import QwenAligner +from generate import crop +from finish import audio_module +out=Path(a.output).resolve();config=json.loads((out/'manifest.json').read_text())['configuration'];n=config['n'];folder=out/f'generation/bestof{n}-speaker5050/{a.language}-{a.turn:02d}';old=json.loads((folder/'audited.json').read_text()) +choices=sorted(range(n),key=lambda i:old['performance']['final_scores'][i]['reward'],reverse=True);reports=[];replacement=None +torch.set_num_threads(4);aligner=QwenAligner(device='cpu');assert aligner.ok;aligner.model.float() +with httpx.Client(timeout=120) as c: + for i in choices: + if i==old['performance']['winner']:continue + wave,sr=sf.read(folder/f'candidate-{i}.flac',dtype='float32');assert sr==48000 + resp=c.post(a.asr_url,content=audio16(wave).tobytes());resp.raise_for_status();transcript=resp.json()['text'];err=errors(old['turn']['text'],transcript) + report=dict(candidate=i,asr=transcript,wer=err['wer'],reward=old['performance']['final_scores'][i]['reward']);reports.append(report) + if err['wer']>.15:continue + spans=aligner.align(audio16(wave),old['turn']['text'].split(),language='English' if a.language=='en' else 'German') + good=bool(spans) and all(x[3]>.5 for x in spans) and 0<=spans[0][1] '+module.stamp(t['speech_end_s'])+'\n'+t['speaker']+': '+t['text'] for i,t in enumerate(timeline))+'\n') +print(json.dumps({k:v for k,v in report.items() if k not in ['export','candidates_checked','replacement']},indent=2));print('replacement',reports[-1]['candidate'],'WER',reports[-1]['wer'],'seconds',receipt['seconds']) diff --git a/optimized_pipeline/requirements.txt b/optimized_pipeline/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..55acf931df2389f7372bad0123414f290d59fec5 --- /dev/null +++ b/optimized_pipeline/requirements.txt @@ -0,0 +1,15 @@ +torch==2.6.0 +torchaudio==2.6.0 +transformers==5.15.0 +numpy==1.26.4 +scipy==1.17.1 +soundfile==0.14.0 +safetensors==0.8.0 +httpx==0.28.1 +speechbrain==1.1.0 +pydantic==2.13.4 +huggingface_hub==1.27.0 +sentencepiece==0.2.2 +accelerate==1.14.0 +einops==0.8.2 +librosa==0.11.0 diff --git a/optimized_pipeline/run.py b/optimized_pipeline/run.py new file mode 100644 index 0000000000000000000000000000000000000000..061676bf64d853729670fe025eed24b6b5ed881c --- /dev/null +++ b/optimized_pipeline/run.py @@ -0,0 +1,14 @@ +"""Runtime configuration shared by generation and export; no service secrets.""" +import os,sys +from pathlib import Path +DEFAULTS={'HVS_CHUNK_RAMP': '1', 'HVS_CODEC_FUSED': '1', 'HVS_CODEC_GRAPH': '0', 'HVS_FAST_SAMPLE': '1', 'HVS_LARGE17_LAYERWISE': '1', 'HVS_LOCAL_COMPILE': '0', 'HVS_LOCAL_TRITON': '1', 'HVS_RAMP_START': '3', 'HVS_RL_PRECISION': 'bf16_merged', 'HVS_SEMANTIC_BANKS': '1', 'HVS_SEMANTIC_BUCKET': '256', 'HVS_SEMANTIC_COMPILE': '1', 'HVS_SEMANTIC_CUDA_GRAPH': '1'} +def setup(device): + for k,v in DEFAULTS.items():os.environ.setdefault(k,v) + os.environ.update(ACTING_DEVICE=device) + sys.path.insert(0,str(Path(__file__).resolve().parent/"runtime")) + import json + index=Path(__file__).resolve().parent/'assets.local.json' + if index.exists(): + assets=json.loads(index.read_text()) + for key in ('codec','asr','aligner'): + os.environ.setdefault('PODCAST_'+key.upper(),assets[key]) diff --git a/optimized_pipeline/runtime/APACHE-2.0.txt b/optimized_pipeline/runtime/APACHE-2.0.txt new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/optimized_pipeline/runtime/APACHE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/optimized_pipeline/runtime/PODCAST_UPSTREAM_LICENSE b/optimized_pipeline/runtime/PODCAST_UPSTREAM_LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b67e4764e83a065eab2c5f65b53fd818d1978d9e --- /dev/null +++ b/optimized_pipeline/runtime/PODCAST_UPSTREAM_LICENSE @@ -0,0 +1,6 @@ +Creative Commons Attribution 4.0 International (CC BY 4.0) + +LAION model weights, new pipeline code and documentation are provided under CC BY 4.0. +License terms: https://creativecommons.org/licenses/by/4.0/legalcode.en +Attribution: LAION, Humanness Voice Podcast, 2026. +Upstream code and dependencies retain their original notices/licenses; example source recordings retain their original terms. See NOTICE.md and UPSTREAM_LICENSE. diff --git a/optimized_pipeline/runtime/PODCAST_UPSTREAM_NOTICE.md b/optimized_pipeline/runtime/PODCAST_UPSTREAM_NOTICE.md new file mode 100644 index 0000000000000000000000000000000000000000..6e4365c554f80f01142dfacee28a1be08d337843 --- /dev/null +++ b/optimized_pipeline/runtime/PODCAST_UPSTREAM_NOTICE.md @@ -0,0 +1,9 @@ +# Attribution and scope + +LAION's Humanness Voice Podcast is a full supervised fine-tune of Humaneness Voice Large 1.7, using the MOSS Local Transformer family implementation and an external MOSS-v2 audio codec. Earlier family provenance and licenses remain in the inherited UPSTREAM files and source copyright headers. The current release's parent, data mixture and checkpoint are documented in TRAINING.md; older inherited notes describe earlier family releases and are not the current model card. + +New LAION weights, pipeline code and documentation: CC BY 4.0. Third-party implementation files, Python packages, codecs, ASR models, score models and the optional Voice Converter retain their own licenses and notices. The optional converter is separately downloaded and installed; it is not silently embedded in this repository. + +The German example anchors are short excerpts from recordings supplied by the experiment owner. The English anchors are the previously approved short real-podcast reference excerpts. MP3s and exact cached MOSS codes are included for reproducible conditioning; their provenance is in examples/references/PROVENANCE.json. Source recordings retain original terms. The model's CC BY 4.0 notice does not relicense source recordings or grant rights over someone's identity. + +Generated example episodes are LAION model outputs, released under CC BY 4.0 with their source-condition records. They demonstrate the earlier script-boundary crop and 400-ms assembly; they are not evidence validating the newly added internal-pause compaction or optional per-turn VC route. diff --git a/optimized_pipeline/runtime/align_engine.py b/optimized_pipeline/runtime/align_engine.py new file mode 100644 index 0000000000000000000000000000000000000000..9647ddbd0128aa32a130f6ae6e8e3122514a2139 --- /dev/null +++ b/optimized_pipeline/runtime/align_engine.py @@ -0,0 +1,568 @@ +#!/usr/bin/env python3 +"""Find where the scripted words actually start and end, and trim to them. + +The problem this solves: the model spends the duration it is given. It does not +overrun and it does not stop early — it *fills*. So when a take improvises, the +filler sits inside the requested duration rather than past it, and no clock-based +cut can find it (docs/EXPERIMENTS.md §8). Something has to notice that the words +that were asked for have been said. + +Forced alignment is the right tool rather than recognition: we already know which +words were supposed to be spoken, so this is an alignment problem. An aligner +cannot hallucinate a word that was never in the script, which a transcriber can. + +Two edges are handled: + + lead-in If the script does not open on a vocal burst, everything before the + first word is throat-clearing the director did not ask for. Fade in + so that full level is reached exactly at the first word's onset. + When the script DOES open on a burst, nothing is touched — the burst + is the performance. + + tail After the last scripted word ends, fade out over ~150 ms and stop. + Anything the model was about to add is not in the script. + +The aligner is `romara-labs/mms-300m-1130-forced-aligner-ONNX` for the emissions +(Wav2Vec2 CTC, 31 tokens, 20 ms per frame at 16 kHz) and +`torchaudio.functional.forced_align` for the Viterbi pass — a tested kernel +rather than a hand-rolled trellis, which is where this kind of code goes wrong. + +LICENCE NOTE: that aligner is **CC BY-NC 4.0**, unlike everything else this +server loads. It is downloaded at runtime and not redistributed here, so it does +not change this repository's licence, but a commercial deployment must either +switch it off (`MOSS_ALIGN=0`, or the checkbox) or replace it. The rest of the +stack was chosen for commercial usability on purpose; this one component is not. +""" +import os +import re +import threading +import unicodedata + +import numpy as np + +import config + +FRAME_S = 0.02 # 320-sample stride at 16 kHz +_SR = 16000 +_WORD = re.compile(r"[^\W_]+(?:'[^\W_]+)*", re.UNICODE) +# ß has no NFKD decomposition and would become ; the rest of German folds +# to ASCII by stripping combining marks +_PRE = {"ß": "ss", "æ": "ae", "œ": "oe", "ø": "o", "å": "a", "đ": "d", "ł": "l", + "þ": "th", "ð": "d"} + + +def script_words(plain_text): + """The words the aligner will be asked to find, in order.""" + return _WORD.findall(str(plain_text or "")) + + +def opens_on_burst(tagged): + """Does the rendered script put a vocal burst before its first word? + + In this format a round bracket WITH a number is a burst and one without is a + direction, and `[N.N seconds duration]` precedes every speech segment. So a + burst tag appearing before the first duration tag is a burst before the first + word — and then the lead-in must be left alone. + """ + s = str(tagged or "") + m_dur = re.search(r"\[[0-9.]+\s*seconds\s+duration\]", s, re.I) + cut = m_dur.start() if m_dur else len(s) + return bool(re.search(r"\([^)]*,\s*[0-9.]+\s*seconds?\)", s[:cut], re.I)) + + +def closing_burst_s(tagged): + """Seconds of vocal burst the script asks for AFTER its last word. + + A burst is performance, not filler, and the trim must not eat it. The + leading case is handled by `opens_on_burst`; this is the same rule at the + other end, and it was found by looking at the data rather than the summary: + a line ending on `(breathy giggle)` had 1.03 s removed, which read as a + successful trim on every metric — extra words 1 -> 0, word error 0.10 -> 0.00 + — while actually deleting the giggle the director wrote. + + The tags carry their own lengths, so the allowance is exact rather than + guessed. + """ + s = str(tagged or "") + last = None + for m in re.finditer(r"\[[0-9.]+\s*seconds\s+duration\]", s, re.I): + last = m + tail = s[last.end():] if last else s + total = 0.0 + for m in re.finditer(r"\([^)]*,\s*([0-9.]+)\s*seconds?\)", tail, re.I): + try: + total += float(m.group(1)) + except ValueError: + pass + return total + + +class QwenAligner: + """Qwen3-ForcedAligner-0.6B, the permissively licensed alternative. + + Apache-2.0 rather than CC BY-NC, which is the reason it exists here: it is + the only component of this stack that had a non-commercial licence, and the + rest was chosen for commercial usability on purpose. + + Measured against the MMS aligner on the same clips: word ends agree to + 0.057 s on average (0.22 s worst) on German and to within a frame or two on + English, and it is about twice as fast — 38 ms against 61 ms for 10 s of + English, 68 against 135 for 14 s of German — because it is one + non-autoregressive forward pass rather than an emission pass plus a Viterbi + pass. It costs 1.84 GB of VRAM loaded against roughly 0.4 GB for the ONNX + CTC model, which is why it goes on the second card by default. + + It returns no confidence, so `score` here is a STRUCTURAL plausibility check + rather than a model confidence: whether the words came back in the number + asked for, in order, inside the audio, and without an implausibly long one. + That is weaker evidence than the CTC path's per-token posterior, and the + honest consequence is that the score threshold catches gross failures here + but not subtle ones. + """ + + REPO = "Qwen/Qwen3-ForcedAligner-0.6B-hf" + + def __init__(self, device=None, repo=None): + self.ok = False + self.lock = threading.Lock() + self.device = device or config.ALIGN_QWEN_DEVICE + try: + import torch + from transformers import AutoModelForTokenClassification, AutoProcessor + repo = repo or config.ALIGN_QWEN_REPO or self.REPO + self.proc = AutoProcessor.from_pretrained(repo) + self.model = AutoModelForTokenClassification.from_pretrained( + repo, dtype=torch.bfloat16).to(self.device).eval() + self.ok = True + print(f"[align] {repo} on {self.device}, apache-2.0, " + f"{sum(p.numel() for p in self.model.parameters())/1e9:.2f}B params", + flush=True) + except Exception as e: + print(f"[align] Qwen aligner unavailable ({type(e).__name__}: {e}); " + f"falling back", flush=True) + + def align(self, wav16k, words, language=None): + import torch + if not self.ok or not words: + return None + transcript = " ".join(str(w) for w in words) + lang = language or ("German" if _looks_german(transcript) else "English") + try: + with self.lock: + ins, wl = self.proc.prepare_forced_aligner_inputs( + audio=np.asarray(wav16k, dtype=np.float32).reshape(-1), + transcript=transcript, language=lang) + ins = ins.to(self.model.device, self.model.dtype) + with torch.inference_mode(): + out = self.model(**ins) + ts = self.proc.decode_forced_alignment( + logits=out.logits, input_ids=ins["input_ids"], word_lists=wl, + timestamp_token_id=self.model.config.timestamp_token_id)[0] + except Exception as e: + print(f"[align] qwen align failed: {type(e).__name__}: {e}", flush=True) + return None + if not ts: + return None + dur = len(wav16k) / float(_SR) + sane = (len(ts) == len(words)) + prev = -1.0 + for t in ts: + a, b = float(t["start_time"]), float(t["end_time"]) + if a < prev - 1e-3 or b < a or b > dur + 0.25 \ + or (b - a) > config.ALIGN_QWEN_MAX_WORD_S: + sane = False + break + prev = a + score = 1.0 if sane else 0.0 + return [(t["text"], float(t["start_time"]), float(t["end_time"]), score) + for t in ts] + + +_DE = re.compile(r"[äöüßÄÖÜ]|\b(?:und|nicht|noch|ist|das|die|der|ein|eine|mit|" + r"auf|für|über|wie|was|dass|weil|ich|du|wir|sie|aber|schon)\b") + + +def _looks_german(text): + return len(_DE.findall(str(text or ""))) >= 2 + + +def make_aligner(): + """The configured aligner, with a fallback when the preferred one is missing.""" + order = [b.strip() for b in str(config.ALIGN_BACKEND).split(",") if b.strip()] + for b in order: + a = QwenAligner() if b == "qwen" else Aligner() + if a.ok: + return a + print(f"[align] backend {b!r} did not load, trying the next", flush=True) + return None + + +class Aligner: + """The CTC emission model, loaded once. + + CC BY-NC 4.0 -- see the module docstring. `make_aligner()` prefers the + Apache-2.0 Qwen model; this remains available and is the lighter of the two. + """ + + def __init__(self, root=None, device=None): + self.ok = False + self.lock = threading.Lock() + self.root = root or config.ALIGN_DIR + vocab_p = os.path.join(self.root, "vocab.json") + want_gpu = (device or config.ALIGN_DEVICE) != "cpu" + model_p = os.path.join(self.root, + "model.fp32.onnx" if want_gpu else "model.q8.onnx") + if not (os.path.exists(vocab_p) and os.path.exists(model_p)): + print(f"[align] no aligner at {self.root}; end-trimming is off", + flush=True) + return + try: + import json + import onnxruntime as ort + self.vocab = json.load(open(vocab_p, encoding="utf-8")) + self.blank = int(self.vocab.get("", 0)) + self.unk = int(self.vocab.get("", 3)) + provs = (["CUDAExecutionProvider", "CPUExecutionProvider"] if want_gpu + else ["CPUExecutionProvider"]) + so = ort.SessionOptions() + so.log_severity_level = 3 + self.sess = ort.InferenceSession(model_p, so, providers=provs) + self.provider = self.sess.get_providers()[0] + self.ok = True + print(f"[align] {os.path.basename(model_p)} on {self.provider}, " + f"{len(self.vocab)} tokens, {FRAME_S*1000:.0f} ms per frame", + flush=True) + except Exception as e: + print(f"[align] unavailable ({type(e).__name__}: {e}); " + f"end-trimming is off", flush=True) + + # ---------------------------------------------------------------- text + def _tokens(self, words): + """Per-word token id lists, with the characters the model cannot see dropped.""" + out = [] + for w in words: + s = unicodedata.normalize("NFKD", str(w).lower()) + s = "".join(_PRE.get(c, c) for c in s) + s = "".join(c for c in s if unicodedata.category(c) != "Mn") + s = s.replace("’", "'") + ids = [self.vocab[c] for c in s if c in self.vocab] + out.append(ids) + return out + + # ---------------------------------------------------------------- audio + def emissions(self, wav16k): + import torch + x = np.asarray(wav16k, dtype=np.float32).reshape(-1) + m = float(x.mean()) + sd = float(np.sqrt(((x - m) ** 2).mean() + 1e-7)) + x = ((x - m) / sd)[None, :] + with self.lock: + logits = self.sess.run( + ["logits"], {"input_values": x, + "attention_mask": np.ones(x.shape, dtype=np.int64)})[0] + lp = torch.log_softmax(torch.from_numpy(logits[0]).float(), dim=-1) + return lp + + def align(self, wav16k, words): + """[(word, start_s, end_s, score)] or None when it cannot be done.""" + import torch + import torchaudio.functional as AF + if not self.ok or not words: + return None + per_word = self._tokens(words) + flat, owner = [], [] + for wi, ids in enumerate(per_word): + for t in ids: + flat.append(t) + owner.append(wi) + if not flat: + return None + lp = self.emissions(wav16k) + if lp.shape[0] < len(flat): + # fewer frames than target tokens: alignment is not defined + return None + try: + labels, scores = AF.forced_align( + lp[None], torch.tensor([flat], dtype=torch.int32), + blank=self.blank) + except Exception as e: + print(f"[align] forced_align failed: {type(e).__name__}: {e}", + flush=True) + return None + labels = labels[0].tolist() + scores = scores[0].exp().tolist() + # walk the frame labels, attributing each non-blank run to its token + spans, ti = [], 0 + f = 0 + n = len(labels) + while f < n and ti < len(flat): + if labels[f] == self.blank: + f += 1 + continue + start = f + sc = [] + while f < n and labels[f] != self.blank: + sc.append(scores[f]) + f += 1 + if ti + 1 < len(flat) and f < n and labels[f] != self.blank \ + and labels[f] != labels[f - 1]: + break + spans.append((owner[ti], start, f, float(np.mean(sc)) if sc else 0.0)) + ti += 1 + if not spans: + return None + out = [] + for wi, w in enumerate(words): + mine = [s for s in spans if s[0] == wi] + if not mine: + out.append((w, None, None, 0.0)) + continue + out.append((w, mine[0][1] * FRAME_S, mine[-1][2] * FRAME_S, + float(np.mean([m[3] for m in mine])))) + return out + + +# ------------------------------------------------------------------ editing +def _fade_in(x, sr, upto_s, ramp_s): + """Silence before `upto_s - ramp_s`, then a linear ramp to full at `upto_s`.""" + n = len(x) + end = int(max(0.0, upto_s) * sr) + if end <= 0: + return x + end = min(end, n) + ramp = min(int(ramp_s * sr), end) + y = x.copy() + if end - ramp > 0: + y[:end - ramp] = 0.0 + if ramp > 0: + y[end - ramp:end] *= np.linspace(0.0, 1.0, ramp, dtype=np.float32) + return y + + +def _fade_out(x, sr, from_s, ramp_s): + """Linear ramp to zero starting at `from_s`, and nothing after it.""" + n = len(x) + start = int(max(0.0, from_s) * sr) + if start >= n: + return x + ramp = min(int(ramp_s * sr), n - start) + y = x[:start + ramp].copy() + if ramp > 0: + y[start:start + ramp] *= np.linspace(1.0, 0.0, ramp, dtype=np.float32) + return y + + +def edit_plan(spans, dur_s, allow_lead, min_score=None, closing_burst=0.0): + """Where to fade in and where to cut, from an alignment. + + Returns (fade_in_upto_s or None, cut_at_s or None, note). Both may be None: + a take whose last word runs to the end of the audio needs no tail, and a + take that opens on a burst needs no lead-in. + """ + ms = min_score if min_score is not None else config.ALIGN_MIN_SCORE + got = [s for s in spans if s[1] is not None] if spans else [] + if not got: + return None, None, "alignment found none of the scripted words" + lead = None + if allow_lead: + w0 = got[0] + if w0[3] >= ms and w0[1] > config.ALIGN_LEAD_MIN_S: + lead = float(w0[1]) + cut = None + last = got[-1] + if last[3] < ms: + return lead, None, (f"last word {last[0]!r} aligned at score " + f"{last[3]:.2f} < {ms:.2f}; tail left alone") + # a scripted burst after the last word is performance: leave room for it, + # plus a little, since the model rarely hits a burst length exactly + allow = 0.0 + if closing_burst > 0: + allow = closing_burst * config.ALIGN_BURST_SLACK + config.ALIGN_TAIL_PAD_S + tail_room = dur_s - float(last[2]) - allow + if tail_room > config.ALIGN_TAIL_MIN_S: + cut = float(last[2]) + config.ALIGN_TAIL_PAD_S + allow + note = ("" if allow <= 0 else + f"kept {allow:.2f}s for the {closing_burst:.2f}s of burst the script " + f"puts after its last word") + return lead, cut, note + + +def trim(wav, sr, tagged, plain, aligner, allow_lead=None, note=None): + """Trim one finished take. Returns (audio, report).""" + rep = {"applied": False, "lead_s": None, "cut_s": None, "removed_s": 0.0, + "words": 0, "note": ""} + if aligner is None or not aligner.ok or wav is None or len(wav) < sr // 4: + rep["note"] = "aligner unavailable" + return wav, rep + words = script_words(plain) + if not words: + rep["note"] = "no scripted words" + return wav, rep + if allow_lead is None: + allow_lead = not opens_on_burst(tagged) + dur = len(wav) / float(sr) + wav16 = _to16k(wav, sr) + spans = aligner.align(wav16, words) + if spans is None: + rep["note"] = "alignment failed" + return wav, rep + lead, cut, why = edit_plan(spans, dur, allow_lead, + closing_burst=closing_burst_s(tagged)) + rep.update(words=len([s for s in spans if s[1] is not None]), note=why) + y = wav + if lead is not None: + y = _fade_in(y, sr, lead, config.ALIGN_LEAD_RAMP_S) + rep["lead_s"] = round(lead, 3) + if cut is not None: + before = len(y) / float(sr) + y = _fade_out(y, sr, cut, config.ALIGN_TAIL_RAMP_S) + rep["cut_s"] = round(cut, 3) + rep["removed_s"] = round(before - len(y) / float(sr), 3) + rep["applied"] = bool(lead is not None or cut is not None) + rep["spans"] = [(w, None if a is None else round(a, 3), + None if b is None else round(b, 3), round(s, 3)) + for w, a, b, s in spans] + return y, rep + + +def _to16k(x, sr): + x = np.asarray(x, dtype=np.float32).reshape(-1) + if sr == _SR: + return x + if sr % _SR == 0: # 48000 -> 16000, the usual case + k = sr // _SR + n = (len(x) // k) * k + return x[:n].reshape(-1, k).mean(1) + idx = np.linspace(0, len(x) - 1, int(len(x) * _SR / sr), dtype=np.float32) + return np.interp(idx, np.arange(len(x), dtype=np.float32), x).astype(np.float32) + + +class StreamGuard: + """The same two edits, applied to audio that is already being played. + + A stream cannot retract what it has emitted, so this keeps a lookahead + buffer: audio is held back for `ALIGN_LOOKAHEAD_S` before being handed on. + While it is held, the aligner is run on everything generated so far — not on + every chunk, which would be far more alignment than generation, but every + `ALIGN_EVERY_S` of new audio. Once the last scripted word is found to have + ended, the tail is faded and the rest is dropped. + + With the aligner missing or switched off this class is a passthrough that + still buffers nothing, so the streaming path is unchanged. + """ + + def __init__(self, aligner, sr, tagged, plain, enabled=True, expect_s=None): + self.sr = sr + self.a = aligner + self.words = script_words(plain) + self.on = bool(enabled and aligner is not None and aligner.ok + and self.words) + self.allow_lead = self.on and not opens_on_burst(tagged) + cb = closing_burst_s(tagged) + self.tail_allow = (cb * config.ALIGN_BURST_SLACK + config.ALIGN_TAIL_PAD_S + if cb > 0 else 0.0) + self.buf = np.zeros(0, np.float32) + self.emitted = 0 # samples handed on + self.total = 0 # samples seen + self.done = False # tail found; drop everything further + self.lead_done = not self.allow_lead + self.last_check = 0 + self.report = {"applied": False, "lead_s": None, "cut_s": None, + "removed_s": 0.0, "checks": 0, "note": ""} + self.look = int(config.ALIGN_LOOKAHEAD_S * sr) + self.every = int(config.ALIGN_EVERY_S * sr) + # The first word often starts later than the ordinary lookahead: measured + # offline, onsets run to 1.3 s. Deciding the lead-in at 0.5 s asked the + # aligner to fit the whole script into half a second, which fails, so the + # fade silently never fired in the stream while firing 28 times in 36 + # takes offline. Hold back further for the first decision only, and ask + # about the first few words rather than all of them. + self.lead_scan = int(config.ALIGN_LEAD_SCAN_S * sr) + # Do not look for the end of the line before most of the requested + # duration exists. Forced alignment always places every target + # somewhere, so against a prefix it will happily report the last word as + # finished when half the line is still unspoken -- and that cut would + # truncate real speech rather than filler. The duration budget is + # honoured to within 0.02 s, so it is a reliable gate. + self.expect = float(expect_s or 0.0) + self.all = [] if self.on else None + + def _align_now(self, words=None): + w = np.concatenate(self.all) if self.all else np.zeros(0, np.float32) + if len(w) < self.sr // 4: + return None + self.report["checks"] += 1 + return self.a.align(_to16k(w, self.sr), words or self.words) + + def feed(self, chunk): + """Take one generated chunk, return what may be played now.""" + c = np.asarray(chunk, dtype=np.float32).reshape(-1) + if not self.on: + return c + if self.done: + return np.zeros(0, np.float32) + self.all.append(c) + self.total += len(c) + self.buf = np.concatenate([self.buf, c]) if len(self.buf) else c + + # the lead-in: decided once, from a longer first stretch and only about + # the opening words + if not self.lead_done and self.total >= self.lead_scan: + spans = self._align_now(self.words[:config.ALIGN_LEAD_WORDS]) + if spans: + got = [s for s in spans if s[1] is not None] + if got and got[0][3] >= config.ALIGN_MIN_SCORE \ + and got[0][1] > config.ALIGN_LEAD_MIN_S: + self.buf = _fade_in(self.buf, self.sr, got[0][1], + config.ALIGN_LEAD_RAMP_S) + self.report["lead_s"] = round(float(got[0][1]), 3) + self.report["applied"] = True + self.lead_done = True + + # the tail: once the last word has ended inside what we have generated + ready = (self.expect <= 0 + or self.total / float(self.sr) >= self.expect * config.ALIGN_TAIL_AFTER) + if ready and self.total - self.last_check >= self.every: + self.last_check = self.total + spans = self._align_now() + got = [s for s in spans if s[1] is not None] if spans else [] + if got and len(got) == len(self.words) \ + and got[-1][3] >= config.ALIGN_MIN_SCORE: + cut = (float(got[-1][2]) + config.ALIGN_TAIL_PAD_S + + self.tail_allow) + gen = self.total / float(self.sr) + if cut < gen - config.ALIGN_TAIL_MIN_S: + keep = int(cut * self.sr) - self.emitted + out = self.buf[:max(0, keep)] + ramp = int(config.ALIGN_TAIL_RAMP_S * self.sr) + ramp = min(ramp, len(out)) + if ramp > 0: + out = out.copy() + out[len(out) - ramp:] *= np.linspace( + 1.0, 0.0, ramp, dtype=np.float32) + self.done = True + self.report.update( + applied=True, cut_s=round(cut, 3), + removed_s=round(gen - cut, 3)) + self.emitted += len(out) + self.buf = np.zeros(0, np.float32) + return out + + # ordinary case: hand on everything except the lookahead. Nothing at all + # goes out until the lead-in has been decided, or the fade would be + # applied to audio the listener has already heard. + keep_back = self.look if self.lead_done else max(self.look, self.lead_scan) + if len(self.buf) > keep_back: + out = self.buf[:len(self.buf) - keep_back] + self.buf = self.buf[len(self.buf) - keep_back:] + self.emitted += len(out) + return out + return np.zeros(0, np.float32) + + def flush(self): + """Whatever is still held back, at the end of generation.""" + if not self.on or self.done: + return np.zeros(0, np.float32) + out, self.buf = self.buf, np.zeros(0, np.float32) + self.emitted += len(out) + return out diff --git a/optimized_pipeline/runtime/audio_export.py b/optimized_pipeline/runtime/audio_export.py new file mode 100644 index 0000000000000000000000000000000000000000..1a175dc7da75cbe8189abad49ae50fc81cdb2311 --- /dev/null +++ b/optimized_pipeline/runtime/audio_export.py @@ -0,0 +1,55 @@ +"""Assemble checked turns on the word clock; export matched mono MP3 episodes.""" +import json,math,subprocess,re,hashlib,html,shutil +from pathlib import Path +import numpy as np +import soundfile as sf +ROOT=Path(__file__).resolve().parent +OUT=ROOT.parent/'podcast-episodes' +SR=48000 + +def assemble(rows): + # Execute the newly published pipeline's actual word-clock reassembler. + import importlib.util + source=Path(__file__).resolve().parent/'published_audio.py' + spec=importlib.util.spec_from_file_location('published_podcast_audio',source) + module=importlib.util.module_from_spec(spec);spec.loader.exec_module(module) + units=[];lengths=[] + for i,row in enumerate(rows): + wave,sr=sf.read(ROOT/row['edited'],dtype='float32') + assert sr==SR and wave.ndim==1 and np.isfinite(wave).all() + edge=row['edit'] + units.append((i,wave,{'first_word_s':edge['first_word_in_clip_s'], + 'last_word_s':edge['last_word_in_clip_s']})) + lengths.append(len(wave)) + whole,maps=module.assemble(units,gap_ms=400) + timeline=[] + for i,(row,m) in enumerate(zip(rows,maps)): + timeline.append({'index':i,'speaker':row['turn']['speaker'],'text':row['turn']['text'], + 'clip_start_s':m['start_s'],'clip_end_s':m['start_s']+lengths[i]/SR, + 'speech_start_s':m['first_word_s'],'speech_end_s':m['last_word_s'], + 'source':row['edited']}) + gaps=[timeline[i]['speech_start_s']-timeline[i-1]['speech_end_s'] for i in range(1,len(timeline))] + assert all(abs(g-.4)<1/SR for g in gaps),gaps + return whole,timeline + + +def stamp(seconds): + ms=round(seconds*1000);return f'{ms//3600000:02d}:{ms//60000%60:02d}:{ms//1000%60:02d},{ms%1000:03d}' + +def export(wave,path,title,language): + source=path.with_suffix('.source.flac');sf.write(source,wave,SR,subtype='PCM_24') + common=['ffmpeg','-nostdin','-hide_banner','-y','-i',str(source)] + p=subprocess.run(common+['-af','loudnorm=I=-18:TP=-1:LRA=11:print_format=json','-f','null','-'],capture_output=True,text=True,check=True) + match=re.findall(r'\{\s*"input_i".*?\}',p.stderr,re.S);assert match + measured=json.loads(match[-1]);f='loudnorm=I=-18:TP=-1:LRA=11:linear=true:print_format=json' + for key,src in [('measured_I','input_i'),('measured_TP','input_tp'),('measured_LRA','input_lra'),('measured_thresh','input_thresh'),('offset','target_offset')]:f+=':'+key+'='+measured[src] + p=subprocess.run(common+['-af',f,'-ar','48000','-ac','1','-c:a','libmp3lame','-b:a','192k', + '-metadata','title='+title,'-metadata','artist=Mira and Idris (synthetic voices)', + '-metadata','album=Small Questions, Big Feelings — Podcast model experiment', + '-metadata','language='+language,str(path)],capture_output=True,text=True,check=True) + # Decode the entire deliverable; this checks that an apparently complete file is playable. + subprocess.run(['ffmpeg','-nostdin','-v','error','-i',str(path),'-f','null','-'],check=True) + probe=json.loads(subprocess.check_output(['ffprobe','-v','error','-show_format','-show_streams','-of','json',str(path)],text=True)) + assert probe['streams'][0]['codec_name']=='mp3' and probe['streams'][0]['channels']==1 + return {'file':path.name,'seconds':float(probe['format']['duration']),'bytes':path.stat().st_size, + 'sha256':hashlib.sha256(path.read_bytes()).hexdigest(),'normalization_first_pass':measured,'sample_rate':48000,'channels':1,'bitrate':192000,'decoded_without_errors':True} diff --git a/optimized_pipeline/runtime/codec_fused.py b/optimized_pipeline/runtime/codec_fused.py new file mode 100644 index 0000000000000000000000000000000000000000..d03f6865abb99c4f30889f8af96b169cf0c6652f --- /dev/null +++ b/optimized_pipeline/runtime/codec_fused.py @@ -0,0 +1,340 @@ +"""Fused Triton kernels for the MOSS Audio Tokenizer v2 streaming *decoder* (opt-in, HVS_CODEC_FUSED=1). + +Portions adapted from kadirnar/fast-moss-tokenizer (https://github.com/kadirnar/fast-moss-tokenizer, +commit 92c0c1e), Copyright kadirnar, licensed under the Apache License, Version 2.0 +(http://www.apache.org/licenses/LICENSE-2.0). Adapted ideas: cached immutable weight casts +(here: fp32 LayerNorm affine and weight-norm conv weights), a fused rotary kernel that keeps the +native FP32 roundings (enable_fp_fusion=False), and a fused layer-scale residual add. The hardware +and version guards of the original were removed; everything here is plain Triton (no NVRTC), so it +runs on Jetson Thor (sm_110, CUDA 13, torch 2.14, Triton 3.8). Changes: decode-only, bf16 codec +weights, streaming attention KV-cache/mask/RoPE fused, in-place stable caches for CUDA graphs. + +Every kernel reproduces the arithmetic of the pinned modeling code (revision f6e20e5) operation by +operation (same FP32 roundings, same bf16 casts, same SDPA call with the same key order), so the +waveforms are expected to be bit-identical to the unfused (graphed) decode. Unsupported cases fall +back to the original forwards. + +Use: + import codec_fused + codec_fused.install(codec, states) # once, before CUDA-graph capture (idempotent) + codec_fused.uninstall(codec) # restores the original forwards +""" +import math +import os +from types import MethodType + +import torch +import torch.nn.functional as F +import triton +import triton.language as tl +from triton.language.extra import libdevice + +ENABLED = os.environ.get('HVS_CODEC_FUSED', '0') == '1' + + +# ---------------------------------------------------------------------------------------------- +# Kernels +# ---------------------------------------------------------------------------------------------- +@triton.jit +def _prep_kernel(P, CK, CV, Freq, Off, Q, KA, VA, n_rows, T, CTX, + H: tl.constexpr, D: tl.constexpr, ROWS: tl.constexpr): + """q = rope(q_cur); k_all = cat(cache_k, rope(k_cur)); v_all = cat(cache_v, v_cur). + + P is the in_proj output (B, T, 3, H, D) bf16. RoPE follows apply_rope(): fp32 phase + freqs*(offset+t), libdevice cos/sin (== torch's cosf/sinf), separately rounded fp32 products + (no FMA), one bf16 cast. Even lane: x*c - x'*s; odd lane: x'*s + x*c (x' = pair partner). + """ + L = CTX + T + r = tl.program_id(0) * ROWS + tl.arange(0, ROWS)[:, None] + d = tl.arange(0, D)[None, :] + valid = r < n_rows + j = r % L + bh = r // L + h = bh % H + b = bh // H + cur = valid & (j >= CTX) + old = valid & (j < CTX) + t = j - CTX + cbase = (bh * CTX + j) * D + ck = tl.load(CK + cbase + d, old, 0.) + cv = tl.load(CV + cbase + d, old, 0.) + E = H * D + pbase = (b * T + t) * 3 * E + h * D + partner = d ^ 1 + q = tl.load(P + pbase + d, cur, 0.).to(tl.float32) + qp = tl.load(P + pbase + partner, cur, 0.).to(tl.float32) + k = tl.load(P + pbase + E + d, cur, 0.).to(tl.float32) + kp = tl.load(P + pbase + E + partner, cur, 0.).to(tl.float32) + v = tl.load(P + pbase + 2 * E + d, cur, 0.) + off = tl.load(Off + b, valid, 0).to(tl.float32) + phase = tl.load(Freq + d // 2) * (off + t.to(tl.float32)) + c = libdevice.cos(phase) + s = libdevice.sin(phase) + even = (d % 2) == 0 + qo = tl.where(even, q * c - qp * s, qp * s + q * c) + ko = tl.where(even, k * c - kp * s, kp * s + k * c) + ty = KA.dtype.element_ty + abase = (bh * L + j) * D + d + tl.store(KA + abase, tl.where(cur, ko.to(ty), ck), valid) + tl.store(VA + abase, tl.where(cur, v, cv), valid) + tl.store(Q + (bh * T + t) * D + d, qo.to(ty), cur) + + +@triton.jit +def _bias_kernel(CP, Off, POSK, BIAS, T, CTX, LD, BLOCK: tl.constexpr): + """Additive SDPA bias == torch's conversion of _build_streaming_sdpa_bias's bool mask. + + Grid (B*T, cdiv(L, BLOCK)). Row tq==0 also materializes pos_k = cat(cached_pos, pos_q). + """ + row = tl.program_id(0) + b = row // T + tq = row % T + L = CTX + T + i = tl.program_id(1) * BLOCK + tl.arange(0, BLOCK) + m = i < L + off = tl.load(Off + b) + old = tl.load(CP + b * CTX + i, m & (i < CTX), -1) + posk = tl.where(i < CTX, old, off + (i - CTX)) + posq = off + tq + delta = posq - posk + ok = (posk >= 0) & (delta >= 0) & (delta < CTX) + val = tl.where(ok, 0.0, float('-inf')) + tl.store(BIAS + row * LD + i, val.to(BIAS.dtype.element_ty), m) + tl.store(POSK + b * L + i, posk, m & (tq == 0)) + + +@triton.jit +def _update_kernel(KA, VA, POSK, CK, CV, CP, Off, Exec, B, T, CTX, n_kv, + H: tl.constexpr, D: tl.constexpr, ROWS: tl.constexpr, PBLOCK: tl.constexpr): + """caches = where(exec, (k_all, v_all, pos_k)[..., -CTX:], caches) in place; offset += T.""" + pid = tl.program_id(0) + L = CTX + T + n_kv_progs = tl.cdiv(n_kv, ROWS) + if pid < n_kv_progs: + r = pid * ROWS + tl.arange(0, ROWS)[:, None] + d = tl.arange(0, D)[None, :] + valid = r < n_kv + j = r % CTX + bh = r // CTX + b = bh // H + ex = tl.load(Exec + b, valid, 0) != 0 + w = valid & ex + src = (bh * L + T + j) * D + d + dst = (bh * CTX + j) * D + d + tl.store(CK + dst, tl.load(KA + src, w, 0.), w) + tl.store(CV + dst, tl.load(VA + src, w, 0.), w) + else: + q = pid - n_kv_progs + i = q * PBLOCK + tl.arange(0, PBLOCK) + pvalid = i < B * CTX + pb = i // CTX + pj = i % CTX + pex = tl.load(Exec + pb, pvalid, 0) != 0 + pw = pvalid & pex + tl.store(CP + pb * CTX + pj, tl.load(POSK + pb * L + T + pj, pw, 0), pw) + if q == 0: + bb = tl.arange(0, PBLOCK) + mb = bb < B + exb = tl.load(Exec + bb, mb, 0) != 0 + o = tl.load(Off + bb, mb, 0) + tl.store(Off + bb, tl.where(exb, o + T, o), mb) + + +@triton.jit +def _scale_add_kernel(X, U, S, Y, N, C, ROUND_BF16: tl.constexpr, BLOCK: tl.constexpr): + """y = residual.float() + (scale * update) with the bf16 rounding of torch's bf16 mul.""" + i = tl.program_id(0) * BLOCK + tl.arange(0, BLOCK) + m = i < N + x = tl.load(X + i, m, 0.).to(tl.float32) + u = tl.load(U + i, m, 0.).to(tl.float32) + s = tl.load(S + i % C, m, 0.).to(tl.float32) + prod = s * u + if ROUND_BF16: + prod = prod.to(tl.bfloat16).to(tl.float32) + tl.store(Y + i, x + prod, m) + + +def scale_add(x, update, scale): + out = torch.empty(x.shape, device=x.device, dtype=torch.float32) + n = x.numel() + rb = torch.promote_types(scale.dtype, update.dtype) == torch.bfloat16 + _scale_add_kernel[(triton.cdiv(n, 1024),)](x, update, scale, out, n, x.shape[-1], rb, 1024, + num_warps=4, enable_fp_fusion=False) + return out + + +# ---------------------------------------------------------------------------------------------- +# Patched forwards +# ---------------------------------------------------------------------------------------------- +def _attn_forward(original): + def forward(self, query, cu_seqlens=None, max_seqlen=None, position_ids=None, input_lengths=None): + state = self._streaming_state + if (state is None or query.dim() != 3 or self.context is None or self.rope is None + or self.resolve_attention_implementation(query, True) != 'sdpa' + or torch.is_grad_enabled() or not query.is_cuda): + return original(query, cu_seqlens, max_seqlen, position_ids, input_lengths) + B, T, _ = query.shape + H = self.num_heads + D = self.embed_dim // H + if D & (D - 1) or D % 2: + return original(query, cu_seqlens, max_seqlen, position_ids, input_lengths) + projected = self.in_proj(query) + if projected.dtype not in (torch.bfloat16, torch.float16) or not projected.is_contiguous(): + return original(query, cu_seqlens, max_seqlen, position_ids, input_lengths) + ck, cv, cp = self._ensure_streaming_cache(state, B, projected.device, projected.dtype) + CTX = self.context + L = CTX + T + freq = self._fused_freqs.get(D) + if freq is None: + # identical to apply_rope(): exp(arange(D//2) * (-log(max_period) * 2 / D)) in fp32 + ds = torch.arange(D // 2, device=query.device, dtype=torch.float32) + freq = self._fused_freqs[D] = torch.exp(ds * (-math.log(self.rope.max_period) * 2 / D)) + q = torch.empty((B, H, T, D), device=query.device, dtype=projected.dtype) + k_all = torch.empty((B, H, L, D), device=query.device, dtype=projected.dtype) + v_all = torch.empty_like(k_all) + n_rows = B * H * L + ROWS = 16 + _prep_kernel[(triton.cdiv(n_rows, ROWS),)]( + projected, ck, cv, freq, state.offset, q, k_all, v_all, n_rows, T, CTX, + H, D, ROWS, num_warps=4, enable_fp_fusion=False) + # Additive bias laid out exactly like torch's mem-efficient preprocessing (16-aligned rows). + LD = (L + 15) // 16 * 16 + bias = torch.empty((B, 1, T, LD), device=query.device, dtype=projected.dtype)[..., :L] + pos_k = torch.empty((B, L), device=query.device, dtype=torch.long) + _bias_kernel[(B * T, triton.cdiv(L, 1024))](cp, state.offset, pos_k, bias, T, CTX, LD, 1024, + num_warps=4) + out = F.scaled_dot_product_attention(q, k_all, v_all, bias, dropout_p=0.0) + out = out.transpose(1, 2).reshape(B, T, self.embed_dim) + n_kv = B * H * CTX + PBLOCK = 1024 + grid = triton.cdiv(n_kv, 8) + triton.cdiv(B * CTX, PBLOCK) + _update_kernel[(grid,)](k_all, v_all, pos_k, ck, cv, cp, state.offset, state.exec_mask, + B, T, CTX, n_kv, H, D, 8, PBLOCK, num_warps=4) + return self.out_proj(out) + return forward + + +def _norm_forward(original, weight, bias): + """LayerNorm with the fp32 affine cast cached (autocast would cast the bf16 params every call).""" + params = (original.__self__.weight, original.__self__.bias) + versions = tuple(p._version if p is not None else None for p in params) + + def forward(self, x): + if (self.weight is not params[0] or self.bias is not params[1] + or tuple(p._version if p is not None else None for p in (self.weight, self.bias)) != versions): + return original(x) + return F.layer_norm(x, self.normalized_shape, weight, bias, self.eps) + return forward + + +def _layer_forward(original): + def forward(self, x, **kwargs): + s1, s2 = self.layer_scale_1, self.layer_scale_2 + if (torch.is_grad_enabled() or not x.is_cuda or not hasattr(s1, 'scale') or not hasattr(s2, 'scale') + or not s1.channel_last or not s2.channel_last): + return original(x, **kwargs) + for norm, block, scale in ((self.norm1, self.self_attn, s1.scale), (self.norm2, self.ffn, s2.scale)): + normed = norm(x) + update = block(normed, **kwargs) if block is self.self_attn else block(normed) + if (normed.dtype == torch.float32 and update.shape == x.shape and x.is_contiguous() + and update.is_contiguous() and scale.dtype in (torch.bfloat16, torch.float32) + and update.dtype in (torch.bfloat16, torch.float32)): + x = scale_add(x, update, scale) + else: + x = x.to(normed) + scale * update + return x + return forward + + +def _wn_conv_forward(original, weight): + """Weight-norm conv with the parametrized weight (g * v / ||v||) computed once.""" + module = original.__self__ + parameters = tuple(module.parametrizations.weight.parameters()) + versions = tuple(p._version for p in parameters) + + def forward(self, x): + current = tuple(self.parametrizations.weight.parameters()) + if (len(current) != len(parameters) or any(a is not b for a, b in zip(current, parameters)) + or tuple(p._version for p in current) != versions): + return original(x) + return self._conv_forward(x, weight, self.bias) + return forward + + +def _shared_exec_mask(original, codec): + def set_mask(self, exec_mask): + shared = getattr(codec, '_fused_exec_mask', None) + states = [m._streaming_state for m in codec.modules() + if getattr(m, '_streaming_state', None) is not None] + if shared is not None and states and all(s.exec_mask is shared for s in states): + shared[:] = exec_mask.to(torch.bool).to(shared.device) + else: + original(exec_mask) + return set_mask + + +# ---------------------------------------------------------------------------------------------- +# Install / uninstall +# ---------------------------------------------------------------------------------------------- +def install(codec, states=None): + """Patch the decoder of `codec` in place (idempotent). `states`: CodecGraphs.states (optional). + + With `states` (all batch-1, persistent), every decoder streaming state shares one exec_mask + tensor, so _set_streaming_exec_mask is a single copy instead of ~190. + Call before any CUDA-graph capture; graphs captured before install keep the old kernels. + """ + saved = getattr(codec, '_fused_saved', None) + if saved is None: + saved = [] + _patch(codec, saved) + codec._fused_saved = saved + if states: + shared = states[0].exec_mask + if all(s.exec_mask.shape == shared.shape and s.exec_mask.device == shared.device for s in states): + for s in states: + s.exec_mask = shared + codec._fused_exec_mask = shared + if '_set_streaming_exec_mask' not in codec.__dict__: + saved.append((codec, '_set_streaming_exec_mask', False, None)) + codec._set_streaming_exec_mask = MethodType( + _shared_exec_mask(codec._set_streaming_exec_mask, codec), codec) + return saved + + +def _patch(codec, saved): + def replace(module, name, value): + saved.append((module, name, name in module.__dict__, module.__dict__.get(name))) + setattr(module, name, value) + + with torch.no_grad(): + for module in codec.decoder.modules(): + kind = type(module).__name__ + if kind == 'MossAudioTokenizerMultiheadAttention': + module._fused_freqs = {} + replace(module, 'forward', MethodType(_attn_forward(module.forward), module)) + elif kind == 'MossAudioTokenizerTransformerLayer': + replace(module, 'forward', MethodType(_layer_forward(module.forward), module)) + elif type(module) is torch.nn.LayerNorm and module.elementwise_affine: + w = module.weight.detach().float().clone() + b = module.bias.detach().float().clone() if module.bias is not None else None + replace(module, 'forward', MethodType(_norm_forward(module.forward, w, b), module)) + # Weight-norm convs of the quantizer decode path (fp32, autocast disabled there). + for name, module in codec.quantizer.named_modules(): + if (name.rsplit('.', 1)[-1] in ('out_proj', 'output_proj') and isinstance(module, torch.nn.Conv1d) + and torch.nn.utils.parametrize.is_parametrized(module, 'weight')): + with torch.autocast('cuda', enabled=False): + w = module.weight.detach().clone() + replace(module, 'forward', MethodType(_wn_conv_forward(module.forward, w), module)) + + +def uninstall(codec): + saved = getattr(codec, '_fused_saved', None) + if saved is None: + return + for module, name, existed, old in reversed(saved): + if existed: + setattr(module, name, old) + else: + delattr(module, name) + codec._fused_saved = None + codec.__dict__.pop('_fused_exec_mask', None) diff --git a/optimized_pipeline/runtime/config.py b/optimized_pipeline/runtime/config.py new file mode 100644 index 0000000000000000000000000000000000000000..b13c0969d5b31680a081c1339e38d1e0b03d9b33 --- /dev/null +++ b/optimized_pipeline/runtime/config.py @@ -0,0 +1,4 @@ +import os +ALIGN_QWEN_DEVICE=os.environ.get("ACTING_DEVICE","cuda:0") +ALIGN_QWEN_REPO=os.environ.get("PODCAST_ALIGNER","Qwen/Qwen3-ForcedAligner-0.6B-hf") +ALIGN_QWEN_MAX_WORD_S=3.0 diff --git a/optimized_pipeline/runtime/ears_reward.py b/optimized_pipeline/runtime/ears_reward.py new file mode 100644 index 0000000000000000000000000000000000000000..a3b35646431727a657c2a3bcbfee9829335a7a53 --- /dev/null +++ b/optimized_pipeline/runtime/ears_reward.py @@ -0,0 +1,206 @@ +"""Pinned Humaneness Ears quality estimates; no teachers, decoder or audio upload. + +Base = Whisper Base; Medium = Whisper Small. Reuse both encoders on scorer GPU. +Scores are decoded with the release's frozen training mean/std. Fixed native +scales bring AudioBox and DNSMOS onto [0,1], not per-batch min/max ranks. +""" +import hashlib +import importlib.util +import json +from pathlib import Path +import threading +import time +from typing import Literal + +import numpy as np +from pydantic import BaseModel, ConfigDict, Field + +import settings + +REPO='laion/humaneness-ears-base-medium' +REVISION='818506970d93c809a3295a0a02c40dee8ff2bfc3' +WEIGHT_HASHES={'base':'c4d9e05295020cd0fab4e44ee10aae3bdf934b0a7700fea05bb271ffa2e410b4', + 'medium':'00f30de0f7d656d2a1e86bdc629673ff8b576532e1263b02bcebdfc2763e54f1'} +CODE_HASH='7fa88f3c73fbedfd2b805a3b0007edd100da98064ac4dcf0c76659b0840bb7c0' +METRICS={'ce':('audiobox:CE','Content Enjoyment',1.,10.), + 'pq':('audiobox:PQ','Production Quality',1.,10.), + 'cu':('audiobox:CU','Content Usefulness',1.,10.), + 'pc':('audiobox:PC','Production Complexity',1.,10.), + 'mos':('dnsmos:P808_MOS','DNSMOS P.808 MOS',1.,5.), + 'ovrl':('dnsmos:OVRL','DNSMOS Overall',1.,5.)} + + +class RankingOptions(BaseModel): + model_config=ConfigDict(extra='forbid') + mode: Literal['ears_mix','ears_only','legacy']='ears_mix' + model: Literal['base','medium']='medium' + metric: Literal['ce','pq','cu','pc','mos','ovrl']='ce' + weight: float=Field(default=.5,ge=0,le=1,allow_inf_nan=False) + + +def normalized(raw,metric): + if not np.isfinite(raw):raise ValueError('Nonfinite Humaneness Ears score') + _,_,lo,hi=METRICS[metric] + return float(np.clip((raw-lo)/(hi-lo),0,1)) + + +def combine_ears(item,report,options): + """Pure sorting means exactly that: no hidden speaker/burst/WER mixture.""" + item['ears']=report + item['previous_quality']=item['quality'] + value=report.get('normalized') + if value is None: + item.update(quality=0.,reward=0.,reward_model=options.mode,ranking_available=False) + return item + if options.mode=='ears_only': + # Sort by raw regression output, preserving order even outside the + # display scale. Do not silently include WER or clamp away differences. + item.update(quality=value,reward=float(report['raw']),ranking_available=True, + reward_model='ears_only',ranking_gate=1.,ears_weight=1.,clap_weight=0.) + else: + quality=(1-options.weight)*item['n_clap']+options.weight*value + item.update(quality=quality,reward=quality*item['gate'],ranking_available=True, + reward_model='ears_mix',ranking_gate=item['gate'],ears_weight=options.weight, + clap_weight=1-options.weight) + return item + + +def catalog(): + return {'repo':REPO,'revision':REVISION,'default':RankingOptions().model_dump(), + 'models':[{'id':'base','name':'Base · Whisper Base · 26M'}, + {'id':'medium','name':'Medium · Whisper Small · 97M'}], + 'metrics':[{'id':k,'key':v[0],'name':v[1],'min':v[2],'max':v[3]} for k,v in METRICS.items()], + 'normalization':'clip((raw-min)/(max-min),0,1); VoiceCLAP uses existing fixed normalization', + 'long_audio':'Non-overlapping <=30s windows, duration-weighted raw-score mean; no discarded tail', + 'note':'Distilled regression proxies, not original AudioBox/DNSMOS models or human MOS.'} + + +class EarsModels: + def __init__(self,device=None): + self.device=str(device or settings.SCORE_DEVICE) + self.lock=threading.RLock();self.models={};self.last_timing={} + self.root=None + + def load(self,size): + import torch + from huggingface_hub import snapshot_download + from safetensors.torch import load_file + from transformers import WhisperFeatureExtractor + with self.lock: + if size in self.models:return + if size not in WEIGHT_HASHES:raise ValueError('Unknown Humaneness Ears variant') + root=Path(snapshot_download(REPO,revision=REVISION,token=False, + cache_dir=str(settings.HERE/'model-cache/ears/hub'),allow_patterns=[ + 'model.py','classes.json','training_normalization.json','display_normalization.json', + 'release_manifest.json','LICENSE','NOTICE.md',size+'/config.json', + size+'/preprocessor_config.json',size+'/model.safetensors'])) + manifest=json.loads((root/'release_manifest.json').read_text()) + files=['model.py','classes.json','training_normalization.json','display_normalization.json', + size+'/config.json',size+'/preprocessor_config.json',size+'/model.safetensors'] + for relative in files: + digest=hashlib.sha256() + with (root/relative).open('rb') as file: + for block in iter(lambda:file.read(8*1024*1024),b''):digest.update(block) + expected=CODE_HASH if relative=='model.py' else WEIGHT_HASHES[size] if relative.endswith('safetensors') else manifest['files'][relative]['sha256'] + if digest.hexdigest()!=expected:raise RuntimeError('Humaneness Ears integrity check failed: '+relative) + spec=importlib.util.spec_from_file_location('_small_demo_ears_release',root/'model.py') + module=importlib.util.module_from_spec(spec);spec.loader.exec_module(module) + classes=json.loads((root/'classes.json').read_text())['names'] + norm=json.loads((root/'training_normalization.json').read_text()) + display=json.loads((root/'display_normalization.json').read_text()) + if norm['score_names']!=[r['name'] for r in display['targets']]: + raise RuntimeError('Humaneness Ears target order mismatch') + if not all(v[0] in norm['score_names'] for v in METRICS.values()): + raise RuntimeError('Humaneness Ears quality heads missing') + # Isolate random constructor initialization from TTS samplers. + with torch.random.fork_rng(devices=[]): + model=module.LayeredMultiTaskWhisper(root/size,len(classes),initialize_pretrained=False) + model.load_state_dict(load_file(root/size/'model.safetensors',device='cpu'),strict=True) + model.to(self.device).eval() + extractor=WhisperFeatureExtractor.from_pretrained(root/size,local_files_only=True) + self.models[size]=(model,extractor,norm) + self.root=root + + def prepare(self): + for size in ('base','medium'):self.load(size) + + def predict_conditioning(self,audio16,names): + """Distilled native 99 axes, normalized exactly as VC preparation. + + This replaces unavailable corpus annotations with measured audio + predictions of the same named targets, not zeros or prompt guesses. + """ + import torch + self.load('medium') + if len(names)!=99 or len(set(names))!=99: + raise ValueError('VC needs exactly 99 named score axes') + mapped=['emo_'+n if i<40 else 'vn_'+n+'_reg' if i<97 else n for i,n in enumerate(names)] + with self.lock,torch.inference_mode(),torch.autocast('cuda',enabled=self.device.startswith('cuda'),dtype=torch.bfloat16): + model,extractor,norm=self.models['medium'] + indexes=[norm['score_names'].index(n) for n in mapped] + mean=np.asarray(norm['score_mean'],np.float32)[indexes] + std=np.asarray(norm['score_std'],np.float32)[indexes] + totals=np.zeros((len(audio16),99),np.float64);lengths=np.zeros(len(audio16),np.float64) + segments=[];owners=[];weights=[] + for row,wave in enumerate(audio16): + wave=wave.detach().float().cpu().numpy() if hasattr(wave,'detach') else np.asarray(wave,dtype=np.float32) + if wave.ndim!=1 or not len(wave) or not np.isfinite(wave).all():raise ValueError('Invalid VC score audio') + for start in range(0,len(wave),480000): + part=wave[start:start+480000];segments.append(np.pad(part,(0,max(0,1600-len(part))))) + owners.append(row);weights.append(len(part)) + for start in range(0,len(segments),4): + features=extractor(segments[start:start+4],sampling_rate=16000,padding='longest',truncation=True, + max_length=480000,return_attention_mask=True,return_tensors='np') + mel=features['input_features'].astype(np.float32);mask=features['attention_mask'].astype(np.int64) + if mel.shape[-1]%2:mel=np.pad(mel,((0,0),(0,0),(0,1)));mask=np.pad(mask,((0,0),(0,1))) + out=model(torch.from_numpy(mel).to(self.device),torch.from_numpy(mask).to(self.device),predict_events=False) + raw=out['scores'][:,indexes].float().cpu().numpy()*std+mean + if not np.isfinite(raw).all():raise RuntimeError('Nonfinite VC score conditioning') + for offset,value in enumerate(raw): + i=start+offset;totals[owners[i]]+=value*weights[i];lengths[owners[i]]+=weights[i] + result=(totals/lengths[:,None]).astype(np.float32) + result[:,:98]/=6.;result[:,98]/=10. + return result + + def predict(self,audio16,size='medium',metric='ce'): + """Batched PCM, 16kHz. Every second participates, including >30s tails.""" + import torch + self.load(size);tick=time.perf_counter() + segments=[];rows=[];weights=[];durations=[] + for row,wave in enumerate(audio16): + wave=wave.detach().float().cpu().numpy() if hasattr(wave,'detach') else np.asarray(wave,dtype=np.float32) + wave=wave.reshape(-1) + if not np.isfinite(wave).all():raise ValueError('Nonfinite Ears audio input') + durations.append(len(wave)/16000) + for start in range(0,len(wave),480000): + part=wave[start:start+480000] + weights.append(len(part));rows.append(row) + segments.append(np.pad(part,(0,max(0,1600-len(part))))) + totals=np.zeros((len(audio16),len(METRICS)),np.float64);denom=np.zeros(len(audio16),np.float64) + with self.lock,torch.inference_mode(),torch.autocast('cuda',enabled=self.device.startswith('cuda'),dtype=torch.bfloat16): + model,extractor,norm=self.models[size] + indexes=[norm['score_names'].index(v[0]) for v in METRICS.values()] + mean=np.asarray(norm['score_mean'])[indexes];std=np.asarray(norm['score_std'])[indexes] + for start in range(0,len(segments),4): + features=extractor(segments[start:start+4],sampling_rate=16000,padding='longest', + truncation=True,max_length=480000,return_attention_mask=True,return_tensors='np') + mel=features['input_features'].astype(np.float32) + mask=features['attention_mask'].astype(np.int64) + if mel.shape[-1]%2: + mel=np.pad(mel,((0,0),(0,0),(0,1)));mask=np.pad(mask,((0,0),(0,1))) + out=model(torch.from_numpy(mel).to(self.device),torch.from_numpy(mask).to(self.device),predict_events=False) + raw=out['scores'][:,indexes].float().cpu().numpy()*std+mean + if not np.isfinite(raw).all():raise RuntimeError('Nonfinite Humaneness Ears predictions') + for offset,value in enumerate(raw): + i=start+offset;totals[rows[i]]+=value*weights[i];denom[rows[i]]+=weights[i] + results=[] + for row in range(len(audio16)): + raw={key:float(v) for key,v in zip(METRICS,totals[row]/max(1,denom[row]))} if denom[row] else {} + results.append({'available':bool(denom[row]),'model':size,'metric':metric, + 'key':METRICS[metric][0],'raw':raw.get(metric), + 'normalized':normalized(raw[metric],metric) if raw else None, + 'scores_raw':{METRICS[k][0]:v for k,v in raw.items()},'duration_seconds':durations[row], + 'window_count':rows.count(row),'aggregation':'duration-weighted mean over <=30s windows', + 'repo':REPO,'revision':REVISION,'proxy':True}) + self.last_timing={'ears_seconds':time.perf_counter()-tick,'ears_windows':len(segments),'ears_model':size} + return results diff --git a/optimized_pipeline/runtime/generate.py b/optimized_pipeline/runtime/generate.py new file mode 100644 index 0000000000000000000000000000000000000000..65fdebba3799169747a58c8b3b3ea1835b39f21c --- /dev/null +++ b/optimized_pipeline/runtime/generate.py @@ -0,0 +1,19 @@ +"""Conservative outside-word crop; same implementation as the listened-to baseline.""" +import numpy as np +SR=48000 +def crop(wave,report): + if not report['alignment_ok']:raise ValueError('Refuse to cut without plausible word alignment') + first,last=report['first_word_s'],report['last_word_s'];duration=len(wave)/SR + a=max(0,first-.08);b=min(duration,last+.15) + clip=wave[round(a*SR):round(b*SR)].copy() + lead=first-a;tail=b-last + fadein=min(.02,lead*.5);fadeout=min(.05,tail*.5) + for length,reverse in [(int(fadein*SR),False),(int(fadeout*SR),True)]: + if length>1: + if reverse:clip[-length:]*=np.linspace(1,0,length,dtype=np.float32) + else:clip[:length]*=np.linspace(0,1,length,dtype=np.float32) + edit={'start_s':a,'end_s':b,'removed_head_s':a,'removed_tail_s':duration-b, + 'first_word_in_clip_s':lead,'last_word_in_clip_s':last-a, + 'lead_guard_s':lead,'tail_guard_s':tail,'fade_in_s':fadein,'fade_out_s':fadeout, + 'policy':'80 ms lead, 150 ms tail, fades outside aligned speech; preserve all internal timing'} + return clip,edit diff --git a/optimized_pipeline/runtime/local_fused.py b/optimized_pipeline/runtime/local_fused.py new file mode 100644 index 0000000000000000000000000000000000000000..f3c92a70e2201e52de7bef535e00cd1d0c3d5361 --- /dev/null +++ b/optimized_pipeline/runtime/local_fused.py @@ -0,0 +1,457 @@ +"""Opt-in Triton path for the 12 codebook steps of one audio frame (HVS_LOCAL_TRITON=1). + +Replaces FastGenerator.local_frame (1-layer local transformer with a 13-slot +static KV cache, binary stop head, 12 audio heads with CFG, top-k/top-p +sampling). Per codebook step t: + + 1. LayerNorm 1 + c_attn GEMV (+bias) -- step 0 only, see table below + 2. RoPE + KV-cache write + attention over <=13 cached positions (one program per row/head) + 3. c_proj GEMV + bias + residual + 4. LayerNorm 2 + fc_in GEMV + bias + SiLU + 5. fc_out GEMV + bias + residual + 6. final LayerNorm + audio head GEMV + CFG mix (fp32 logits) + 7. sampling: temperature, top-k, top-p, inverse-CDF draw from one torch.rand + uniform (+ the binary stop head on step 0) +=> 7 + 11*6 = 73 kernels per frame (+1 torch.rand), versus hundreds before. + +Why it is faster: the frame is weight-bandwidth bound (hidden 2560, MLP 9728: +~157 MB of bf16 weights per step, x12 = 1.9 GB per frame). + * Hand-written batch-2 GEMVs stream weights at ~230 GB/s on Thor (cuBLAS + picks kernels reaching ~75-130 GB/s for these M=2 shapes). + * qkv table: steps t >= 1 feed emb_{t-1}[code] into the transformer, and + LN1 + c_attn of an embedding row does not depend on anything else, so + LN1(emb_c) @ Wqkv^T + b is precomputed once for all 11 x 1024 codes + (173 MB, built in <1 s at init). This removes 39 MB of weight reads from + 11 of 12 steps (-25 % bytes). HVS_LOCAL_TRITON_TABLE=0 disables it. + * c_proj is loaded with evict_last and the other weights with evict_first, + so c_proj tends to stay in the 32 MB L2 between steps (~4 %). + +Numerics: same bf16 weights; every point where the reference rounds to bf16 +(LayerNorm outputs, linear outputs, RoPE output, attention output, residual +sums, logits) is rounded to bf16 here too; accumulation is fp32. Sampling +keeps the distribution of performance_core.fast_sample (top-k first, then +top-p over the k survivors, softmax of logits/temperature; ties broken +towards the smaller index like torch.topk); only the random stream differs. +Static shapes, no host syncs: CUDA-graph capturable. Supports n == 1 with +nb in (1, 2) (the live path); other shapes/parameters fall back to the +original local_frame. The table assumes the local weights are not modified +after FastGenerator init (true for the engine's merged bf16 weights). +""" +import math +import os + +import torch +import triton +import triton.language as tl + + +# ----------------------------------------------------------------------------- kernels + +@triton.jit +def _stats(x_ptr, eps, K: tl.constexpr, KP: tl.constexpr): + """Mean and rstd of one row of length K (two-pass, fp32).""" + rk = tl.arange(0, KP) + km = rk < K + x = tl.load(x_ptr + rk, mask=km, other=0.0).to(tl.float32) + mean = tl.sum(x, 0) / K + d = tl.where(km, x - mean, 0.0) + return mean, 1.0 / tl.sqrt(tl.sum(d * d, 0) / K + eps) + + +@triton.jit +def _ln_chunk(x_ptr, rk, mean, rstd, g, b): + x = tl.load(x_ptr + rk).to(tl.float32) + return ((x - mean) * rstd * g + b).to(tl.bfloat16).to(tl.float32) + + +@triton.jit +def _ln_gemv_kernel(x_ptr, emb_ptr, code_ptr, code_col, + lnw_ptr, lnb_ptr, w_ptr, b_ptr, y_ptr, res_ptr, N, eps, + K: tl.constexpr, KP: tl.constexpr, TWO: tl.constexpr, BN: tl.constexpr, + BK: tl.constexpr, GATHER: tl.constexpr, WRITE_RES: tl.constexpr, EV: tl.constexpr, + ACT: tl.constexpr): + """y[rows,N] = act(LN(x) @ W^T + b), bf16 out, 1 or 2 rows (TWO). + GATHER: both rows are emb[code[0, code_col]] (CFG branches share the code).""" + pid = tl.program_id(0) + if GATHER: + code = tl.load(code_ptr + code_col) + x0p = emb_ptr + code * K + x1p = x0p + else: + x0p = x_ptr + x1p = x_ptr + K + m0, r0 = _stats(x0p, eps, K, KP) + if TWO: + m1, r1 = _stats(x1p, eps, K, KP) + if WRITE_RES: + if pid == 0: # residual stream starts as the raw input row(s) + rk = tl.arange(0, KP) + km = rk < K + tl.store(res_ptr + rk, tl.load(x0p + rk, mask=km), mask=km) + if TWO: + tl.store(res_ptr + K + rk, tl.load(x1p + rk, mask=km), mask=km) + rn = pid * BN + tl.arange(0, BN) + acc0 = tl.zeros([BN], tl.float32) + acc1 = tl.zeros([BN], tl.float32) + for k0 in range(0, K, BK): + rk = k0 + tl.arange(0, BK) + w = tl.load(w_ptr + rn[:, None] * K + rk[None, :], eviction_policy=EV).to(tl.float32) + g = tl.load(lnw_ptr + rk).to(tl.float32) + bb = tl.load(lnb_ptr + rk).to(tl.float32) + acc0 += tl.sum(w * _ln_chunk(x0p, rk, m0, r0, g, bb)[None, :], 1) + if TWO: + acc1 += tl.sum(w * _ln_chunk(x1p, rk, m1, r1, g, bb)[None, :], 1) + bias = tl.load(b_ptr + rn).to(tl.float32) + y0 = (acc0 + bias).to(tl.bfloat16) + if ACT == 1: # SiLU on the bf16 linear output, like nn.SiLU on a bf16 tensor + f = y0.to(tl.float32) + y0 = (f / (1.0 + tl.exp(-f))).to(tl.bfloat16) + tl.store(y_ptr + rn, y0) + if TWO: + y1 = (acc1 + bias).to(tl.bfloat16) + if ACT == 1: + f = y1.to(tl.float32) + y1 = (f / (1.0 + tl.exp(-f))).to(tl.bfloat16) + tl.store(y_ptr + N + rn, y1) + + +@triton.jit +def _gemv_res_kernel(a_ptr, w_ptr, b_ptr, h_ptr, N, + K: tl.constexpr, TWO: tl.constexpr, BN: tl.constexpr, BK: tl.constexpr, + EV: tl.constexpr): + """h[rows,N] = h + bf16(a @ W^T + b) (in place, bf16).""" + pid = tl.program_id(0) + rn = pid * BN + tl.arange(0, BN) + acc0 = tl.zeros([BN], tl.float32) + acc1 = tl.zeros([BN], tl.float32) + for k0 in range(0, K, BK): + rk = k0 + tl.arange(0, BK) + w = tl.load(w_ptr + rn[:, None] * K + rk[None, :], eviction_policy=EV).to(tl.float32) + acc0 += tl.sum(w * tl.load(a_ptr + rk).to(tl.float32)[None, :], 1) + if TWO: + acc1 += tl.sum(w * tl.load(a_ptr + K + rk).to(tl.float32)[None, :], 1) + bias = tl.load(b_ptr + rn).to(tl.float32) + o0 = (acc0 + bias).to(tl.bfloat16).to(tl.float32) + tl.store(h_ptr + rn, (tl.load(h_ptr + rn).to(tl.float32) + o0).to(tl.bfloat16)) + if TWO: + o1 = (acc1 + bias).to(tl.bfloat16).to(tl.float32) + tl.store(h_ptr + N + rn, (tl.load(h_ptr + N + rn).to(tl.float32) + o1).to(tl.bfloat16)) + + +@triton.jit +def _attn_kernel(qkv_ptr, kc_ptr, vc_ptr, cos_ptr, sin_ptr, o_ptr, t, scale, + table_ptr, emb_ptr, code_ptr, h_ptr, + H: tl.constexpr, D: tl.constexpr, L: tl.constexpr, + HALF_P: tl.constexpr, DP: tl.constexpr, LP: tl.constexpr, GATHER: tl.constexpr): + """One (row, head): RoPE on q/k at position t, write k/v to the static cache slot t, + softmax attention over slots 0..t. Cache layout [rows, L, H, D] (the release's). + GATHER (steps t>0): q/k/v come from the precomputed table row of the sampled code + (= LN1(emb) @ Wqkv^T + b), and this program also initialises its slice of the + residual stream h with the embedding row.""" + r = tl.program_id(0) + hh = tl.program_id(1) + E: tl.constexpr = H * D + half = tl.arange(0, HALF_P) + hm = half < D // 2 + if GATHER: + code = tl.load(code_ptr + t - 1) + base = table_ptr + code * 3 * E + hh * D + rd0 = tl.arange(0, DP) + tl.store(h_ptr + r * E + hh * D + rd0, tl.load(emb_ptr + code * E + hh * D + rd0, mask=rd0 < D), + mask=rd0 < D) + else: + base = qkv_ptr + r * 3 * E + hh * D + qe = tl.load(base + 2 * half, mask=hm, other=0.0).to(tl.float32) + qo = tl.load(base + 2 * half + 1, mask=hm, other=0.0).to(tl.float32) + ke = tl.load(base + E + 2 * half, mask=hm, other=0.0).to(tl.float32) + ko = tl.load(base + E + 2 * half + 1, mask=hm, other=0.0).to(tl.float32) + c = tl.load(cos_ptr + t * (D // 2) + half, mask=hm, other=0.0).to(tl.float32) + s = tl.load(sin_ptr + t * (D // 2) + half, mask=hm, other=0.0).to(tl.float32) + qe2 = (qe * c - qo * s).to(tl.bfloat16).to(tl.float32) + qo2 = (qo * c + qe * s).to(tl.bfloat16).to(tl.float32) + ke2 = (ke * c - ko * s).to(tl.bfloat16) + ko2 = (ko * c + ke * s).to(tl.bfloat16) + rd = tl.arange(0, DP) + dm = rd < D + v_now = tl.load(base + 2 * E + rd, mask=dm, other=0.0) + slot = (r * L + t) * E + hh * D + tl.store(kc_ptr + slot + 2 * half, ke2, mask=hm) + tl.store(kc_ptr + slot + 2 * half + 1, ko2, mask=hm) + tl.store(vc_ptr + slot + rd, v_now, mask=dm) + # earlier slots from the cache, current slot from registers + rl = tl.arange(0, LP) + lm = rl < t + kb = kc_ptr + (r * L + rl[:, None]) * E + hh * D + kce = tl.load(kb + 2 * half[None, :], mask=lm[:, None] & hm[None, :], other=0.0).to(tl.float32) + kco = tl.load(kb + 2 * half[None, :] + 1, mask=lm[:, None] & hm[None, :], other=0.0).to(tl.float32) + sc = tl.sum(kce * qe2[None, :] + kco * qo2[None, :], 1) + s_now = tl.sum(ke2.to(tl.float32) * qe2 + ko2.to(tl.float32) * qo2, 0) + sc = tl.where(rl == t, s_now, sc) * scale + sc = tl.where(rl <= t, sc, -float("inf")) + p = tl.exp(sc - tl.max(sc, 0)) + p = p / tl.sum(p, 0) + vb = vc_ptr + (r * L + rl[:, None]) * E + hh * D + vv = tl.load(vb + rd[None, :], mask=lm[:, None] & dm[None, :], other=0.0).to(tl.float32) + vv = tl.where((rl == t)[:, None], v_now.to(tl.float32)[None, :], vv) + o = tl.sum(p[:, None] * vv, 0) + tl.store(o_ptr + r * E + hh * D + rd, o.to(tl.bfloat16), mask=dm) + + +@triton.jit +def _head_kernel(h_ptr, lnw_ptr, lnb_ptr, w_ptr, out_ptr, guidance, eps, + K: tl.constexpr, KP: tl.constexpr, BN: tl.constexpr, BK: tl.constexpr, EV: tl.constexpr, + TWO: tl.constexpr): + """logits[V] (fp32) = CFG(bf16(LN_f(h) @ W^T)); TWO (CFG): neutral + g*(cond-neutral).""" + pid = tl.program_id(0) + m0, r0 = _stats(h_ptr, eps, K, KP) + if TWO: + m1, r1 = _stats(h_ptr + K, eps, K, KP) + rn = pid * BN + tl.arange(0, BN) + acc0 = tl.zeros([BN], tl.float32) + acc1 = tl.zeros([BN], tl.float32) + for k0 in range(0, K, BK): + rk = k0 + tl.arange(0, BK) + w = tl.load(w_ptr + rn[:, None] * K + rk[None, :], eviction_policy=EV).to(tl.float32) + g = tl.load(lnw_ptr + rk).to(tl.float32) + bb = tl.load(lnb_ptr + rk).to(tl.float32) + acc0 += tl.sum(w * _ln_chunk(h_ptr, rk, m0, r0, g, bb)[None, :], 1) + if TWO: + acc1 += tl.sum(w * _ln_chunk(h_ptr + K, rk, m1, r1, g, bb)[None, :], 1) + cond = acc0.to(tl.bfloat16).to(tl.float32) + if TWO: + neu = acc1.to(tl.bfloat16).to(tl.float32) + cond = neu + guidance * (cond - neu) + tl.store(out_ptr + rn, cond) + + +@triton.jit +def _sortable(x): + b = x.to(tl.int32, bitcast=True) + return b ^ ((b >> 31) & 0x7FFFFFFF) + + +@triton.jit +def _sample_kernel(logits_ptr, u_ptr, codes_ptr, col, temp, top_k, top_p, + h_ptr, lnw_ptr, lnb_ptr, stop_w_ptr, cand_ptr, tok_ptr, eps, text_temp, text_top_p, + V: tl.constexpr, K: tl.constexpr, KP: tl.constexpr, + USE_TOP_P: tl.constexpr, STOP: tl.constexpr, STOP_MODE: tl.constexpr, + STOP_TOP_P: tl.constexpr): + """Row i: sample one code from softmax(logits/T) restricted to top-k, then top-p + (token kept iff the probability mass ranked strictly before it is <= top_p, + i.e. performance_core.fast_sample). Inverse CDF with one uniform.""" + i = tl.program_id(0) + rv = tl.arange(0, V) + x = tl.load(logits_ptr + i * V + rv) / temp + # descending sort of (value, -index): ties -> smaller index first, like torch.topk + key = (_sortable(x).to(tl.int64) << 32) | (V - 1 - rv).to(tl.int64) + key = tl.sort(key, 0, descending=True) + idx = V - 1 - (key & 0xFFFFFFFF).to(tl.int32) + vb = (key >> 32).to(tl.int32) + vb = vb ^ ((vb >> 31) & 0x7FFFFFFF) + v = vb.to(tl.float32, bitcast=True) + keep = rv < top_k + m = tl.max(tl.where(keep, v, -float("inf")), 0) + e = tl.where(keep, tl.exp(v - m), 0.0) + if USE_TOP_P: + pr = e / tl.sum(e, 0) + before = tl.cumsum(pr, 0) - pr + keep = keep & ((before <= top_p) | (rv == 0)) + e = tl.where(keep, e, 0.0) + cw = tl.cumsum(e, 0) + u = tl.load(u_ptr + i * 13 + col) + target = u * tl.sum(e, 0) + nkeep = tl.sum(keep.to(tl.int32), 0) + sel = tl.minimum(tl.sum((keep & (cw <= target)).to(tl.int32), 0), nkeep - 1) + code = tl.sum(tl.where(rv == sel, idx, 0), 0) + tl.store(codes_ptr + i * 12 + col, code.to(tl.int64)) + if STOP: + # binary stop head on the frame's first hidden state (rows < n) + rk = tl.arange(0, KP) + km = rk < K + hx = tl.load(h_ptr + i * K + rk, mask=km, other=0.0).to(tl.float32) + mean = tl.sum(hx, 0) / K + d = tl.where(km, hx - mean, 0.0) + rstd = 1.0 / tl.sqrt(tl.sum(d * d, 0) / K + eps) + g = tl.load(lnw_ptr + rk, mask=km, other=0.0).to(tl.float32) + bb = tl.load(lnb_ptr + rk, mask=km, other=0.0).to(tl.float32) + hn = (d * rstd * g + bb).to(tl.bfloat16).to(tl.float32) + w0 = tl.load(stop_w_ptr + rk, mask=km, other=0.0).to(tl.float32) + w1 = tl.load(stop_w_ptr + K + rk, mask=km, other=0.0).to(tl.float32) + l0 = tl.sum(hn * w0, 0).to(tl.bfloat16).to(tl.float32) + l1 = tl.sum(hn * w1, 0).to(tl.bfloat16).to(tl.float32) + if STOP_MODE == 0: # argmax (do_sample False or top_k == 1); first index on ties + pick = (l1 > l0).to(tl.int32) + else: + a0 = l0 / text_temp + a1 = l1 / text_temp + mx = tl.maximum(a0, a1) + e0 = tl.exp(a0 - mx) + e1 = tl.exp(a1 - mx) + p1 = e1 / (e0 + e1) + if STOP_TOP_P: + # sorted desc: the second token is dropped iff P(first) > top_p + big = tl.maximum(p1, 1.0 - p1) + if big > text_top_p: + p1 = (l1 > l0).to(tl.float32) + us = tl.load(u_ptr + i * 13 + 12) + pick = (us < p1).to(tl.int32) + tok = tl.load(cand_ptr + pick) + tl.store(tok_ptr + i, tok) + + +# ----------------------------------------------------------------------------- module + +def _np2(x): + return 1 << (int(x) - 1).bit_length() + + +class FusedLocalFrame: + """Drop-in for FastGenerator.local_frame (same signature and outputs).""" + + def __init__(self, mdl, candidate_ids, fallback=None, use_table=True): + self.mdl = mdl + self.fallback = fallback + self.cand = candidate_ids + lt = mdl.local_transformer + self.ok = (len(lt.h) == 1 and mdl._use_binary_local_text_head() + and str(getattr(lt.h[0].attn, 'position_embedding_type', '')) == 'rope' + and not lt.h[0].attn.scale_attn_by_inverse_layer_idx + and lt.h[0].attn.scale_attn_weights + and type(lt.h[0].mlp.act).__name__ in ('SiLUActivation', 'SiLU') + and int(mdl.config.n_vq) == 12 + and all(int(s) == 1024 for s in mdl.config.audio_codebook_sizes)) + blk = lt.h[0] + a = blk.attn + self.H, self.D, self.E = a.num_heads, a.head_dim, a.embed_dim + self.inner = blk.mlp.fc_in.out_features + self.eps = float(blk.ln_1.eps) + c = lambda t: t.detach().contiguous() + self.ln1 = (c(blk.ln_1.weight), c(blk.ln_1.bias)) + self.ln2 = (c(blk.ln_2.weight), c(blk.ln_2.bias)) + self.lnf = (c(lt.ln_f.weight), c(lt.ln_f.bias)) + self.qkv = (c(a.c_attn.weight), c(a.c_attn.bias)) + self.proj = (c(a.c_proj.weight), c(a.c_proj.bias)) + self.fin = (c(blk.mlp.fc_in.weight), c(blk.mlp.fc_in.bias)) + self.fout = (c(blk.mlp.fc_out.weight), c(blk.mlp.fc_out.bias)) + self.heads = [c(h.weight) for h in mdl.audio_lm_heads] + self.embs = [c(e.weight) for e in mdl.audio_embeddings] + self.stop_w = c(mdl.local_text_lm_head.weight) + self.ok = self.ok and all(t.dtype == torch.bfloat16 for t in + (self.qkv[0], self.fin[0], self.heads[0], self.embs[0], self.stop_w)) + # RoPE table from the release's own module (cos/sin cast to bf16 like the reference) + dev = self.qkv[0].device + pos = torch.arange(13, device=dev).unsqueeze(0) + cos, sin = a.rotary_emb(pos, device=dev, dtype=torch.bfloat16) # [1,13,1,D] interleaved pairs + self.cos = cos[0, :, 0, 0::2].contiguous() + self.sin = sin[0, :, 0, 0::2].contiguous() + self.scale = 1.0 / math.sqrt(self.D) + # GEMV tiling per weight (BN, BK, num_warps, num_stages); tuned on Jetson Thor (20 SMs) + self.cfg = dict(qkv=(16, 512, 4, 2), proj=(4, 256, 2, 3), fin=(8, 512, 2, 2), + fout=(8, 256, 4, 3), head=(8, 512, 2, 2)) + # L2 policy: stream the big weights with evict_first so c_proj (13 MB) tends to + # stay in the 32 MB L2 across the 12 steps (~4 % faster on Thor) + self.evict = dict(qkv='evict_first', proj='evict_last', fin='evict_first', + fout='evict_first', head='evict_first') + self.record = None + self.table = None + if self.ok and use_table: + self.build_table() + + @torch.no_grad() + def build_table(self): + """qkv rows for every (codebook c < 11, code): LN1(emb_c[code]) @ Wqkv^T + b, bf16. + Steps t >= 1 feed emb_{t-1}[code] into the local transformer, so their c_attn GEMV + (39 MB of weights per step) becomes a 15 KB gather. Same bf16 ops as the + reference (F.layer_norm + F.linear on bf16). 11 x 1024 x 7680 bf16 = 173 MB. + Assumes frozen local weights (true after the engine merged its RL adapter).""" + E = self.E + tab = torch.empty(11, 1024, 3 * E, device=self.qkv[0].device, dtype=torch.bfloat16) + for c in range(11): + a = torch.nn.functional.layer_norm(self.embs[c], (E,), self.ln1[0], self.ln1[1], self.eps) + tab[c] = torch.nn.functional.linear(a, self.qkv[0], self.qkv[1]) + self.table = tab + + def supported(self, local_input, n, nb, p, cache): + M = n * nb + return (self.ok and n == 1 and nb in (1, 2) and local_input.dtype == torch.bfloat16 + and local_input.is_cuda and tuple(local_input.shape) == (M, self.E) + and local_input.is_contiguous() + and len(cache) == 1 and tuple(cache[0]['key'].shape) == (M, 13, self.H, self.D) + and cache[0]['key'].dtype == torch.bfloat16 + and float(p['audio_temperature']) > 0 + and p.get('audio_repetition_penalty', 1.0) == 1.0) + + def __call__(self, local_input, n, nb, guidance, p, cache): + if not self.supported(local_input, n, nb, p, cache): + if self.fallback is None: + raise ValueError('HVS_LOCAL_TRITON: unsupported local frame configuration') + return self.fallback(local_input, n, nb, guidance, p, cache) + M, E, K, I = nb, self.E, self.E, self.inner + two = nb == 2 + dev = local_input.device + x0 = local_input + h = torch.empty(M, E, device=dev, dtype=torch.bfloat16) # residual stream + qkv = torch.empty(M, 3 * E, device=dev, dtype=torch.bfloat16) + att = torch.empty(M, E, device=dev, dtype=torch.bfloat16) + f = torch.empty(M, I, device=dev, dtype=torch.bfloat16) + logits = torch.empty(1, 1024, device=dev, dtype=torch.float32) + codes = torch.empty(1, 12, device=dev, dtype=torch.long) + token = torch.empty(1, device=dev, dtype=torch.long) + u = torch.rand(1, 13, device=dev, dtype=torch.float32) # 12 codes + stop + kc, vc = cache[0]['key'], cache[0]['value'] + cache[0]['length'] = 13 + top_k = p['audio_top_k'] + top_k = 1024 if not top_k or int(top_k) >= 1024 else int(top_k) + top_p = p['audio_top_p'] + use_top_p = top_p is not None and 0.0 < float(top_p) < 1.0 + tt, tk, tp = float(p['text_temperature']), p['text_top_k'], p['text_top_p'] + stop_mode = 0 if (tt <= 0 or (tk is not None and int(tk) == 1)) else 1 + stop_top_p = tp is not None and 0.0 < float(tp) < 1.0 + c = self.cfg + KP = _np2(K) + for t in range(12): + gather = t > 0 and self.table is not None + if not gather: + emb = self.embs[t - 1] if t > 0 else x0 + BN, BK, nw, ns = c['qkv'] + _ln_gemv_kernel[(3 * E // BN,)](x0, emb, codes, t - 1, self.ln1[0], self.ln1[1], + self.qkv[0], self.qkv[1], qkv, h, 3 * E, self.eps, + K=K, KP=KP, TWO=two, BN=BN, BK=BK, GATHER=t > 0, WRITE_RES=True, ACT=0, EV=self.evict['qkv'], + num_warps=nw, num_stages=ns) + _attn_kernel[(M, self.H)](qkv, kc, vc, self.cos, self.sin, att, t, self.scale, + self.table[t - 1] if gather else qkv, self.embs[t - 1] if gather else x0, codes, h, + H=self.H, D=self.D, L=13, HALF_P=_np2(self.D // 2), DP=_np2(self.D), LP=16, + GATHER=gather, num_warps=1) + BN, BK, nw, ns = c['proj'] + _gemv_res_kernel[(E // BN,)](att, self.proj[0], self.proj[1], h, E, + K=E, TWO=two, BN=BN, BK=BK, EV=self.evict['proj'], num_warps=nw, num_stages=ns) + BN, BK, nw, ns = c['fin'] + _ln_gemv_kernel[(I // BN,)](h, h, codes, 0, self.ln2[0], self.ln2[1], + self.fin[0], self.fin[1], f, h, I, self.eps, + K=K, KP=KP, TWO=two, BN=BN, BK=BK, GATHER=False, WRITE_RES=False, ACT=1, EV=self.evict['fin'], + num_warps=nw, num_stages=ns) + BN, BK, nw, ns = c['fout'] + _gemv_res_kernel[(E // BN,)](f, self.fout[0], self.fout[1], h, E, + K=I, TWO=two, BN=BN, BK=BK, EV=self.evict['fout'], num_warps=nw, num_stages=ns) + BN, BK, nw, ns = c['head'] + _head_kernel[(1024 // BN,)](h, self.lnf[0], self.lnf[1], self.heads[t], logits, + float(guidance), self.eps, K=K, KP=KP, BN=BN, BK=BK, TWO=two, EV=self.evict['head'], + num_warps=nw, num_stages=ns) + if self.record is not None: # debugging/validation only (eager) + self.record.append((h.clone(), logits.clone())) + _sample_kernel[(1,)](logits, u, codes, t, float(p['audio_temperature']), + top_k, float(top_p) if use_top_p else 1.0, + h, self.lnf[0], self.lnf[1], self.stop_w, self.cand, token, self.eps, + tt if tt > 0 else 1.0, float(tp) if stop_top_p else 1.0, + V=1024, K=K, KP=KP, USE_TOP_P=use_top_p, STOP=(t == 0), STOP_MODE=stop_mode, + STOP_TOP_P=stop_top_p, num_warps=8) + return token, codes + + +def install(fast_generator): + """Route fast_generator.local_frame through the Triton path (falls back when unsupported).""" + fused = FusedLocalFrame(fast_generator.engine.model, fast_generator.candidate_ids, + fallback=fast_generator.local_frame, + use_table=os.environ.get('HVS_LOCAL_TRITON_TABLE', '1') == '1') + fast_generator.local_frame = fused + return fused diff --git a/optimized_pipeline/runtime/performance_core.py b/optimized_pipeline/runtime/performance_core.py new file mode 100644 index 0000000000000000000000000000000000000000..03d595eb26036ad81b0dc2b2d67fc57dad5e38c9 --- /dev/null +++ b/optimized_pipeline/runtime/performance_core.py @@ -0,0 +1,345 @@ +"""Measured Small inference paths: fused CFG and reusable local CUDA graphs. + +No weights, precision of the TTS model, codebooks, CFG equation, or sampling +distribution are changed. The legacy path remains available for comparison. +""" +from collections import OrderedDict +import time +import os +from types import MethodType + +import torch +import torch.nn.functional as F + + +def combine_branches(branches, pad_token, audio_pad): + length = max(ids.shape[1] for ids, _ in branches) + ids_list, mask_list = [], [] + for ids, mask in branches: + amount = length - ids.shape[1] + if amount: + padding = torch.full((ids.shape[0], amount, ids.shape[-1]), audio_pad, + dtype=ids.dtype, device=ids.device) + padding[:, :, 0] = pad_token + ids = torch.cat((padding, ids), dim=1) + mask = F.pad(mask, (amount, 0), value=False) + ids_list.append(ids) + mask_list.append(mask) + return torch.cat(ids_list), torch.cat(mask_list).bool() + + +def fast_sample(mdl, logits, temperature, top_k, top_p): + """Same distribution as the release's top-k mask + full-sort top-p, sampled among the k survivors.""" + if temperature == 0: + return logits.argmax(dim=-1) + if not top_k or int(top_k) >= logits.shape[-1]: + return mdl._sample_next_token(logits=logits, do_sample=True, temperature=temperature, + top_k=top_k, top_p=top_p, previous_token_ids=None, repetition_penalty=1.0) + values, indices = torch.topk(logits.float() / float(temperature), int(top_k), dim=-1) + if top_p is not None and 0.0 < float(top_p) < 1.0: + drop = torch.softmax(values, dim=-1).cumsum(dim=-1) > float(top_p) + drop = torch.cat((torch.zeros_like(drop[..., :1]), drop[..., :-1]), dim=-1) + values = values.masked_fill(drop, -torch.inf) + return indices.gather(-1, torch.multinomial(torch.softmax(values, dim=-1), 1)).squeeze(-1) + + +RAMP_START=int(os.environ.get('HVS_RAMP_START','5')) +# Optional explicit ramp, e.g. '3,5,8,12': these chunk sizes first, then chunk_frames. +RAMP_SCHEDULE=[int(x) for x in os.environ.get('HVS_RAMP_SCHEDULE','').split(',') if x.strip()] + + +class FastGenerator: + def __init__(self, engine, graph_limit=4): + self.engine = engine + self.graphs = OrderedDict() + self.graph_limit = graph_limit + self.capture_seconds = 0.0 + self.candidate_ids = engine.model._local_text_candidate_ids(torch.device(engine.device)) + self.semantic=None + if os.environ.get('HVS_SEMANTIC_CUDA_GRAPH','0')=='1': + from semantic_graph import SemanticGraphs + self.semantic=SemanticGraphs(engine.model) + self.fast_sample=os.environ.get('HVS_FAST_SAMPLE','0')=='1' + self.chunk_ramp=os.environ.get('HVS_CHUNK_RAMP','0')=='1' + if os.environ.get('HVS_LOCAL_COMPILE','0')=='1': + self.local_frame=torch.compile(self.local_frame,dynamic=False,fullgraph=True) + if os.environ.get('HVS_LOCAL_TRITON','0')=='1': + # Bandwidth-tuned Triton kernels for the 12 codebook steps; the + # compiled frame above stays as fallback (see local_fused.py). + import local_fused + local_fused.install(self) + + def clear_graphs(self): + self.graphs.clear() + if self.semantic:self.semantic.banks.clear() + + def local_frame(self, local_input, n, nb, guidance, p, cache): + mdl = self.engine.model + for layer in cache: + layer["length"] = 0 + hidden, past = mdl._decode_local_hidden_states_with_cache(local_input.unsqueeze(1), cache) + hidden = hidden[:, -1] + if not mdl._use_binary_local_text_head(): + raise ValueError("Small fast path requires its released binary stop head") + stop_logits = mdl.local_text_lm_head(hidden[:n]) + stop_index = mdl._sample_next_token(logits=stop_logits, + do_sample=p["text_temperature"] > 0, temperature=p["text_temperature"], + top_k=p["text_top_k"], top_p=p["text_top_p"]) + token = self.candidate_ids[stop_index] + codes = [] + for channel in range(mdl.config.n_vq): + logits = mdl.audio_lm_heads[channel](hidden).float() + if nb == 2: + conditional, neutral = logits[:n], logits[n:] + logits = neutral + guidance * (conditional - neutral) + if self.fast_sample: + code = fast_sample(mdl, logits, p["audio_temperature"], p["audio_top_k"], p["audio_top_p"]) + else: + code = mdl._sample_next_token(logits=logits, do_sample=True, + temperature=p["audio_temperature"], top_k=p["audio_top_k"], + top_p=p["audio_top_p"], previous_token_ids=None, + repetition_penalty=1.0) + codes.append(code) + if channel + 1 < mdl.config.n_vq: + shared_code = code.repeat(nb) + embed = mdl.audio_embeddings[channel](shared_code) + hidden, past = mdl._decode_local_hidden_states_with_cache(embed.unsqueeze(1), past) + hidden = hidden[:, -1] + return token, torch.stack(codes, dim=-1) + + def frame(self, local_input, n, nb, guidance, p, graph=False): + mdl = self.engine.model + if not graph: + cache = mdl._new_static_local_past_key_values(n * nb, 13, + local_input.device, local_input.dtype) + return self.local_frame(local_input, n, nb, guidance, p, cache) + key = (n, nb, float(guidance), p["audio_temperature"], p["text_temperature"], + p["audio_top_k"], p["audio_top_p"]) + if key not in self.graphs: + started = time.monotonic() + rng = torch.cuda.get_rng_state(local_input.device) + static = torch.empty_like(local_input) + static.copy_(local_input) + cache = mdl._new_static_local_past_key_values(n * nb, 13, + local_input.device, local_input.dtype) + # Warm on a side stream before capturing, as recommended by PyTorch. + stream = torch.cuda.Stream(device=local_input.device) + stream.wait_stream(torch.cuda.current_stream(local_input.device)) + with torch.cuda.stream(stream): + for _ in range(3): + self.local_frame(static, n, nb, guidance, p, cache) + torch.cuda.current_stream(local_input.device).wait_stream(stream) + cuda_graph = torch.cuda.CUDAGraph() + with torch.cuda.graph(cuda_graph): + output = self.local_frame(static, n, nb, guidance, p, cache) + self.graphs[key] = (cuda_graph, static, output, cache) + torch.cuda.set_rng_state(rng, local_input.device) + self.capture_seconds += time.monotonic() - started + while len(self.graphs) > self.graph_limit: + self.graphs.popitem(last=False) + self.graphs.move_to_end(key) + cuda_graph, static, output, _ = self.graphs[key] + static.copy_(local_input) + cuda_graph.replay() + return output + + @torch.inference_mode() + def stream_frames(self, branches, p, chunk_frames, guidance=1.5, + min_frames=0, graph=False): + mdl, cfg = self.engine.model, self.engine.model.config + if p["audio_repetition_penalty"] != 1.0: + raise ValueError("Fast path supports the demo's unchanged repetition penalty 1.0 only") + ids, initial_mask = combine_branches(branches, cfg.pad_token_id, cfg.audio_pad_token_id) + nb, n = len(branches), branches[0][0].shape[0] + budget, length = int(p["max_new_tokens"]), ids.shape[1] + mask_buffer = torch.zeros(n * nb, length + budget, dtype=torch.bool, device=ids.device) + mask_buffer[:, :length] = initial_mask + frames, past = [], None + finished = torch.zeros(n, dtype=torch.bool, device=ids.device) + last = 0 + yield_sizes = [] + model_input = ids + semantic=self.semantic.prepare(ids,budget) if self.semantic else None + for step in range(budget): + mask = mask_buffer[:, :length + step] + if semantic: + local_input=semantic.prefill(model_input,mask) if step==0 else semantic.decode(model_input,mask) + else: + embeddings = mdl._build_inputs_embeds(model_input) + out = mdl.transformer(inputs_embeds=embeddings, input_ids=None, + attention_mask=mask, past_key_values=past, use_cache=True, + position_ids=None, output_attentions=False, output_hidden_states=False, + return_dict=True, cu_seqlens=None, num_sequences=None) + past = out.past_key_values + local_input = mdl._global_hidden_to_local(out.last_hidden_state[:, -1]).to(mdl.local_transformer.ln_f.weight.dtype) + token, sampled = self.frame(local_input, n, nb, guidance, p, graph) + continues = token.eq(cfg.audio_assistant_slot_token_id) & ~finished + finished = finished | token.eq(cfg.audio_end_token_id) + if step < min_frames: + continues = torch.ones_like(continues) + finished = torch.zeros_like(finished) + if not bool(continues.any().item()): + break + frame = sampled.masked_fill(~continues.unsqueeze(-1), cfg.audio_pad_token_id) + frames.append(frame) + row = mdl._build_generation_row(n, ids.device, frame) + row[:, 0, 0] = torch.where(continues, row[:, 0, 0], cfg.pad_token_id) + model_input = row.repeat(nb, 1, 1) + mask_buffer[:, length + step] = continues.repeat(nb) + # Optional short initial block, then the normal codec batch size. + # This changes only yield boundaries, not token sampling or caches. + block=p.get('first_chunk_frames',chunk_frames) if last==0 else chunk_frames + if self.chunk_ramp: + # Small first chunk, then double up to chunk_frames: each block + # finishes before the previous one has played (RTF < 0.5). + if RAMP_SCHEDULE and not p.get('first_chunk_frames'): + block=min(chunk_frames,RAMP_SCHEDULE[len(yield_sizes)]) if len(yield_sizes)= block: + yield_sizes.append(len(frames) - last) + last = len(frames) + yield frames + if len(frames) != last: + yield frames + + +CODEC_GRAPH = os.environ.get('HVS_CODEC_GRAPH', '0') == '1' +CODEC_GRAPH_MAX = 20 +_CODEC_GRAPHS = {} + + +def _stable_cache_update(module, state, keys, values, positions, *current): + # Idea from kadirnar/fast-moss-tokenizer: run the upstream update, then keep + # the cache at its previous addresses so captured CUDA graphs stay valid. + type(module)._update_streaming_cache(module, state, keys, values, positions, *current) + keys.copy_(state.cached_keys) + values.copy_(state.cached_values) + positions.copy_(state.cached_positions) + state.cached_keys, state.cached_values, state.cached_positions = keys, values, positions + + +class CodecGraphs: + """Persistent batch-1 decoder streaming state with one CUDA graph per chunk size. + + The decoder's bounded KV caches are allocated at full context length once; + each request only resets them, so replayed graphs read fixed addresses. + The encoder is never put into streaming mode (reference encoding unaffected). + """ + def __init__(self, codec, audio_pad): + self.codec = codec + self.audio_pad = audio_pad + self.device = next(codec.parameters()).device + self.modules = [m for m in codec.decoder.modules() if hasattr(m, '_init_streaming_state')] + self.states = [m._init_streaming_state(1) for m in self.modules] + if os.environ.get('HVS_CODEC_FUSED', '0') == '1': + # Fused Triton decode kernels (bit-identical), see codec_fused.py. + import codec_fused + codec_fused.install(codec, self.states) + self.graphs = {} + self.capture_seconds = 0.0 + + def attach(self): + if any(m._streaming_state is not None for m in self.modules): + raise RuntimeError('Codec decoder is already streaming') + for module, state in zip(self.modules, self.states): + module._streaming_state = state + if hasattr(type(module), '_update_streaming_cache'): + module._update_streaming_cache = MethodType(_stable_cache_update, module) + if not self.graphs: + self.capture() + self.reset() + + def detach(self): + for module in self.modules: + module._streaming_state = None + module.__dict__.pop('_update_streaming_cache', None) + + def reset(self): + for state in self.states: + state.reset(torch.ones_like(state.exec_mask)) + + def eager(self, codes): + valid = codes[:, :, 0].ne(self.audio_pad) + lengths = valid.sum(-1) + codes = codes.masked_fill(~valid.unsqueeze(-1), 0) + self.codec._set_streaming_exec_mask(lengths > 0) + with torch.autocast('cuda', dtype=torch.bfloat16, enabled=codes.is_cuda): + result = self.codec._decode_frame(codes.permute(2, 0, 1).contiguous(), lengths) + return result.audio.float().mean(1), result.audio_lengths + + @torch.inference_mode() + def capture(self): + started = time.monotonic() + pool = torch.cuda.graph_pool_handle() + stream = torch.cuda.Stream(device=self.device) + stream.wait_stream(torch.cuda.current_stream(self.device)) + for frames in range(1, CODEC_GRAPH_MAX + 1): + static = torch.zeros(1, frames, 12, dtype=torch.long, device=self.device) + with torch.cuda.stream(stream): + for _ in range(2): + self.eager(static) + graph = torch.cuda.CUDAGraph() + with torch.cuda.graph(graph, pool=pool, stream=stream): + output = self.eager(static) + self.graphs[frames] = (graph, static, output) + torch.cuda.current_stream(self.device).wait_stream(stream) + torch.cuda.synchronize(self.device) + self.capture_seconds = time.monotonic() - started + + def decode(self, codes): + entry = self.graphs.get(codes.shape[1]) + if entry is None or codes.shape[0] != 1: + return self.eager(codes) + graph, static, (audio, lengths) = entry + static.copy_(codes) + graph.replay() + # The next replay overwrites the graph's outputs; callers keep chunks. + return audio.clone(), lengths.clone() + + +class StreamingCodec: + """True incremental PCM decoding: one codec KV cache per batch row. + + Never re-decode a growing prefix. Uses the pinned codec's stateful frame + primitive under its streaming context, the same primitive as batch_decode. + With HVS_CODEC_GRAPH=1, batch-1 streams replay per-chunk-size CUDA graphs + over a persistent decoder state (bit-identical output, fewer kernel launches). + """ + def __init__(self, codec, batch_size, audio_pad=-1): + self.codec = codec + self.audio_pad = audio_pad + self.graphs = None + if CODEC_GRAPH and batch_size == 1 and next(codec.parameters()).is_cuda: + key = id(codec) + if key not in _CODEC_GRAPHS or _CODEC_GRAPHS[key].codec is not codec: + _CODEC_GRAPHS[key] = CodecGraphs(codec, audio_pad) + self.graphs = _CODEC_GRAPHS[key] + self.context = None + else: + self.context = codec.streaming(batch_size=batch_size) + + def __enter__(self): + if self.graphs is not None: + self.graphs.attach() + else: + self.context.__enter__() + return self + + def __exit__(self, *args): + if self.graphs is not None: + self.graphs.detach() + return False + return self.context.__exit__(*args) + + def decode(self, codes): + if self.graphs is not None: + return self.graphs.decode(codes) + # Input B,T,12; codec expects 12,B,T. + valid = codes[:, :, 0].ne(self.audio_pad) + lengths = valid.sum(-1) + codes = codes.masked_fill(~valid.unsqueeze(-1), 0) + self.codec._set_streaming_exec_mask(lengths > 0) + with torch.autocast('cuda',dtype=torch.bfloat16,enabled=codes.is_cuda): + result = self.codec._decode_frame(codes.permute(2, 0, 1).contiguous(), lengths) + return result.audio.float().mean(1), result.audio_lengths diff --git a/optimized_pipeline/runtime/phased_generate.py b/optimized_pipeline/runtime/phased_generate.py new file mode 100644 index 0000000000000000000000000000000000000000..cb8e04482a9060773e07d6ab79207c6fb87f5c21 --- /dev/null +++ b/optimized_pipeline/runtime/phased_generate.py @@ -0,0 +1,59 @@ +"""Minimal Podcast policy loader extracted from the tested workspace runtime.""" +import gc,json,time +import torch +import settings +from languages import language_name +from transformers import AutoConfig +from transformers.dynamic_module_utils import get_class_from_dynamic_module +from transformers.initialization import no_init_weights +from safetensors.torch import load_file +from performance_core import FastGenerator +from semantic_layerwise import LayerwiseSemanticBank +def zero_temperature_sampler(sampler): + """The upstream sampler requires positive T; T=0 means genuine argmax.""" + def sample(*args, **kwargs): + if float(kwargs.get("temperature", 1)) == 0: + kwargs["do_sample"] = False + return sampler(*args, **kwargs) + return sample + +class TokenEngine: + def pack(self,prompt,spec,reference,n): + # Keep the generation cap separate from the model's duration condition. + # Free-timing pilot explicitly uses Tokens=None and no inline durations. + message=self.proc.build_user_message(text=spec['text'],instruction=prompt, + tokens=None if spec.get('free_timing',True) else spec['frames'], + reference=[reference],language=language_name(spec['lang'])) + ids=self.proc([[message]],mode='generation')['input_ids'][0].long().unsqueeze(0).to(self.device).repeat(n,1,1) + return ids,torch.ones(ids.shape[:2],dtype=torch.bool,device=self.device) + def __init__(self,root,proc,refs): + self.device=settings.ACTING_DEVICE;self.proc=proc;self.refs=refs + cfg=AutoConfig.from_pretrained(str(root),trust_remote_code=True,local_files_only=True);cfg._attn_implementation='sdpa' + Model=get_class_from_dynamic_module('modeling_moss_tts.MossTTSLocalModel',str(root)) + index=json.loads((root/'model.safetensors.index.json').read_text())['weight_map'];state={} + for name in sorted(set(index.values())):state.update(load_file(str(root/name))) + with no_init_weights():self.model=Model(cfg) + missing,unexpected=self.model.load_state_dict(state,strict=False,assign=True) + allowed={'text_lm_head.weight'}|{f'audio_lm_heads.{i}.weight' for i in range(12)} + assert not unexpected and not(set(missing)-allowed) + self.model.tie_weights();self.model=self.model.to(self.device,dtype=torch.bfloat16).requires_grad_(False).eval() + self.model._sample_next_token=zero_temperature_sampler(self.model._sample_next_token) + self.fast=FastGenerator(self,graph_limit=1);self.fast.semantic.bank_class=LayerwiseSemanticBank + @torch.inference_mode() + def codes(self,spec,speaker,seed,temp): + with torch.cuda.device(self.device),torch.autocast('cuda',dtype=torch.bfloat16): + ref=self.refs[speaker] + branches=[self.pack(spec['prompt'],spec,ref,1),self.pack(spec['unconditional'],spec,ref,1)] + torch.manual_seed(seed);torch.cuda.manual_seed_all(seed) + budget=min(375,spec['frames']+60) + p={'max_new_tokens':budget,'audio_temperature':temp,'audio_top_p':.95,'audio_top_k':50, + 'audio_repetition_penalty':1.,'text_temperature':1.,'text_top_p':1.,'text_top_k':50} + start,end=torch.cuda.Event(enable_timing=True),torch.cuda.Event(enable_timing=True) + torch.cuda.synchronize();wall=time.perf_counter();before=self.fast.capture_seconds;start.record() + frames=[] + for frames in self.fast.stream_frames(branches,p,chunk_frames=budget+1,guidance=2.5,graph=True):pass + end.record();end.synchronize();codes=torch.stack(frames,dim=1).squeeze(0).cpu().contiguous() + return codes,{'token_wall_seconds':time.perf_counter()-wall,'token_device_seconds':start.elapsed_time(end)/1000, + 'graph_capture_seconds':self.fast.capture_seconds-before,'frames':len(codes),'frame_cap':budget,'capped':len(codes)>=budget} + def close(self): + self.fast.clear_graphs();self.fast=None;self.model=None;gc.collect();torch.cuda.empty_cache() diff --git a/optimized_pipeline/runtime/published_audio.py b/optimized_pipeline/runtime/published_audio.py new file mode 100644 index 0000000000000000000000000000000000000000..41c546684fb25d0dab3a2cd2c0a7204d9f4dc47f --- /dev/null +++ b/optimized_pipeline/runtime/published_audio.py @@ -0,0 +1,82 @@ +"""Waveform assembly. Internal near-silence compaction is UNVALIDATED.""" +import math +from pathlib import Path +import numpy as np +import soundfile as sf +from scipy.signal import resample_poly +SR=48000 +def read(path,sr=SR): + wave,rate=sf.read(path,dtype='float32',always_2d=True);wave=wave.mean(1) + if not np.isfinite(wave).all() or len(wave)==0:raise ValueError('Empty/nonfinite audio') + if rate!=sr: + g=math.gcd(rate,sr);wave=resample_poly(wave,sr//g,rate//g).astype(np.float32) + return wave +def write(path,wave): + path=Path(path);path.parent.mkdir(parents=True,exist_ok=True);sf.write(path,wave,SR,subtype='PCM_24') +def crossfade(left,right,n): + n=min(int(n),len(left),len(right)) + if n<=0:return np.concatenate([left,right]) + t=np.linspace(0,np.pi/2,n) + # Constant gain, not equal power: identical quiet backgrounds do not get +3 dB. + blend=left[-n:]*np.cos(t)**2+right[:n]*np.sin(t)**2 + return np.concatenate([left[:-n],blend.astype(np.float32),right[n:]]) +def crop(wave,start,end,lead_ms=80,tail_ms=150): + first=round(start*SR);last=round(end*SR) + if not 0<=firsta:speech.append(float(np.sqrt(np.mean(wave[a:b]**2)+1e-20))) + if not speech:raise ValueError('No speech for relative energy calibration') + db=20*np.log10(max(np.median(speech),1e-10));threshold_db=min(absolute_dbfs,db-relative_db);threshold=10**(threshold_db/20) + edits=[];fade=round(crossfade_ms*SR/1000) + for left,right in zip(words,words[1:]): + last=round(left['end_s']*SR);first=round(right['start_s']*SR) + if first-lastfirst-round(.03*SR):continue + quiet=wave[a-fade:b+fade] + step=480;rms=[np.sqrt(np.mean(quiet[i:i+step]**2)+1e-20) for i in range(0,len(quiet),step)] + if not rms or max(rms)>threshold:continue + edits.append({'a':a,'b':b,'fade':fade,'removed':b-a+fade,'source_word_gap_s':(first-last)/SR,'retained_word_gap_s':keep_s}) + out=wave.copy() + for e in reversed(edits):out=crossfade(out[:e['a']],out[e['b']:],e['fade']) + def shift(t): + sample=round(t*SR);return (sample-sum(e['removed'] for e in edits if sample>=e['b']+e['fade']))/SR + updated=[dict(w,start_s=shift(w['start_s']),end_s=shift(w['end_s'])) for w in words] + for old,new in zip(words,updated): + a,b=round(old['start_s']*SR),round(old['end_s']*SR);x,y=round(new['start_s']*SR),round(new['end_s']*SR) + if not np.array_equal(wave[a:b],out[x:y]):raise RuntimeError('Pause compaction changed recognized speech') + return out,updated,{'enabled':True,'unvalidated':True,'threshold_dbfs':float(threshold_db),'min_pause_s':min_pause_s,'keep_s':keep_s,'cuts':edits} +def assemble(units,gap_ms=400): + chunks=[];maps=[];cursor=0;last=None + for unit_id,wave,edges in units: + first=round(edges['first_word_s']*SR);end=round(edges['last_word_s']*SR) + if last is not None: + silence=round(gap_ms*SR/1000)-(cursor-last)-first + if silence<0:raise ValueError('Requested gap is shorter than retained tail+lead. Reduce guards or increase gap.') + chunks.append(np.zeros(silence,np.float32));cursor+=silence + maps.append({'unit':unit_id,'start_s':cursor/SR,'first_word_s':(cursor+first)/SR,'last_word_s':(cursor+end)/SR}) + if last is not None and cursor+first-last!=round(gap_ms*SR/1000):raise RuntimeError('Incorrect word-clock gap') + chunks.append(wave);last=cursor+end;cursor+=len(wave) + if not chunks:raise ValueError('Cannot assemble an empty episode') + return np.concatenate(chunks),maps diff --git a/optimized_pipeline/runtime/semantic_graph.py b/optimized_pipeline/runtime/semantic_graph.py new file mode 100644 index 0000000000000000000000000000000000000000..75b7a56c515560706075c8a848e942ca7c606b28 --- /dev/null +++ b/optimized_pipeline/runtime/semantic_graph.py @@ -0,0 +1,101 @@ +"""Opt-in static semantic KV cache + CUDA-graph decode (single-frame queries). + +Prefill remains eager. Each graph reads a GPU cache-position counter, a static +input row and a full-capacity boolean key mask. No model weights are modified. +The default dynamic/compiled path stays available for correctness comparison. +""" +from collections import OrderedDict +import os +import torch + +BUCKET=int(os.environ.get('HVS_SEMANTIC_BUCKET','128')) + +def raw_forward(transformer): + fn=transformer.forward + if getattr(fn,'__closure__',None): + return dict(zip(fn.__code__.co_freevars,[v.cell_contents for v in fn.__closure__])).get('forward',fn) + return fn + +class SemanticBank: + def __init__(self,model,nb,capacity,compile_decode=True): + self.model=model;self.forward=raw_forward(model.transformer) + if type(model.transformer).__name__!='MossQwen3Model': + raise ValueError('Semantic graph currently supports the released MossQwen3Model only') + self.cache=[] + self.nb=nb;self.capacity=capacity;self.graph=None;self.output=None + self.device=next(model.parameters()).device + self.ids=torch.zeros((nb,1,model.config.n_vq+1),dtype=torch.long,device=self.device) + self.allowed=torch.zeros((nb,capacity),dtype=torch.bool,device=self.device) + self.position=torch.zeros(1,dtype=torch.long,device=self.device) + self.query_valid=torch.zeros((nb,1,1),dtype=torch.bool,device=self.device) + # Optional: fuse the many small decode kernels (norms, RoPE, residuals) + # with Inductor before the CUDA graph is captured; weights are unchanged. + if compile_decode and os.environ.get('HVS_SEMANTIC_COMPILE','0')=='1':self._decode=torch.compile(self._decode,dynamic=False,mode='max-autotune-no-cudagraphs') + def prefill(self,ids,mask): + self.allowed.zero_();self.allowed[:,:mask.shape[1]].copy_(mask) + length=ids.shape[1] + out=self.forward(inputs_embeds=self.model._build_inputs_embeds(ids),input_ids=None, + attention_mask=mask,past_key_values=None,use_cache=True,return_dict=True) + self.position.fill_(length) + if not self.cache: + for key,value in out.past_key_values: + shape=(self.nb,self.capacity,*key.shape[2:]) + self.cache.append((key.new_zeros(shape),value.new_zeros(shape))) + for (key,value),(stored_key,stored_value) in zip(out.past_key_values,self.cache): + stored_key[:,:length].copy_(key);stored_value[:,:length].copy_(value) + return self.model._global_hidden_to_local(out.last_hidden_state[:,-1]).to(self.model.local_transformer.ln_f.weight.dtype) + def _decode(self): + # The release has a custom tuple KV cache, not Transformers StaticCache. + # Reuse its trained modules/attention kernels with fixed-address storage. + transformer=self.model.transformer + hidden=self.model._build_inputs_embeds(self.ids)*self.query_valid + positions=(self.allowed.long().sum(-1)-1).clamp_min(0).view(self.nb,1) + cos,sin=transformer.rotary_emb(hidden,positions) + cos=cos.unsqueeze(-2);sin=sin.unsqueeze(-2) + def rotate(x): + a,b=x.chunk(2,dim=-1);return torch.cat((-b,a),dim=-1) + for layer,(stored_key,stored_value) in zip(transformer.layers,self.cache): + attn=layer.self_attn;residual=hidden;x=layer.input_layernorm(hidden) + query=attn.q_norm(attn.q_proj(x).view(self.nb,1,attn.num_heads,attn.head_dim)) + key=attn.k_norm(attn.k_proj(x).view(self.nb,1,attn.num_key_value_heads,attn.head_dim)) + value=attn.v_proj(x).view(self.nb,1,attn.num_key_value_heads,attn.head_dim) + query=query*cos+rotate(query)*sin;key=key*cos+rotate(key)*sin + stored_key.index_copy_(1,self.position,key);stored_value.index_copy_(1,self.position,value) + # Single query attends every valid key; padded future slots are + # excluded by allowed. The release's kernel repeats KV identically. + attend=attn._sdpa_attention if attn.attn_implementation=='sdpa' else attn._eager_attention + out=attend(query,stored_key,stored_value,self.allowed) + hidden=residual+attn.o_proj(out.reshape(self.nb,1,-1).contiguous()) + hidden=(hidden+layer.mlp(layer.post_attention_layernorm(hidden)))*self.query_valid + hidden=transformer.norm(hidden)*self.query_valid + self.position.add_(1) + return self.model._global_hidden_to_local(hidden[:,-1]).to(self.model.local_transformer.ln_f.weight.dtype) + def decode(self,ids,mask): + self.ids.copy_(ids);self.allowed[:,:mask.shape[1]].copy_(mask) + self.query_valid.copy_(mask[:,-1:].unsqueeze(-1)) + if self.graph is None: + position=self.position.clone() + stream=torch.cuda.Stream(device=self.device) + stream.wait_stream(torch.cuda.current_stream(self.device)) + with torch.cuda.stream(stream): + self._decode();self._decode() + torch.cuda.current_stream(self.device).wait_stream(stream) + self.position.copy_(position) + self.graph=torch.cuda.CUDAGraph() + with torch.cuda.graph(self.graph):self.output=self._decode() + self.position.copy_(position) + self.graph.replay() + return self.output + +class SemanticGraphs: + def __init__(self,model,limit=None): + self.model=model;self.limit=limit or int(os.environ.get('HVS_SEMANTIC_BANKS','2'));self.banks=OrderedDict() + def prepare(self,ids,budget): + capacity=((ids.shape[1]+budget+BUCKET-1)//BUCKET)*BUCKET;key=(ids.shape[0],capacity) + if key not in self.banks: + # A new bank means a new graph capture (and, with HVS_SEMANTIC_COMPILE, maybe a + # compilation); log it so missing warm-up shapes are visible. + print(f'[semantic] new bank rows={ids.shape[0]} capacity={capacity} (prompt {ids.shape[1]} + budget {budget})',flush=True) + self.banks[key]=getattr(self,'bank_class',SemanticBank)(self.model,ids.shape[0],capacity) + while len(self.banks)>self.limit:self.banks.popitem(last=False) + self.banks.move_to_end(key);return self.banks[key] diff --git a/optimized_pipeline/runtime/semantic_layerwise.py b/optimized_pipeline/runtime/semantic_layerwise.py new file mode 100644 index 0000000000000000000000000000000000000000..f3b1b0aac32faba4ba9a4277eaa8de7f58f72868 --- /dev/null +++ b/optimized_pipeline/runtime/semantic_layerwise.py @@ -0,0 +1,65 @@ +"""Optional bounded compile unit for the Large 1.7 semantic continuation. + +Compile one tensor-only transformer block, reuse it across all 36 layers, then +capture the complete decode in a CUDA graph. This avoids compiling a gigantic +36-layer Python graph for every candidate batch shape. No weight quantization. +""" +import torch +import torch.nn.functional as F +from semantic_graph import SemanticBank + + +def rms(x,w,eps): + f=x.float();f=f*torch.rsqrt(f.square().mean(-1,keepdim=True)+eps) + return w*f.to(x.dtype) + + +def layer_step(hidden,key_cache,value_cache,position,allowed,valid,cos,sin, + iw,qw,kw,vw,qn,kn,ow,pw,gw,uw,dw,eps,heads,kv_heads,dim): + batch=hidden.shape[0];residual=hidden;x=rms(hidden,iw,eps) + query=rms(F.linear(x,qw).view(batch,1,heads,dim),qn,eps) + key=rms(F.linear(x,kw).view(batch,1,kv_heads,dim),kn,eps) + value=F.linear(x,vw).view(batch,1,kv_heads,dim) + def rotate(a): + first,second=a.chunk(2,dim=-1);return torch.cat((-second,first),dim=-1) + query=query*cos+rotate(query)*sin;key=key*cos+rotate(key)*sin + key_cache.index_copy_(1,position,key);value_cache.index_copy_(1,position,value) + def repeat(a): + b,t,h,d=a.shape + return a[:,:,:,None,:].expand(b,t,h,heads//kv_heads,d).reshape(b,t,heads,d).transpose(1,2) + out=F.scaled_dot_product_attention(query.transpose(1,2),repeat(key_cache),repeat(value_cache), + attn_mask=allowed[:,None,None,:],dropout_p=0.,is_causal=False,scale=dim**-.5) + hidden=residual+F.linear(out.transpose(1,2).contiguous().reshape(batch,1,-1),ow) + x=rms(hidden,pw,eps) + return (hidden+F.linear(F.silu(F.linear(x,gw))*F.linear(x,uw),dw))*valid + + +compiled_layer=torch.compile(layer_step,dynamic=False,fullgraph=True,mode='max-autotune-no-cudagraphs') + + +class LayerwiseSemanticBank(SemanticBank): + def __init__(self,model,nb,capacity): + super().__init__(model,nb,capacity,compile_decode=False) + self.weights=[] + for layer in model.transformer.layers: + a=layer.self_attn;m=layer.mlp + norms=[layer.input_layernorm,a.q_norm,a.k_norm,layer.post_attention_layernorm] + eps=norms[0].variance_epsilon + if a.attn_implementation!='sdpa' or any(n.variance_epsilon!=eps for n in norms): + raise ValueError('Layerwise continuation requires SDPA and matching RMSNorm epsilons') + linear=[a.q_proj,a.k_proj,a.v_proj,a.o_proj,m.gate_proj,m.up_proj,m.down_proj] + if any(x.bias is not None for x in linear) or type(m.act_fn).__name__ not in ('SiLU','SiLUActivation'): + raise ValueError('Unsupported biased or non-SiLU semantic block') + self.weights.append((layer.input_layernorm.weight,a.q_proj.weight,a.k_proj.weight,a.v_proj.weight, + a.q_norm.weight,a.k_norm.weight,a.o_proj.weight,layer.post_attention_layernorm.weight, + m.gate_proj.weight,m.up_proj.weight,m.down_proj.weight,eps,a.num_heads,a.num_key_value_heads,a.head_dim)) + + def _decode(self): + transformer=self.model.transformer + hidden=self.model._build_inputs_embeds(self.ids)*self.query_valid + positions=(self.allowed.long().sum(-1)-1).clamp_min(0).view(self.nb,1) + cos,sin=transformer.rotary_emb(hidden,positions);cos=cos.unsqueeze(-2);sin=sin.unsqueeze(-2) + for (key,value),weights in zip(self.cache,self.weights): + hidden=compiled_layer(hidden,key,value,self.position,self.allowed,self.query_valid,cos,sin,*weights) + hidden=transformer.norm(hidden)*self.query_valid;self.position.add_(1) + return self.model._global_hidden_to_local(hidden[:,-1]).to(self.model.local_transformer.ln_f.weight.dtype) diff --git a/optimized_pipeline/runtime/settings.py b/optimized_pipeline/runtime/settings.py new file mode 100644 index 0000000000000000000000000000000000000000..06aaae4f5e78460f365889ab0ab105dd15d3faa9 --- /dev/null +++ b/optimized_pipeline/runtime/settings.py @@ -0,0 +1,6 @@ +import os +from pathlib import Path +HERE=Path(os.environ.get("PODCAST_CACHE",Path.home()/".cache/humaneness-podcast")) +HF_CACHE=os.environ.get("HF_HOME",str(Path.home()/".cache/huggingface")) +ACTING_DEVICE=os.environ.get("ACTING_DEVICE","cuda:0") +SCORE_DEVICE=ACTING_DEVICE diff --git a/optimized_pipeline/scoring.py b/optimized_pipeline/scoring.py new file mode 100644 index 0000000000000000000000000000000000000000..948a58c417a30953386bb7c8d4f4c6f83e27e296 --- /dev/null +++ b/optimized_pipeline/scoring.py @@ -0,0 +1,103 @@ +"""Batched frozen Ears + Parakeet, on the SAME selected CUDA device as TTS. + +HTTP Parakeet is an explicit memory-saving alternative for this shared host; +the normal local backend supports actual batched ASR without a second service. +""" +import os +import re +import time +import numpy as np +import torch +from scipy.signal import resample_poly +from recipe import errors, reward + +KEYS = ['genuineness_0_6', 'audiobox:CE', 'audiobox:PQ', 'dnsmos:P808_MOS'] + +def audio16(wave): + return resample_poly(np.asarray(wave, dtype=np.float32), 1, 3).astype(']+>', '', s).strip() for s in results], time.perf_counter()-tick + + @torch.inference_mode() + def quality(self, waves16): + tick = time.perf_counter() + model, extractor, norm = self.ears.models['medium'] + indices = [norm['score_names'].index(k) for k in KEYS] + f = extractor(waves16, sampling_rate=16000, padding='longest', truncation=True, + max_length=480000, return_attention_mask=True, return_tensors='np') + mel = f['input_features'].astype(np.float32) + mask = f['attention_mask'].astype(np.int64) + if mel.shape[-1] % 2: + mel = np.pad(mel, ((0,0), (0,0), (0,1))) + mask = np.pad(mask, ((0,0), (0,1))) + with torch.cuda.device(self.device), torch.autocast('cuda', dtype=torch.bfloat16): + out = model(torch.from_numpy(mel).to(self.device), + torch.from_numpy(mask).to(self.device), predict_events=False) + raw = out['scores'][:,indices].float().cpu().numpy()*np.asarray(norm['score_std'])[indices] + np.asarray(norm['score_mean'])[indices] + assert np.isfinite(raw).all() + return [dict(zip(KEYS, map(float, row))) for row in raw], time.perf_counter()-tick + + def score(self, waves, text, finals=None): + tick = time.perf_counter() + # Prefixes are at most the per-turn cap (<30s); do not silently truncate ASR. + waves16 = [audio16(w) for w in waves] + waves16 = [np.pad(w, (0, max(0,4800-len(w)))) for w in waves16] + quality, quality_s = self.quality(waves16) + hypotheses, asr_s = self.transcribe(waves16) + finals = finals if finals is not None else [True]*len(waves) + scores = [] + for q, hyp, final in zip(quality, hypotheses, finals): + e = errors(text, hyp, final) + scores.append({'ears': q, 'asr': hyp, 'final': bool(final), **e, + 'reward': reward(q[KEYS[0]], e['wer']) if e['hypothesis_words'] else 0.}) + return scores, {'ears_seconds': quality_s, 'asr_seconds': asr_s, + 'asr_microbatch': 1 if self.url else min(self.asr_microbatch,len(waves)), + 'scoring_seconds': time.perf_counter()-tick} diff --git a/optimized_pipeline/script-de.json b/optimized_pipeline/script-de.json new file mode 100644 index 0000000000000000000000000000000000000000..9b79e14fc1c3b38928855876583e493d53be2a91 --- /dev/null +++ b/optimized_pipeline/script-de.json @@ -0,0 +1,130 @@ +{ + "language": "de", + "title": "Kleine Fragen, große Gefühle — Sinn, Zuwendung und Viktor Frankl", + "hosts": [ + "Mira", + "Idris" + ], + "turns": [ + { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Willkommen bei Kleine Fragen, große Gefühle. Heute geht es um den Sinn des Lebens. Idris, ich hätte gern eine klare Antwort. Eine, die ich mir beim Schlüsselsuchen noch merken kann." + }, + { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas bröselig, aber sie machen die Ungewissheit gemütlicher. Müssen wir wirklich das ganze Universum erklären, bevor der Tee kalt wird?" + }, + { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "Dann fangen wir kleiner an. Warum fühlt sich ein gewöhnlicher Nachmittag manchmal kostbar an, während ein Tag voller Erfolge seltsam leer bleibt? Was unterscheidet Beschäftigung von einem erfüllten Leben?" + }, + { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Der österreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergnügen oder Erfolg: Was ist uns so wichtig, dass wir darauf antworten wollen?" + }, + { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "Also suchen wir keinen einzigen großen Satz, der für alle Menschen stimmt? Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen?" + }, + { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Zum Glück nicht. Für Frankl lässt sich Sinn in konkreten Situationen entdecken. Was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder verändern." + }, + { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand trägt seiner Nachbarin die Einkäufe hoch. Nichts Spektakuläres passiert. Aber sie schließt ihre Tür und fühlt sich weniger allein." + }, + { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "Das passt zu einem seiner Zugänge: etwas tun, etwas beitragen. Ein anderer liegt im Erleben, in Schönheit und Liebe. Wir müssen nicht ständig etwas herstellen, damit unser Leben Bedeutung hat." + }, + { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Ein Lied hören, ohne nebenbei aufs Handy zu schauen. Eine Blume zwischen Pflastersteinen entdecken. Jemandem wirklich zuhören, statt im Kopf schon die nächste besonders schlaue Antwort vorzubereiten." + }, + { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "Meine schlauen Antworten stehen grundsätzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben." + }, + { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Und dann kommt die schwere Frage. Was ist mit Trauer? Wenn der Mensch fehlt, den man anrufen möchte. Wenn ein vertrautes Geräusch in der Küche plötzlich alles wieder aufreißt?" + }, + { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Da würde ich nicht gleich mit einer Lebensweisheit kommen. Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine Möglichkeit, keine Pflicht, für den eigenen Schmerz auch noch dankbar zu sein." + }, + { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "Und vermeidbares Leid dürfen wir verändern. Hilfe suchen, Belastungen teilen, eine schädliche Situation verlassen. Niemand schuldet der Welt eine schöne Erklärung für alles, was ihm wehgetan hat." + }, + { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Manchmal besteht der nächste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen. Oder zu sagen: Heute ist es schwer. Ein erschöpfter Mensch muss seinen Wert nicht erst wieder verdienen." + }, + { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Später hat das Kind die Anleitung vergessen. Aber es erinnert sich an seine Geduld. Daran, dass Fehler erlaubt waren." + }, + { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "Das berührt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen. Ein bisschen mehr Geduld, die weiterwandert. Auch wenn das Fahrrad längst rostet und niemand mehr an diese Stunde denkt." + }, + { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Vielleicht bleibt das große Rätsel offen. Wir können über die Welt verschieden denken und trotzdem spüren, dass jetzt jemand Zuwendung braucht. Wir müssen nicht alles wissen, bevor wir etwas lieben dürfen." + }, + { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "Und Zuwendung darf klein anfangen. Ein aufgeschobener Anruf. Etwas sorgfältig Gemachtes. Eine Entschuldigung ohne Ausrede. Das sind unsere Beispiele, keine Aufgabenliste, die Frankl uns hinterlassen hätte." + }, + { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "Vielleicht reicht für heute diese Frage: Wem oder was möchte ich Aufmerksamkeit schenken? Nur heute. Und wenn die Antwort Ruhe heißt, oder Hilfe annehmen, dann darf genau dort ein Anfang liegen." + }, + { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "Den Sinn des Lebens haben wir nicht gelöst. Aber wir können die Frage miteinander teilen. Und die letzten beiden Kekse. Nehmen wir uns für beides ein bisschen Zeit." + } + ] +} \ No newline at end of file diff --git a/optimized_pipeline/script-en.json b/optimized_pipeline/script-en.json new file mode 100644 index 0000000000000000000000000000000000000000..76a75dbcc233b9ea35716170115cae6833eddf49 --- /dev/null +++ b/optimized_pipeline/script-en.json @@ -0,0 +1,130 @@ +{ + "language": "en", + "title": "Small Questions, Big Feelings — Meaning, Care and Viktor Frankl", + "hosts": [ + "Mira", + "Idris" + ], + "turns": [ + { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer. Preferably something I could remember while looking for my keys." + }, + { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller than explaining the entire universe before tea." + }, + { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "All right. Why does an ordinary afternoon sometimes feel deeply worthwhile, while a day full of achievements can feel strangely empty? What is the difference between being busy and being alive?" + }, + { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Viktor Frankl, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success: what matters enough for us to respond to it?" + }, + { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "So we are not hunting for one magnificent sentence that explains everybody's life? No universal instruction manual, with a missing page and an impossible little screwdriver?" + }, + { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Thankfully, no assembly required. For Frankl, meaning is discovered in particular situations, by particular people. What matters to you this morning might be very different from what mattered ten years ago." + }, + { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping a neighbour carry groceries. Nothing impressive happens. But somebody gets home feeling less alone." + }, + { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "That fits one of Frankl's avenues: what we give through our actions. Another is what we receive through experience, beauty, or love. Meaning does not always require us to produce something." + }, + { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Listening to a song without checking my phone. Noticing the ridiculous courage of a flower growing through the pavement. Really hearing someone, instead of silently preparing my clever reply." + }, + { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "My clever replies have a waiting list. But yes. Attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours." + }, + { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Here is the difficult part. What about grief? When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss them terribly?" + }, + { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Then I would not rush in with a lesson. Frankl's third avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain." + }, + { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the burden. We do not owe the world a beautiful explanation for everything that hurts." + }, + { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Exactly. Sometimes the meaningful act is letting somebody sit beside you. Or saying, today is difficult. A life does not lose its worth because the person living it is exhausted." + }, + { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Imagine a father teaching his child to repair a bicycle. Years later, the child cannot remember the instructions. But they remember his patience. The feeling that mistakes were allowed." + }, + { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "That is a lovely thought. What survives us may be a way of treating people. A little more patience travelling through the world, long after the bicycle has rusted." + }, + { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Maybe the mystery stays. We can disagree about the universe and still recognise a moment that asks for care. We do not need certainty about everything before we can love something." + }, + { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "And care can be modest. A call you keep postponing. Something you make with attention. An apology without excuses. These are our examples, not a checklist Frankl handed down." + }, + { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "For today, perhaps ask: who or what deserves my attention? Not forever. Just today. And if the answer is rest, or letting someone help, that can be an honest beginning." + }, + { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "We have not solved the meaning of life. But we have someone to share the question with. And two biscuits left. Let's take our time with both." + } + ] +} \ No newline at end of file diff --git a/optimized_pipeline/script-speaker-de.json b/optimized_pipeline/script-speaker-de.json new file mode 100644 index 0000000000000000000000000000000000000000..ccd477b9abc46e1d387525a15ff967d71ad96356 --- /dev/null +++ b/optimized_pipeline/script-speaker-de.json @@ -0,0 +1,438 @@ +{ + "language": "de", + "title": "Kleine Fragen, große Gefühle — Sinn, Zuwendung und Viktor Frankl", + "hosts": [ + "Mira", + "Idris" + ], + "turns": [ + { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Willkommen bei Kleine Fragen, große Gefühle. Heute geht es um den Sinn des Lebens. Idris, ich hätte gern eine klare Antwort. Eine, die ich mir beim Schlüsselsuchen noch merken kann.", + "sentences": [ + { + "text": "Willkommen bei Kleine Fragen, große Gefühle.", + "emotion": "warm welcoming curiosity" + }, + { + "text": "Heute geht es um den Sinn des Lebens.", + "emotion": "quiet wonder" + }, + { + "text": "Idris, ich hätte gern eine klare Antwort.", + "emotion": "light amusement" + }, + { + "text": "Eine, die ich mir beim Schlüsselsuchen noch merken kann.", + "emotion": "affectionate dry humour" + } + ] + }, + { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas bröselig, aber sie machen die Ungewissheit gemütlicher. Müssen wir wirklich das ganze Universum erklären, bevor der Tee kalt wird?", + "sentences": [ + { + "text": "Ich habe Kekse mitgebracht.", + "emotion": "amusement, an easy smile" + }, + { + "text": "Als Weltanschauung vielleicht etwas bröselig, aber sie machen die Ungewissheit gemütlicher.", + "emotion": "playful skepticism" + }, + { + "text": "Müssen wir wirklich das ganze Universum erklären, bevor der Tee kalt wird?", + "emotion": "gently curious" + } + ] + }, + { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "Dann fangen wir kleiner an. Warum fühlt sich ein gewöhnlicher Nachmittag manchmal kostbar an, während ein Tag voller Erfolge seltsam leer bleibt? Was unterscheidet Beschäftigung von einem erfüllten Leben?", + "sentences": [ + { + "text": "Dann fangen wir kleiner an.", + "emotion": "thoughtful curiosity" + }, + { + "text": "Warum fühlt sich ein gewöhnlicher Nachmittag manchmal kostbar an, während ein Tag voller Erfolge seltsam leer bleibt?", + "emotion": "wonder" + }, + { + "text": "Was unterscheidet Beschäftigung von einem erfüllten Leben?", + "emotion": "sincere curiosity" + } + ] + }, + { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Der österreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergnügen oder Erfolg: Was ist uns so wichtig, dass wir darauf antworten wollen?", + "sentences": [ + { + "text": "Der österreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes.", + "emotion": "engaged and thoughtful" + }, + { + "text": "Dabei geht es um mehr als Vergnügen oder Erfolg: Was ist uns so wichtig, dass wir darauf antworten wollen?", + "emotion": "quiet conviction, conversational" + } + ] + }, + { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "Also suchen wir keinen einzigen großen Satz, der für alle Menschen stimmt? Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen?", + "sentences": [ + { + "text": "Also suchen wir keinen einzigen großen Satz, der für alle Menschen stimmt?", + "emotion": "friendly skepticism" + }, + { + "text": "Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen?", + "emotion": "light amusement" + } + ] + }, + { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Zum Glück nicht. Für Frankl lässt sich Sinn in konkreten Situationen entdecken. Was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder verändern.", + "sentences": [ + { + "text": "Zum Glück nicht.", + "emotion": "gentle amusement" + }, + { + "text": "Für Frankl lässt sich Sinn in konkreten Situationen entdecken.", + "emotion": "reflective curiosity" + }, + { + "text": "Was dieser Mensch jetzt beitragen oder erfahren kann.", + "emotion": "quiet wonder" + }, + { + "text": "Und das kann sich im Laufe eines Lebens immer wieder verändern.", + "emotion": "quiet wonder" + } + ] + }, + { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand trägt seiner Nachbarin die Einkäufe hoch. Nichts Spektakuläres passiert. Aber sie schließt ihre Tür und fühlt sich weniger allein.", + "sentences": [ + { + "text": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung.", + "emotion": "soft relief" + }, + { + "text": "Jemand trägt seiner Nachbarin die Einkäufe hoch.", + "emotion": "warm compassion" + }, + { + "text": "Nichts Spektakuläres passiert.", + "emotion": "quietly moved" + }, + { + "text": "Aber sie schließt ihre Tür und fühlt sich weniger allein.", + "emotion": "quietly moved" + } + ] + }, + { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "Das passt zu einem seiner Zugänge: etwas tun, etwas beitragen. Ein anderer liegt im Erleben, in Schönheit und Liebe. Wir müssen nicht ständig etwas herstellen, damit unser Leben Bedeutung hat.", + "sentences": [ + { + "text": "Das passt zu einem seiner Zugänge: etwas tun, etwas beitragen.", + "emotion": "engaged, naturally explanatory" + }, + { + "text": "Ein anderer liegt im Erleben, in Schönheit und Liebe.", + "emotion": "soft wonder" + }, + { + "text": "Wir müssen nicht ständig etwas herstellen, damit unser Leben Bedeutung hat.", + "emotion": "calm sincerity" + } + ] + }, + { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Ein Lied hören, ohne nebenbei aufs Handy zu schauen. Eine Blume zwischen Pflastersteinen entdecken. Jemandem wirklich zuhören, statt im Kopf schon die nächste besonders schlaue Antwort vorzubereiten.", + "sentences": [ + { + "text": "Ein Lied hören, ohne nebenbei aufs Handy zu schauen.", + "emotion": "quiet appreciation" + }, + { + "text": "Eine Blume zwischen Pflastersteinen entdecken.", + "emotion": "gentle awe at a small everyday detail" + }, + { + "text": "Jemandem wirklich zuhören, statt im Kopf schon die nächste besonders schlaue Antwort vorzubereiten.", + "emotion": "warm self-awareness" + } + ] + }, + { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "Meine schlauen Antworten stehen grundsätzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben.", + "sentences": [ + { + "text": "Meine schlauen Antworten stehen grundsätzlich Schlange.", + "emotion": "playful amusement" + }, + { + "text": "Aber ja, Aufmerksamkeit kann ein Geschenk sein.", + "emotion": "warm agreement" + }, + { + "text": "Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben.", + "emotion": "tender sincerity" + } + ] + }, + { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Und dann kommt die schwere Frage. Was ist mit Trauer? Wenn der Mensch fehlt, den man anrufen möchte. Wenn ein vertrautes Geräusch in der Küche plötzlich alles wieder aufreißt?", + "sentences": [ + { + "text": "Und dann kommt die schwere Frage.", + "emotion": "soft sadness, restrained and unhurried" + }, + { + "text": "Was ist mit Trauer?", + "emotion": "vulnerable compassion, no melodrama" + }, + { + "text": "Wenn der Mensch fehlt, den man anrufen möchte.", + "emotion": "vulnerable compassion, no melodrama" + }, + { + "text": "Wenn ein vertrautes Geräusch in der Küche plötzlich alles wieder aufreißt?", + "emotion": "vulnerable compassion, no melodrama" + } + ] + }, + { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Da würde ich nicht gleich mit einer Lebensweisheit kommen. Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine Möglichkeit, keine Pflicht, für den eigenen Schmerz auch noch dankbar zu sein.", + "sentences": [ + { + "text": "Da würde ich nicht gleich mit einer Lebensweisheit kommen.", + "emotion": "gentle compassion" + }, + { + "text": "Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid.", + "emotion": "thoughtful seriousness" + }, + { + "text": "Eine Möglichkeit, keine Pflicht, für den eigenen Schmerz auch noch dankbar zu sein.", + "emotion": "reassuring sincerity" + } + ] + }, + { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "Und vermeidbares Leid dürfen wir verändern. Hilfe suchen, Belastungen teilen, eine schädliche Situation verlassen. Niemand schuldet der Welt eine schöne Erklärung für alles, was ihm wehgetan hat.", + "sentences": [ + { + "text": "Und vermeidbares Leid dürfen wir verändern.", + "emotion": "gentle conviction" + }, + { + "text": "Hilfe suchen, Belastungen teilen, eine schädliche Situation verlassen.", + "emotion": "supportive warmth" + }, + { + "text": "Niemand schuldet der Welt eine schöne Erklärung für alles, was ihm wehgetan hat.", + "emotion": "compassionate seriousness" + } + ] + }, + { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Manchmal besteht der nächste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen. Oder zu sagen: Heute ist es schwer. Ein erschöpfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "sentences": [ + { + "text": "Manchmal besteht der nächste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen.", + "emotion": "quiet reassurance" + }, + { + "text": "Oder zu sagen: Heute ist es schwer.", + "emotion": "gentle vulnerability" + }, + { + "text": "Ein erschöpfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "emotion": "warm compassion" + } + ] + }, + { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Später hat das Kind die Anleitung vergessen. Aber es erinnert sich an seine Geduld. Daran, dass Fehler erlaubt waren.", + "sentences": [ + { + "text": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert.", + "emotion": "tender storytelling, quietly imagined" + }, + { + "text": "Später hat das Kind die Anleitung vergessen.", + "emotion": "soft nostalgia" + }, + { + "text": "Aber es erinnert sich an seine Geduld.", + "emotion": "quiet wonder" + }, + { + "text": "Daran, dass Fehler erlaubt waren.", + "emotion": "warm reassurance" + } + ] + }, + { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "Das berührt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen. Ein bisschen mehr Geduld, die weiterwandert. Auch wenn das Fahrrad längst rostet und niemand mehr an diese Stunde denkt.", + "sentences": [ + { + "text": "Das berührt mich.", + "emotion": "quietly moved" + }, + { + "text": "Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen.", + "emotion": "gentle awe" + }, + { + "text": "Ein bisschen mehr Geduld, die weiterwandert.", + "emotion": "tender reflection" + }, + { + "text": "Auch wenn das Fahrrad längst rostet und niemand mehr an diese Stunde denkt.", + "emotion": "tender reflection" + } + ] + }, + { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Vielleicht bleibt das große Rätsel offen. Wir können über die Welt verschieden denken und trotzdem spüren, dass jetzt jemand Zuwendung braucht. Wir müssen nicht alles wissen, bevor wir etwas lieben dürfen.", + "sentences": [ + { + "text": "Vielleicht bleibt das große Rätsel offen.", + "emotion": "thoughtful wonder" + }, + { + "text": "Wir können über die Welt verschieden denken und trotzdem spüren, dass jetzt jemand Zuwendung braucht.", + "emotion": "open curiosity" + }, + { + "text": "Wir müssen nicht alles wissen, bevor wir etwas lieben dürfen.", + "emotion": "gentle hope" + } + ] + }, + { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "Und Zuwendung darf klein anfangen. Ein aufgeschobener Anruf. Etwas sorgfältig Gemachtes. Eine Entschuldigung ohne Ausrede. Das sind unsere Beispiele, keine Aufgabenliste, die Frankl uns hinterlassen hätte.", + "sentences": [ + { + "text": "Und Zuwendung darf klein anfangen.", + "emotion": "quiet conviction" + }, + { + "text": "Ein aufgeschobener Anruf.", + "emotion": "warm encouragement" + }, + { + "text": "Etwas sorgfältig Gemachtes.", + "emotion": "sincere reflection" + }, + { + "text": "Eine Entschuldigung ohne Ausrede.", + "emotion": "sincere reflection" + }, + { + "text": "Das sind unsere Beispiele, keine Aufgabenliste, die Frankl uns hinterlassen hätte.", + "emotion": "sincere reflection" + } + ] + }, + { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "Vielleicht reicht für heute diese Frage: Wem oder was möchte ich Aufmerksamkeit schenken? Nur heute. Und wenn die Antwort Ruhe heißt, oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "sentences": [ + { + "text": "Vielleicht reicht für heute diese Frage: Wem oder was möchte ich Aufmerksamkeit schenken?", + "emotion": "gentle curiosity" + }, + { + "text": "Nur heute.", + "emotion": "calm intimacy" + }, + { + "text": "Und wenn die Antwort Ruhe heißt, oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "emotion": "warm reassurance" + } + ] + }, + { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "Den Sinn des Lebens haben wir nicht gelöst. Aber wir können die Frage miteinander teilen. Und die letzten beiden Kekse. Nehmen wir uns für beides ein bisschen Zeit.", + "sentences": [ + { + "text": "Den Sinn des Lebens haben wir nicht gelöst.", + "emotion": "light amusement" + }, + { + "text": "Aber wir können die Frage miteinander teilen.", + "emotion": "warm gratitude" + }, + { + "text": "Und die letzten beiden Kekse.", + "emotion": "playful amusement" + }, + { + "text": "Nehmen wir uns für beides ein bisschen Zeit.", + "emotion": "relaxed affection" + } + ] + } + ] +} diff --git a/optimized_pipeline/script-speaker-en.json b/optimized_pipeline/script-speaker-en.json new file mode 100644 index 0000000000000000000000000000000000000000..ba1b2ad703d7acbb4f07de2192210e577898c1fd --- /dev/null +++ b/optimized_pipeline/script-speaker-en.json @@ -0,0 +1,438 @@ +{ + "language": "en", + "title": "Small Questions, Big Feelings — Meaning, Care and Viktor Frankl", + "hosts": [ + "Mira", + "Idris" + ], + "turns": [ + { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer. Preferably something I could remember while looking for my keys.", + "sentences": [ + { + "text": "Welcome to Small Questions, Big Feelings.", + "emotion": "warm welcoming curiosity" + }, + { + "text": "Today, the meaning of life.", + "emotion": "quiet wonder" + }, + { + "text": "Idris, I was hoping for a clear answer.", + "emotion": "light amusement" + }, + { + "text": "Preferably something I could remember while looking for my keys.", + "emotion": "affectionate dry humour" + } + ] + }, + { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller than explaining the entire universe before tea.", + "sentences": [ + { + "text": "I brought biscuits.", + "emotion": "amusement, an easy smile" + }, + { + "text": "They are not a complete philosophy, but they make uncertainty considerably more hospitable.", + "emotion": "playful skepticism" + }, + { + "text": "Perhaps we should start smaller than explaining the entire universe before tea.", + "emotion": "gently curious" + } + ] + }, + { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "All right. Why does an ordinary afternoon sometimes feel deeply worthwhile, while a day full of achievements can feel strangely empty? What is the difference between being busy and being alive?", + "sentences": [ + { + "text": "All right.", + "emotion": "thoughtful curiosity" + }, + { + "text": "Why does an ordinary afternoon sometimes feel deeply worthwhile, while a day full of achievements can feel strangely empty?", + "emotion": "wonder" + }, + { + "text": "What is the difference between being busy and being alive?", + "emotion": "sincere curiosity" + } + ] + }, + { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Viktor Frankl, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success: what matters enough for us to respond to it?", + "sentences": [ + { + "text": "Viktor Frankl, the Austrian psychiatrist, put the search for meaning at the heart of his approach.", + "emotion": "engaged and thoughtful" + }, + { + "text": "His question points beyond pleasure or success: what matters enough for us to respond to it?", + "emotion": "quiet conviction, conversational" + } + ] + }, + { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "So we are not hunting for one magnificent sentence that explains everybody's life? No universal instruction manual, with a missing page and an impossible little screwdriver?", + "sentences": [ + { + "text": "So we are not hunting for one magnificent sentence that explains everybody's life?", + "emotion": "friendly skepticism" + }, + { + "text": "No universal instruction manual, with a missing page and an impossible little screwdriver?", + "emotion": "light amusement" + } + ] + }, + { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Thankfully, no assembly required. For Frankl, meaning is discovered in particular situations, by particular people. What matters to you this morning might be very different from what mattered ten years ago.", + "sentences": [ + { + "text": "Thankfully, no assembly required.", + "emotion": "gentle amusement" + }, + { + "text": "For Frankl, meaning is discovered in particular situations, by particular people.", + "emotion": "reflective curiosity" + }, + { + "text": "What matters to you this morning might be very different from what mattered ten years ago.", + "emotion": "quiet wonder" + } + ] + }, + { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping a neighbour carry groceries. Nothing impressive happens. But somebody gets home feeling less alone.", + "sentences": [ + { + "text": "That feels kinder than having to discover one perfect calling.", + "emotion": "soft relief" + }, + { + "text": "Suppose someone spends an afternoon helping a neighbour carry groceries.", + "emotion": "warm compassion" + }, + { + "text": "Nothing impressive happens.", + "emotion": "quietly moved" + }, + { + "text": "But somebody gets home feeling less alone.", + "emotion": "quietly moved" + } + ] + }, + { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "That fits one of Frankl's avenues: what we give through our actions. Another is what we receive through experience, beauty, or love. Meaning does not always require us to produce something.", + "sentences": [ + { + "text": "That fits one of Frankl's avenues: what we give through our actions.", + "emotion": "engaged, naturally explanatory" + }, + { + "text": "Another is what we receive through experience, beauty, or love.", + "emotion": "soft wonder" + }, + { + "text": "Meaning does not always require us to produce something.", + "emotion": "calm sincerity" + } + ] + }, + { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Listening to a song without checking my phone. Noticing the ridiculous courage of a flower growing through the pavement. Really hearing someone, instead of silently preparing my clever reply.", + "sentences": [ + { + "text": "Listening to a song without checking my phone.", + "emotion": "quiet appreciation" + }, + { + "text": "Noticing the ridiculous courage of a flower growing through the pavement.", + "emotion": "gentle awe at a small everyday detail" + }, + { + "text": "Really hearing someone, instead of silently preparing my clever reply.", + "emotion": "warm self-awareness" + } + ] + }, + { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "My clever replies have a waiting list. But yes. Attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours.", + "sentences": [ + { + "text": "My clever replies have a waiting list.", + "emotion": "playful amusement" + }, + { + "text": "But yes.", + "emotion": "warm agreement" + }, + { + "text": "Attention can be a kind of generosity.", + "emotion": "tender sincerity" + }, + { + "text": "You don't have to fix somebody's whole life to make room for them in yours.", + "emotion": "tender sincerity" + } + ] + }, + { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Here is the difficult part. What about grief? When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss them terribly?", + "sentences": [ + { + "text": "Here is the difficult part.", + "emotion": "soft sadness, restrained and unhurried" + }, + { + "text": "What about grief?", + "emotion": "vulnerable compassion, no melodrama" + }, + { + "text": "When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss them terribly?", + "emotion": "vulnerable compassion, no melodrama" + } + ] + }, + { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Then I would not rush in with a lesson. Frankl's third avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain.", + "sentences": [ + { + "text": "Then I would not rush in with a lesson.", + "emotion": "gentle compassion" + }, + { + "text": "Frankl's third avenue concerns our stance towards suffering we cannot avoid.", + "emotion": "thoughtful seriousness" + }, + { + "text": "It is a possibility, not a demand to feel grateful for pain.", + "emotion": "reassuring sincerity" + } + ] + }, + { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the burden. We do not owe the world a beautiful explanation for everything that hurts.", + "sentences": [ + { + "text": "And suffering we can change should be changed.", + "emotion": "gentle conviction" + }, + { + "text": "Ask for help, leave the harmful situation, share the burden.", + "emotion": "supportive warmth" + }, + { + "text": "We do not owe the world a beautiful explanation for everything that hurts.", + "emotion": "compassionate seriousness" + } + ] + }, + { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Exactly. Sometimes the meaningful act is letting somebody sit beside you. Or saying, today is difficult. A life does not lose its worth because the person living it is exhausted.", + "sentences": [ + { + "text": "Exactly.", + "emotion": "quiet reassurance" + }, + { + "text": "Sometimes the meaningful act is letting somebody sit beside you.", + "emotion": "gentle vulnerability" + }, + { + "text": "Or saying, today is difficult.", + "emotion": "warm compassion" + }, + { + "text": "A life does not lose its worth because the person living it is exhausted.", + "emotion": "warm compassion" + } + ] + }, + { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Imagine a father teaching his child to repair a bicycle. Years later, the child cannot remember the instructions. But they remember his patience. The feeling that mistakes were allowed.", + "sentences": [ + { + "text": "Imagine a father teaching his child to repair a bicycle.", + "emotion": "tender storytelling, quietly imagined" + }, + { + "text": "Years later, the child cannot remember the instructions.", + "emotion": "soft nostalgia" + }, + { + "text": "But they remember his patience.", + "emotion": "quiet wonder" + }, + { + "text": "The feeling that mistakes were allowed.", + "emotion": "warm reassurance" + } + ] + }, + { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "That is a lovely thought. What survives us may be a way of treating people. A little more patience travelling through the world, long after the bicycle has rusted.", + "sentences": [ + { + "text": "That is a lovely thought.", + "emotion": "quietly moved" + }, + { + "text": "What survives us may be a way of treating people.", + "emotion": "gentle awe" + }, + { + "text": "A little more patience travelling through the world, long after the bicycle has rusted.", + "emotion": "tender reflection" + } + ] + }, + { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Maybe the mystery stays. We can disagree about the universe and still recognise a moment that asks for care. We do not need certainty about everything before we can love something.", + "sentences": [ + { + "text": "Maybe the mystery stays.", + "emotion": "thoughtful wonder" + }, + { + "text": "We can disagree about the universe and still recognise a moment that asks for care.", + "emotion": "open curiosity" + }, + { + "text": "We do not need certainty about everything before we can love something.", + "emotion": "gentle hope" + } + ] + }, + { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "And care can be modest. A call you keep postponing. Something you make with attention. An apology without excuses. These are our examples, not a checklist Frankl handed down.", + "sentences": [ + { + "text": "And care can be modest.", + "emotion": "quiet conviction" + }, + { + "text": "A call you keep postponing.", + "emotion": "warm encouragement" + }, + { + "text": "Something you make with attention.", + "emotion": "sincere reflection" + }, + { + "text": "An apology without excuses.", + "emotion": "sincere reflection" + }, + { + "text": "These are our examples, not a checklist Frankl handed down.", + "emotion": "sincere reflection" + } + ] + }, + { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "For today, perhaps ask: who or what deserves my attention? Not forever. Just today. And if the answer is rest, or letting someone help, that can be an honest beginning.", + "sentences": [ + { + "text": "For today, perhaps ask: who or what deserves my attention?", + "emotion": "gentle curiosity" + }, + { + "text": "Not forever.", + "emotion": "calm intimacy" + }, + { + "text": "Just today.", + "emotion": "warm reassurance" + }, + { + "text": "And if the answer is rest, or letting someone help, that can be an honest beginning.", + "emotion": "warm reassurance" + } + ] + }, + { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "We have not solved the meaning of life. But we have someone to share the question with. And two biscuits left. Let's take our time with both.", + "sentences": [ + { + "text": "We have not solved the meaning of life.", + "emotion": "light amusement" + }, + { + "text": "But we have someone to share the question with.", + "emotion": "warm gratitude" + }, + { + "text": "And two biscuits left.", + "emotion": "playful amusement" + }, + { + "text": "Let's take our time with both.", + "emotion": "relaxed affection" + } + ] + } + ] +} diff --git a/optimized_pipeline/script-spontaneous-de.json b/optimized_pipeline/script-spontaneous-de.json new file mode 100644 index 0000000000000000000000000000000000000000..81dd931dbe65795546ed435e212dbaa85e81b15a --- /dev/null +++ b/optimized_pipeline/script-spontaneous-de.json @@ -0,0 +1,290 @@ +{ + "language": "de", + "title": "Kleine Fragen, große Gefühle — Sinn, Zuwendung und Viktor Frankl", + "hosts": [ + "Mira", + "Idris" + ], + "turns": [ + { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Willkommen bei Kleine Fragen, große Gefühle. Heute geht es um den Sinn des Lebens. Idris, ich hätte gern eine klare Antwort. Eine, die ich mir beim Schlüsselsuchen noch merken kann.", + "delivery_chunks": [ + { + "text": "Willkommen bei Kleine Fragen, große Gefühle. Heute geht es um den Sinn des Lebens.", + "cue": "warm, intimate welcome; gently curious; easy, spontaneous, gently spoken" + }, + { + "text": "Idris, ich hätte gern eine klare Antwort. Eine, die ich mir beim Schlüsselsuchen noch merken kann.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas bröselig, aber sie machen die Ungewissheit gemütlicher. Müssen wir wirklich das ganze Universum erklären, bevor der Tee kalt wird?", + "delivery_chunks": [ + { + "text": "Ich habe Kekse mitgebracht. Als Weltanschauung vielleicht etwas bröselig, aber sie machen die Ungewissheit gemütlicher. Müssen wir wirklich das ganze Universum erklären, bevor der Tee kalt wird?", + "cue": "affectionate dry humour; a small smile; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "Dann fangen wir kleiner an. Warum fühlt sich ein gewöhnlicher Nachmittag manchmal kostbar an, während ein Tag voller Erfolge seltsam leer bleibt? Was unterscheidet Beschäftigung von einem erfüllten Leben?", + "delivery_chunks": [ + { + "text": "Dann fangen wir kleiner an. Warum fühlt sich ein gewöhnlicher Nachmittag manchmal kostbar an, während ein Tag voller Erfolge seltsam leer bleibt?", + "cue": "thoughtful, sincere; let the question land; soft natural delivery, thinking aloud" + }, + { + "text": "Was unterscheidet Beschäftigung von einem erfüllten Leben?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Der österreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergnügen oder Erfolg: Was ist uns so wichtig, dass wir darauf antworten wollen?", + "delivery_chunks": [ + { + "text": "Der österreichische Psychiater Viktor Frankl stellte die Suche nach Sinn ins Zentrum seines Ansatzes. Dabei geht es um mehr als Vergnügen oder Erfolg: Was ist uns so wichtig, dass wir darauf antworten wollen?", + "cue": "engaged and clear, without lecturing; casual and sincere, unhurried" + } + ] + }, + { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "Also suchen wir keinen einzigen großen Satz, der für alle Menschen stimmt? Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen?", + "delivery_chunks": [ + { + "text": "Also suchen wir keinen einzigen großen Satz, der für alle Menschen stimmt?", + "cue": "curious, gently challenging; gentle conversational flow, in the moment" + }, + { + "text": "Keine universelle Bauanleitung, bei der ausgerechnet die wichtigste Seite und dieser winzige Schraubenzieher fehlen?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Zum Glück nicht. Für Frankl lässt sich Sinn in konkreten Situationen entdecken. Was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder verändern.", + "delivery_chunks": [ + { + "text": "Zum Glück nicht. Für Frankl lässt sich Sinn in konkreten Situationen entdecken. Was dieser Mensch jetzt beitragen oder erfahren kann. Und das kann sich im Laufe eines Lebens immer wieder verändern.", + "cue": "lightly amused, then reflective; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand trägt seiner Nachbarin die Einkäufe hoch. Nichts Spektakuläres passiert. Aber sie schließt ihre Tür und fühlt sich weniger allein.", + "delivery_chunks": [ + { + "text": "Das nimmt Druck aus dieser Suche nach der einen perfekten Berufung. Jemand trägt seiner Nachbarin die Einkäufe hoch.", + "cue": "warm, quietly moved; easy, spontaneous, gently spoken" + }, + { + "text": "Nichts Spektakuläres passiert. Aber sie schließt ihre Tür und fühlt sich weniger allein.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "Das passt zu einem seiner Zugänge: etwas tun, etwas beitragen. Ein anderer liegt im Erleben, in Schönheit und Liebe. Wir müssen nicht ständig etwas herstellen, damit unser Leben Bedeutung hat.", + "delivery_chunks": [ + { + "text": "Das passt zu einem seiner Zugänge: etwas tun, etwas beitragen. Ein anderer liegt im Erleben, in Schönheit und Liebe. Wir müssen nicht ständig etwas herstellen, damit unser Leben Bedeutung hat.", + "cue": "natural explanation with gentle emphasis; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Ein Lied hören, ohne nebenbei aufs Handy zu schauen. Eine Blume zwischen Pflastersteinen entdecken. Jemandem wirklich zuhören, statt im Kopf schon die nächste besonders schlaue Antwort vorzubereiten.", + "delivery_chunks": [ + { + "text": "Ein Lied hören, ohne nebenbei aufs Handy zu schauen. Eine Blume zwischen Pflastersteinen entdecken.", + "cue": "soft delight and recognition; soft natural delivery, thinking aloud" + }, + { + "text": "Jemandem wirklich zuhören, statt im Kopf schon die nächste besonders schlaue Antwort vorzubereiten.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "Meine schlauen Antworten stehen grundsätzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben.", + "delivery_chunks": [ + { + "text": "Meine schlauen Antworten stehen grundsätzlich Schlange. Aber ja, Aufmerksamkeit kann ein Geschenk sein. Man muss nicht das ganze Leben eines anderen reparieren, um ihm im eigenen einen Platz zu geben.", + "cue": "playful self-awareness, then tender; casual and sincere, unhurried" + } + ] + }, + { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Und dann kommt die schwere Frage. Was ist mit Trauer? Wenn der Mensch fehlt, den man anrufen möchte. Wenn ein vertrautes Geräusch in der Küche plötzlich alles wieder aufreißt?", + "delivery_chunks": [ + { + "text": "Und dann kommt die schwere Frage. Was ist mit Trauer? Wenn der Mensch fehlt, den man anrufen möchte.", + "cue": "slower, vulnerable but not theatrical; gentle conversational flow, in the moment" + }, + { + "text": "Wenn ein vertrautes Geräusch in der Küche plötzlich alles wieder aufreißt?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Da würde ich nicht gleich mit einer Lebensweisheit kommen. Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine Möglichkeit, keine Pflicht, für den eigenen Schmerz auch noch dankbar zu sein.", + "delivery_chunks": [ + { + "text": "Da würde ich nicht gleich mit einer Lebensweisheit kommen. Frankls dritter Zugang betrifft unsere Haltung zu unvermeidbarem Leid. Eine Möglichkeit, keine Pflicht, für den eigenen Schmerz auch noch dankbar zu sein.", + "cue": "compassionate, grounded; a small pause before answering; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "Und vermeidbares Leid dürfen wir verändern. Hilfe suchen, Belastungen teilen, eine schädliche Situation verlassen. Niemand schuldet der Welt eine schöne Erklärung für alles, was ihm wehgetan hat.", + "delivery_chunks": [ + { + "text": "Und vermeidbares Leid dürfen wir verändern. Hilfe suchen, Belastungen teilen, eine schädliche Situation verlassen.", + "cue": "firm but gentle; easy, spontaneous, gently spoken" + }, + { + "text": "Niemand schuldet der Welt eine schöne Erklärung für alles, was ihm wehgetan hat.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Manchmal besteht der nächste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen. Oder zu sagen: Heute ist es schwer. Ein erschöpfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "delivery_chunks": [ + { + "text": "Manchmal besteht der nächste sinnvolle Schritt darin, jemanden neben sich sitzen zu lassen. Oder zu sagen: Heute ist es schwer. Ein erschöpfter Mensch muss seinen Wert nicht erst wieder verdienen.", + "cue": "quiet reassurance, no grand speech; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Später hat das Kind die Anleitung vergessen. Aber es erinnert sich an seine Geduld. Daran, dass Fehler erlaubt waren.", + "delivery_chunks": [ + { + "text": "Stell dir einen Vater vor, der seinem Kind zeigt, wie man ein Fahrrad repariert. Später hat das Kind die Anleitung vergessen.", + "cue": "tender, painting a simple imagined scene; soft natural delivery, thinking aloud" + }, + { + "text": "Aber es erinnert sich an seine Geduld. Daran, dass Fehler erlaubt waren.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "Das berührt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen. Ein bisschen mehr Geduld, die weiterwandert. Auch wenn das Fahrrad längst rostet und niemand mehr an diese Stunde denkt.", + "delivery_chunks": [ + { + "text": "Das berührt mich. Vielleicht hinterlassen wir manchmal eine Art, mit Menschen umzugehen. Ein bisschen mehr Geduld, die weiterwandert. Auch wenn das Fahrrad längst rostet und niemand mehr an diese Stunde denkt.", + "cue": "gently moved, unhurried; casual and sincere, unhurried" + } + ] + }, + { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Vielleicht bleibt das große Rätsel offen. Wir können über die Welt verschieden denken und trotzdem spüren, dass jetzt jemand Zuwendung braucht. Wir müssen nicht alles wissen, bevor wir etwas lieben dürfen.", + "delivery_chunks": [ + { + "text": "Vielleicht bleibt das große Rätsel offen. Wir können über die Welt verschieden denken und trotzdem spüren, dass jetzt jemand Zuwendung braucht.", + "cue": "thoughtful, open rather than conclusive; gentle conversational flow, in the moment" + }, + { + "text": "Wir müssen nicht alles wissen, bevor wir etwas lieben dürfen.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "Und Zuwendung darf klein anfangen. Ein aufgeschobener Anruf. Etwas sorgfältig Gemachtes. Eine Entschuldigung ohne Ausrede. Das sind unsere Beispiele, keine Aufgabenliste, die Frankl uns hinterlassen hätte.", + "delivery_chunks": [ + { + "text": "Und Zuwendung darf klein anfangen. Ein aufgeschobener Anruf. Etwas sorgfältig Gemachtes. Eine Entschuldigung ohne Ausrede. Das sind unsere Beispiele, keine Aufgabenliste, die Frankl uns hinterlassen hätte.", + "cue": "quiet conviction, conversational; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "Vielleicht reicht für heute diese Frage: Wem oder was möchte ich Aufmerksamkeit schenken? Nur heute. Und wenn die Antwort Ruhe heißt, oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "delivery_chunks": [ + { + "text": "Vielleicht reicht für heute diese Frage: Wem oder was möchte ich Aufmerksamkeit schenken? Nur heute.", + "cue": "gentle invitation, with breathing space; easy, spontaneous, gently spoken" + }, + { + "text": "Und wenn die Antwort Ruhe heißt, oder Hilfe annehmen, dann darf genau dort ein Anfang liegen.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "Den Sinn des Lebens haben wir nicht gelöst. Aber wir können die Frage miteinander teilen. Und die letzten beiden Kekse. Nehmen wir uns für beides ein bisschen Zeit.", + "delivery_chunks": [ + { + "text": "Den Sinn des Lebens haben wir nicht gelöst. Aber wir können die Frage miteinander teilen. Und die letzten beiden Kekse. Nehmen wir uns für beides ein bisschen Zeit.", + "cue": "warm closing; a soft smile; relaxed, unforced, like talking to a friend" + } + ] + } + ] +} \ No newline at end of file diff --git a/optimized_pipeline/script-spontaneous-en.json b/optimized_pipeline/script-spontaneous-en.json new file mode 100644 index 0000000000000000000000000000000000000000..2eda6fc1b668e0c26e5ec65a737c337ec4273572 --- /dev/null +++ b/optimized_pipeline/script-spontaneous-en.json @@ -0,0 +1,290 @@ +{ + "language": "en", + "title": "Small Questions, Big Feelings — Meaning, Care and Viktor Frankl", + "hosts": [ + "Mira", + "Idris" + ], + "turns": [ + { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer. Preferably something I could remember while looking for my keys.", + "delivery_chunks": [ + { + "text": "Welcome to Small Questions, Big Feelings. Today, the meaning of life. Idris, I was hoping for a clear answer.", + "cue": "warm, intimate welcome; gently curious; easy, spontaneous, gently spoken" + }, + { + "text": "Preferably something I could remember while looking for my keys.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller than explaining the entire universe before tea.", + "delivery_chunks": [ + { + "text": "I brought biscuits. They are not a complete philosophy, but they make uncertainty considerably more hospitable. Perhaps we should start smaller than explaining the entire universe before tea.", + "cue": "affectionate dry humour; a small smile; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "All right. Why does an ordinary afternoon sometimes feel deeply worthwhile, while a day full of achievements can feel strangely empty? What is the difference between being busy and being alive?", + "delivery_chunks": [ + { + "text": "All right. Why does an ordinary afternoon sometimes feel deeply worthwhile, while a day full of achievements can feel strangely empty?", + "cue": "thoughtful, sincere; let the question land; soft natural delivery, thinking aloud" + }, + { + "text": "What is the difference between being busy and being alive?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Viktor Frankl, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success: what matters enough for us to respond to it?", + "delivery_chunks": [ + { + "text": "Viktor Frankl, the Austrian psychiatrist, put the search for meaning at the heart of his approach. His question points beyond pleasure or success: what matters enough for us to respond to it?", + "cue": "engaged and clear, without lecturing; casual and sincere, unhurried" + } + ] + }, + { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "So we are not hunting for one magnificent sentence that explains everybody's life? No universal instruction manual, with a missing page and an impossible little screwdriver?", + "delivery_chunks": [ + { + "text": "So we are not hunting for one magnificent sentence that explains everybody's life?", + "cue": "curious, gently challenging; gentle conversational flow, in the moment" + }, + { + "text": "No universal instruction manual, with a missing page and an impossible little screwdriver?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Thankfully, no assembly required. For Frankl, meaning is discovered in particular situations, by particular people. What matters to you this morning might be very different from what mattered ten years ago.", + "delivery_chunks": [ + { + "text": "Thankfully, no assembly required. For Frankl, meaning is discovered in particular situations, by particular people. What matters to you this morning might be very different from what mattered ten years ago.", + "cue": "lightly amused, then reflective; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping a neighbour carry groceries. Nothing impressive happens. But somebody gets home feeling less alone.", + "delivery_chunks": [ + { + "text": "That feels kinder than having to discover one perfect calling. Suppose someone spends an afternoon helping a neighbour carry groceries.", + "cue": "warm, quietly moved; easy, spontaneous, gently spoken" + }, + { + "text": "Nothing impressive happens. But somebody gets home feeling less alone.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "That fits one of Frankl's avenues: what we give through our actions. Another is what we receive through experience, beauty, or love. Meaning does not always require us to produce something.", + "delivery_chunks": [ + { + "text": "That fits one of Frankl's avenues: what we give through our actions. Another is what we receive through experience, beauty, or love. Meaning does not always require us to produce something.", + "cue": "natural explanation with gentle emphasis; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Listening to a song without checking my phone. Noticing the ridiculous courage of a flower growing through the pavement. Really hearing someone, instead of silently preparing my clever reply.", + "delivery_chunks": [ + { + "text": "Listening to a song without checking my phone. Noticing the ridiculous courage of a flower growing through the pavement.", + "cue": "soft delight and recognition; soft natural delivery, thinking aloud" + }, + { + "text": "Really hearing someone, instead of silently preparing my clever reply.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "My clever replies have a waiting list. But yes. Attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours.", + "delivery_chunks": [ + { + "text": "My clever replies have a waiting list. But yes. Attention can be a kind of generosity. You don't have to fix somebody's whole life to make room for them in yours.", + "cue": "playful self-awareness, then tender; casual and sincere, unhurried" + } + ] + }, + { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Here is the difficult part. What about grief? When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss them terribly?", + "delivery_chunks": [ + { + "text": "Here is the difficult part. What about grief?", + "cue": "slower, vulnerable but not theatrical; gentle conversational flow, in the moment" + }, + { + "text": "When the person you want to call is gone, and an ordinary sound in the kitchen suddenly makes you miss them terribly?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Then I would not rush in with a lesson. Frankl's third avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain.", + "delivery_chunks": [ + { + "text": "Then I would not rush in with a lesson. Frankl's third avenue concerns our stance towards suffering we cannot avoid. It is a possibility, not a demand to feel grateful for pain.", + "cue": "compassionate, grounded; a small pause before answering; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the burden. We do not owe the world a beautiful explanation for everything that hurts.", + "delivery_chunks": [ + { + "text": "And suffering we can change should be changed. Ask for help, leave the harmful situation, share the burden.", + "cue": "firm but gentle; easy, spontaneous, gently spoken" + }, + { + "text": "We do not owe the world a beautiful explanation for everything that hurts.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Exactly. Sometimes the meaningful act is letting somebody sit beside you. Or saying, today is difficult. A life does not lose its worth because the person living it is exhausted.", + "delivery_chunks": [ + { + "text": "Exactly. Sometimes the meaningful act is letting somebody sit beside you. Or saying, today is difficult. A life does not lose its worth because the person living it is exhausted.", + "cue": "quiet reassurance, no grand speech; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Imagine a father teaching his child to repair a bicycle. Years later, the child cannot remember the instructions. But they remember his patience. The feeling that mistakes were allowed.", + "delivery_chunks": [ + { + "text": "Imagine a father teaching his child to repair a bicycle. Years later, the child cannot remember the instructions.", + "cue": "tender, painting a simple imagined scene; soft natural delivery, thinking aloud" + }, + { + "text": "But they remember his patience. The feeling that mistakes were allowed.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "That is a lovely thought. What survives us may be a way of treating people. A little more patience travelling through the world, long after the bicycle has rusted.", + "delivery_chunks": [ + { + "text": "That is a lovely thought. What survives us may be a way of treating people. A little more patience travelling through the world, long after the bicycle has rusted.", + "cue": "gently moved, unhurried; casual and sincere, unhurried" + } + ] + }, + { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Maybe the mystery stays. We can disagree about the universe and still recognise a moment that asks for care. We do not need certainty about everything before we can love something.", + "delivery_chunks": [ + { + "text": "Maybe the mystery stays. We can disagree about the universe and still recognise a moment that asks for care.", + "cue": "thoughtful, open rather than conclusive; gentle conversational flow, in the moment" + }, + { + "text": "We do not need certainty about everything before we can love something.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "And care can be modest. A call you keep postponing. Something you make with attention. An apology without excuses. These are our examples, not a checklist Frankl handed down.", + "delivery_chunks": [ + { + "text": "And care can be modest. A call you keep postponing. Something you make with attention. An apology without excuses. These are our examples, not a checklist Frankl handed down.", + "cue": "quiet conviction, conversational; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "For today, perhaps ask: who or what deserves my attention? Not forever. Just today. And if the answer is rest, or letting someone help, that can be an honest beginning.", + "delivery_chunks": [ + { + "text": "For today, perhaps ask: who or what deserves my attention? Not forever. Just today.", + "cue": "gentle invitation, with breathing space; easy, spontaneous, gently spoken" + }, + { + "text": "And if the answer is rest, or letting someone help, that can be an honest beginning.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "We have not solved the meaning of life. But we have someone to share the question with. And two biscuits left. Let's take our time with both.", + "delivery_chunks": [ + { + "text": "We have not solved the meaning of life. But we have someone to share the question with. And two biscuits left. Let's take our time with both.", + "cue": "warm closing; a soft smile; relaxed, unforced, like talking to a friend" + } + ] + } + ] +} \ No newline at end of file diff --git a/optimized_pipeline/script-spontaneous-es.json b/optimized_pipeline/script-spontaneous-es.json new file mode 100644 index 0000000000000000000000000000000000000000..0ff4ac22c59ab539f17ee098d1bc9852ee8c6867 --- /dev/null +++ b/optimized_pipeline/script-spontaneous-es.json @@ -0,0 +1,292 @@ +{ + "language": "es", + "title": "Small Questions, Big Feelings — Meaning, Care and Viktor Frankl", + "hosts": [ + "Mira", + "Idris" + ], + "turns": [ + { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Bienvenidos a Pequeñas preguntas, grandes emociones. Hoy, el sentido de la vida. Idris, esperaba una respuesta clara. Preferiblemente algo que pueda recordar mientras busco mis llaves.", + "delivery_chunks": [ + { + "text": "Bienvenidos a Pequeñas preguntas, grandes emociones. Hoy, el sentido de la vida. Idris, esperaba una respuesta clara.", + "cue": "warm, intimate welcome; gently curious; easy, spontaneous, gently spoken" + }, + { + "text": "Preferiblemente algo que pueda recordar mientras busco mis llaves.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "He traído galletas. No son una filosofía completa, pero hacen que la incertidumbre resulte mucho más acogedora. Quizá convenga empezar por algo más pequeño que explicar todo el universo antes del té.", + "delivery_chunks": [ + { + "text": "He traído galletas. No son una filosofía completa, pero hacen que la incertidumbre resulte mucho más acogedora. Quizá convenga empezar por algo más pequeño que explicar todo el universo antes del té.", + "cue": "affectionate dry humour; a small smile; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "De acuerdo. ¿Por qué una tarde corriente a veces parece tan valiosa, mientras que un día lleno de logros puede dejarnos un extraño vacío? ¿Qué diferencia hay entre estar ocupado y sentirse vivo?", + "delivery_chunks": [ + { + "text": "De acuerdo. ¿Por qué una tarde corriente a veces parece tan valiosa, mientras que un día lleno de logros puede dejarnos un extraño vacío?", + "cue": "thoughtful, sincere; let the question land; soft natural delivery, thinking aloud" + }, + { + "text": "¿Qué diferencia hay entre estar ocupado y sentirse vivo?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Viktor Frankl, el psiquiatra austriaco, puso la búsqueda de sentido en el centro de su enfoque. Su pregunta va más allá del placer o del éxito: ¿qué importa tanto como para responder a ello?", + "delivery_chunks": [ + { + "text": "Viktor Frankl, el psiquiatra austriaco, puso la búsqueda de sentido en el centro de su enfoque. Su pregunta va más allá del placer o del éxito: ¿qué importa tanto como para responder a ello?", + "cue": "engaged and clear, without lecturing; casual and sincere, unhurried" + } + ] + }, + { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "Entonces, ¿no buscamos una frase magnífica que explique la vida de todo el mundo? ¿No hay un manual universal, con una página perdida y un destornillador diminuto imposible de usar?", + "delivery_chunks": [ + { + "text": "Entonces, ¿no buscamos una frase magnífica que explique la vida de todo el mundo?", + "cue": "curious, gently challenging; gentle conversational flow, in the moment" + }, + { + "text": "¿No hay un manual universal, con una página perdida y un destornillador diminuto imposible de usar?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Por suerte, no hay que montar nada. Para Frankl, el sentido se descubre en situaciones concretas, por personas concretas. Lo que te importa esta mañana puede ser muy distinto de lo que importaba hace diez años.", + "delivery_chunks": [ + { + "text": "Por suerte, no hay que montar nada. Para Frankl, el sentido se descubre en situaciones concretas, por personas concretas. Lo que te importa esta mañana puede ser muy distinto de lo que importaba hace diez años.", + "cue": "lightly amused, then reflective; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "Suena más amable que tener que encontrar una vocación perfecta. Imagina que alguien pasa la tarde ayudando a un vecino a llevar la compra. No sucede nada espectacular. Pero alguien llega a casa sintiéndose menos solo.", + "delivery_chunks": [ + { + "text": "Suena más amable que tener que encontrar una vocación perfecta. Imagina que alguien pasa la tarde ayudando a un vecino a llevar la compra.", + "cue": "warm, quietly moved; easy, spontaneous, gently spoken" + }, + { + "text": "No sucede nada espectacular. Pero alguien llega a casa sintiéndose menos solo.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "Eso encaja con una de las vías de Frankl: lo que damos mediante nuestros actos. Otra es lo que recibimos a través de la experiencia, la belleza o el amor. El sentido no siempre exige producir algo.", + "delivery_chunks": [ + { + "text": "Eso encaja con una de las vías de Frankl: lo que damos mediante nuestros actos. Otra es lo que recibimos a través de la experiencia, la belleza o el amor. El sentido no siempre exige producir algo.", + "cue": "natural explanation with gentle emphasis; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Escuchar una canción sin mirar el móvil. Fijarme en el valor absurdo de una flor que crece entre las baldosas. Escuchar de verdad a alguien, en vez de preparar en silencio mi respuesta ingeniosa.", + "delivery_chunks": [ + { + "text": "Escuchar una canción sin mirar el móvil. Fijarme en el valor absurdo de una flor que crece entre las baldosas.", + "cue": "soft delight and recognition; soft natural delivery, thinking aloud" + }, + { + "text": "Escuchar de verdad a alguien, en vez de preparar en silencio mi respuesta ingeniosa.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "Mis respuestas ingeniosas tienen lista de espera. Pero sí. La atención puede ser una forma de generosidad. No hace falta arreglarle toda la vida a alguien para hacerle un hueco en la nuestra.", + "delivery_chunks": [ + { + "text": "Mis respuestas ingeniosas tienen lista de espera. Pero sí. La atención puede ser una forma de generosidad. No hace falta arreglarle toda la vida a alguien para hacerle un hueco en la nuestra.", + "cue": "playful self-awareness, then tender; casual and sincere, unhurried" + } + ] + }, + { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Esta es la parte difícil. ¿Y el duelo? Cuando la persona a la que quieres llamar ya no está, y un ruido cualquiera en la cocina hace que de pronto la eches muchísimo de menos.", + "delivery_chunks": [ + { + "text": "Esta es la parte difícil. ¿Y el duelo?", + "cue": "slower, vulnerable but not theatrical; gentle conversational flow, in the moment" + }, + { + "text": "Cuando la persona a la que quieres llamar ya no está, y un ruido cualquiera en la cocina hace que de pronto la eches muchísimo de menos.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Entonces no me apresuraría a dar una lección. La tercera vía de Frankl trata de nuestra actitud ante el sufrimiento inevitable. Es una posibilidad, no una obligación de sentir gratitud por el dolor.", + "delivery_chunks": [ + { + "text": "Entonces no me apresuraría a dar una lección. La tercera vía de Frankl trata de nuestra actitud ante el sufrimiento inevitable. Es una posibilidad, no una obligación de sentir gratitud por el dolor.", + "cue": "compassionate, grounded; a small pause before answering; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "Y el sufrimiento que podemos cambiar debe cambiarse. Pedir ayuda, salir de una situación dañina, compartir la carga. No le debemos al mundo una explicación hermosa para todo lo que nos duele.", + "delivery_chunks": [ + { + "text": "Y el sufrimiento que podemos cambiar debe cambiarse. Pedir ayuda, salir de una situación dañina, compartir la carga.", + "cue": "firm but gentle; easy, spontaneous, gently spoken" + }, + { + "text": "No le debemos al mundo una explicación hermosa para todo lo que nos duele.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Exacto. A veces, el acto que tiene sentido es dejar que alguien se siente a tu lado. O decir: hoy es difícil. Una vida no pierde su valor porque quien la vive esté agotado.", + "delivery_chunks": [ + { + "text": "Exacto. A veces, el acto que tiene sentido es dejar que alguien se siente a tu lado. O decir: hoy es difícil. Una vida no pierde su valor porque quien la vive esté agotado.", + "cue": "quiet reassurance, no grand speech; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Imagina a un padre enseñando a su hijo a reparar una bicicleta. Años después, el niño ya no recuerda las instrucciones. Pero recuerda su paciencia. La sensación de que estaba permitido equivocarse.", + "delivery_chunks": [ + { + "text": "Imagina a un padre enseñando a su hijo a reparar una bicicleta. Años después, el niño ya no recuerda las instrucciones.", + "cue": "tender, painting a simple imagined scene; soft natural delivery, thinking aloud" + }, + { + "text": "Pero recuerda su paciencia. La sensación de que estaba permitido equivocarse.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "Es una idea preciosa. Lo que nos sobrevive quizá sea una forma de tratar a los demás. Un poco más de paciencia viajando por el mundo, mucho después de que la bicicleta se haya oxidado.", + "delivery_chunks": [ + { + "text": "Es una idea preciosa. Lo que nos sobrevive quizá sea una forma de tratar a los demás. Un poco más de paciencia viajando por el mundo, mucho después de que la bicicleta se haya oxidado.", + "cue": "gently moved, unhurried; casual and sincere, unhurried" + } + ] + }, + { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Quizá el misterio permanezca. Podemos discrepar sobre el universo y aun así reconocer un momento que necesita cuidado. No hace falta tener certeza sobre todo antes de poder amar algo.", + "delivery_chunks": [ + { + "text": "Quizá el misterio permanezca. Podemos discrepar sobre el universo y aun así reconocer un momento que necesita cuidado.", + "cue": "thoughtful, open rather than conclusive; gentle conversational flow, in the moment" + }, + { + "text": "No hace falta tener certeza sobre todo antes de poder amar algo.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "Y ese cuidado puede ser modesto. Una llamada que sigues aplazando. Algo que haces con atención. Una disculpa sin excusas. Son nuestros ejemplos, no una lista que nos haya dejado Frankl.", + "delivery_chunks": [ + { + "text": "Y ese cuidado puede ser modesto. Una llamada que sigues aplazando. Algo que haces con atención. Una disculpa sin excusas. Son nuestros ejemplos, no una lista que nos haya dejado Frankl.", + "cue": "quiet conviction, conversational; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "Por hoy, quizá podemos preguntarnos: ¿quién o qué merece mi atención? No para siempre. Solo hoy. Y si la respuesta es descansar, o dejar que alguien ayude, eso puede ser un comienzo sincero.", + "delivery_chunks": [ + { + "text": "Por hoy, quizá podemos preguntarnos: ¿quién o qué merece mi atención? No para siempre. Solo hoy.", + "cue": "gentle invitation, with breathing space; easy, spontaneous, gently spoken" + }, + { + "text": "Y si la respuesta es descansar, o dejar que alguien ayude, eso puede ser un comienzo sincero.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "No hemos resuelto el sentido de la vida. Pero tenemos a alguien con quien compartir la pregunta. Y quedan dos galletas. Tomémonos nuestro tiempo con las dos cosas.", + "delivery_chunks": [ + { + "text": "No hemos resuelto el sentido de la vida. Pero tenemos a alguien con quien compartir la pregunta. Y quedan dos galletas. Tomémonos nuestro tiempo con las dos cosas.", + "cue": "warm closing; a soft smile; relaxed, unforced, like talking to a friend" + } + ] + } + ], + "translation_of": "script-spontaneous-en.json", + "translation_note": "Same content and speaker roles; localized by the coding assistant, with original sparse English performance cues." +} diff --git a/optimized_pipeline/script-spontaneous-fr.json b/optimized_pipeline/script-spontaneous-fr.json new file mode 100644 index 0000000000000000000000000000000000000000..bfd63d788689879d664ae97a4f4b1488966c9837 --- /dev/null +++ b/optimized_pipeline/script-spontaneous-fr.json @@ -0,0 +1,292 @@ +{ + "language": "fr", + "title": "Small Questions, Big Feelings — Meaning, Care and Viktor Frankl", + "hosts": [ + "Mira", + "Idris" + ], + "turns": [ + { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Bienvenue dans Petites questions, grandes émotions. Aujourd’hui, le sens de la vie. Idris, j’espérais une réponse claire. De préférence quelque chose dont je puisse me souvenir en cherchant mes clés.", + "delivery_chunks": [ + { + "text": "Bienvenue dans Petites questions, grandes émotions. Aujourd’hui, le sens de la vie. Idris, j’espérais une réponse claire.", + "cue": "warm, intimate welcome; gently curious; easy, spontaneous, gently spoken" + }, + { + "text": "De préférence quelque chose dont je puisse me souvenir en cherchant mes clés.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "J’ai apporté des biscuits. Ce n’est pas une philosophie complète, mais ils rendent l’incertitude bien plus accueillante. On pourrait commencer plus modestement que par expliquer tout l’univers avant le thé.", + "delivery_chunks": [ + { + "text": "J’ai apporté des biscuits. Ce n’est pas une philosophie complète, mais ils rendent l’incertitude bien plus accueillante. On pourrait commencer plus modestement que par expliquer tout l’univers avant le thé.", + "cue": "affectionate dry humour; a small smile; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "D’accord. Pourquoi un après-midi ordinaire semble-t-il parfois si précieux, alors qu’une journée pleine de réussites peut laisser un étrange vide ? Quelle différence entre être occupé et se sentir vivant ?", + "delivery_chunks": [ + { + "text": "D’accord. Pourquoi un après-midi ordinaire semble-t-il parfois si précieux, alors qu’une journée pleine de réussites peut laisser un étrange vide ?", + "cue": "thoughtful, sincere; let the question land; soft natural delivery, thinking aloud" + }, + { + "text": "Quelle différence entre être occupé et se sentir vivant ?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Viktor Frankl, le psychiatre autrichien, plaçait la recherche de sens au cœur de son approche. Sa question dépasse le plaisir ou la réussite : qu’est-ce qui compte assez pour nous appeler à agir ?", + "delivery_chunks": [ + { + "text": "Viktor Frankl, le psychiatre autrichien, plaçait la recherche de sens au cœur de son approche. Sa question dépasse le plaisir ou la réussite : qu’est-ce qui compte assez pour nous appeler à agir ?", + "cue": "engaged and clear, without lecturing; casual and sincere, unhurried" + } + ] + }, + { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "Donc, on ne cherche pas une phrase magnifique qui expliquerait la vie de tout le monde ? Pas de mode d’emploi universel, avec une page manquante et un minuscule tournevis impossible à utiliser ?", + "delivery_chunks": [ + { + "text": "Donc, on ne cherche pas une phrase magnifique qui expliquerait la vie de tout le monde ?", + "cue": "curious, gently challenging; gentle conversational flow, in the moment" + }, + { + "text": "Pas de mode d’emploi universel, avec une page manquante et un minuscule tournevis impossible à utiliser ?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Heureusement, aucun montage à prévoir. Pour Frankl, le sens se découvre dans des situations précises, par des personnes précises. Ce qui compte pour toi ce matin peut différer de ce qui comptait il y a dix ans.", + "delivery_chunks": [ + { + "text": "Heureusement, aucun montage à prévoir. Pour Frankl, le sens se découvre dans des situations précises, par des personnes précises. Ce qui compte pour toi ce matin peut différer de ce qui comptait il y a dix ans.", + "cue": "lightly amused, then reflective; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "C’est plus doux que de devoir trouver une vocation parfaite. Imaginons quelqu’un qui aide un voisin à porter ses courses. Rien de spectaculaire ne se passe. Mais quelqu’un rentre chez lui en se sentant moins seul.", + "delivery_chunks": [ + { + "text": "C’est plus doux que de devoir trouver une vocation parfaite. Imaginons quelqu’un qui aide un voisin à porter ses courses.", + "cue": "warm, quietly moved; easy, spontaneous, gently spoken" + }, + { + "text": "Rien de spectaculaire ne se passe. Mais quelqu’un rentre chez lui en se sentant moins seul.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "Cela rejoint une des voies de Frankl : ce que nous apportons par nos actes. Une autre est ce que nous recevons à travers l’expérience, la beauté ou l’amour. Le sens n’exige pas toujours de produire quelque chose.", + "delivery_chunks": [ + { + "text": "Cela rejoint une des voies de Frankl : ce que nous apportons par nos actes. Une autre est ce que nous recevons à travers l’expérience, la beauté ou l’amour. Le sens n’exige pas toujours de produire quelque chose.", + "cue": "natural explanation with gentle emphasis; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Écouter une chanson sans regarder mon téléphone. Remarquer le courage un peu fou d’une fleur qui pousse entre les pavés. Vraiment écouter quelqu’un, au lieu de préparer en silence ma brillante réponse.", + "delivery_chunks": [ + { + "text": "Écouter une chanson sans regarder mon téléphone. Remarquer le courage un peu fou d’une fleur qui pousse entre les pavés.", + "cue": "soft delight and recognition; soft natural delivery, thinking aloud" + }, + { + "text": "Vraiment écouter quelqu’un, au lieu de préparer en silence ma brillante réponse.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "Mes brillantes réponses ont une liste d’attente. Mais oui. L’attention peut être une forme de générosité. Pas besoin de réparer toute la vie de quelqu’un pour lui faire une place dans la nôtre.", + "delivery_chunks": [ + { + "text": "Mes brillantes réponses ont une liste d’attente. Mais oui. L’attention peut être une forme de générosité. Pas besoin de réparer toute la vie de quelqu’un pour lui faire une place dans la nôtre.", + "cue": "playful self-awareness, then tender; casual and sincere, unhurried" + } + ] + }, + { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Voici la partie difficile. Et le deuil ? Quand la personne qu’on voudrait appeler n’est plus là, et qu’un simple bruit dans la cuisine nous la fait soudain terriblement regretter ?", + "delivery_chunks": [ + { + "text": "Voici la partie difficile. Et le deuil ?", + "cue": "slower, vulnerable but not theatrical; gentle conversational flow, in the moment" + }, + { + "text": "Quand la personne qu’on voudrait appeler n’est plus là, et qu’un simple bruit dans la cuisine nous la fait soudain terriblement regretter ?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Je ne me précipiterais pas avec une leçon. La troisième voie de Frankl concerne notre attitude face à une souffrance inévitable. C’est une possibilité, pas une obligation d’éprouver de la gratitude pour la douleur.", + "delivery_chunks": [ + { + "text": "Je ne me précipiterais pas avec une leçon. La troisième voie de Frankl concerne notre attitude face à une souffrance inévitable. C’est une possibilité, pas une obligation d’éprouver de la gratitude pour la douleur.", + "cue": "compassionate, grounded; a small pause before answering; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "Et la souffrance qu’on peut changer doit être changée. Demander de l’aide, quitter une situation nocive, partager le fardeau. Nous ne devons pas au monde une belle explication pour tout ce qui nous fait mal.", + "delivery_chunks": [ + { + "text": "Et la souffrance qu’on peut changer doit être changée. Demander de l’aide, quitter une situation nocive, partager le fardeau.", + "cue": "firm but gentle; easy, spontaneous, gently spoken" + }, + { + "text": "Nous ne devons pas au monde une belle explication pour tout ce qui nous fait mal.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Exactement. Parfois, ce qui a du sens, c’est laisser quelqu’un s’asseoir près de nous. Ou dire : aujourd’hui, c’est difficile. Une vie ne perd pas sa valeur parce que la personne qui la vit est épuisée.", + "delivery_chunks": [ + { + "text": "Exactement. Parfois, ce qui a du sens, c’est laisser quelqu’un s’asseoir près de nous. Ou dire : aujourd’hui, c’est difficile. Une vie ne perd pas sa valeur parce que la personne qui la vit est épuisée.", + "cue": "quiet reassurance, no grand speech; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Imagine un père qui apprend à son enfant à réparer un vélo. Des années plus tard, l’enfant a oublié les instructions. Mais il se souvient de sa patience. Du sentiment qu’il avait le droit de se tromper.", + "delivery_chunks": [ + { + "text": "Imagine un père qui apprend à son enfant à réparer un vélo. Des années plus tard, l’enfant a oublié les instructions.", + "cue": "tender, painting a simple imagined scene; soft natural delivery, thinking aloud" + }, + { + "text": "Mais il se souvient de sa patience. Du sentiment qu’il avait le droit de se tromper.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "C’est une belle pensée. Ce qui nous survit, c’est peut-être une façon de traiter les autres. Un peu plus de patience qui traverse le monde, longtemps après que le vélo a rouillé.", + "delivery_chunks": [ + { + "text": "C’est une belle pensée. Ce qui nous survit, c’est peut-être une façon de traiter les autres. Un peu plus de patience qui traverse le monde, longtemps après que le vélo a rouillé.", + "cue": "gently moved, unhurried; casual and sincere, unhurried" + } + ] + }, + { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Peut-être que le mystère demeure. On peut être en désaccord sur l’univers et reconnaître un moment qui demande de l’attention. Pas besoin d’être sûr de tout avant de pouvoir aimer quelque chose.", + "delivery_chunks": [ + { + "text": "Peut-être que le mystère demeure. On peut être en désaccord sur l’univers et reconnaître un moment qui demande de l’attention.", + "cue": "thoughtful, open rather than conclusive; gentle conversational flow, in the moment" + }, + { + "text": "Pas besoin d’être sûr de tout avant de pouvoir aimer quelque chose.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "Et cette attention peut être modeste. Un appel qu’on repousse. Une chose faite avec soin. Des excuses sans prétexte. Ce sont nos exemples, pas une liste de consignes laissée par Frankl.", + "delivery_chunks": [ + { + "text": "Et cette attention peut être modeste. Un appel qu’on repousse. Une chose faite avec soin. Des excuses sans prétexte. Ce sont nos exemples, pas une liste de consignes laissée par Frankl.", + "cue": "quiet conviction, conversational; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "Pour aujourd’hui, demandons-nous peut-être : qui ou quoi mérite mon attention ? Pas pour toujours. Juste aujourd’hui. Et si la réponse est le repos, ou accepter de l’aide, cela peut être un début sincère.", + "delivery_chunks": [ + { + "text": "Pour aujourd’hui, demandons-nous peut-être : qui ou quoi mérite mon attention ? Pas pour toujours. Juste aujourd’hui.", + "cue": "gentle invitation, with breathing space; easy, spontaneous, gently spoken" + }, + { + "text": "Et si la réponse est le repos, ou accepter de l’aide, cela peut être un début sincère.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "Nous n’avons pas résolu le sens de la vie. Mais nous avons quelqu’un avec qui partager la question. Et encore deux biscuits. Prenons notre temps pour les deux.", + "delivery_chunks": [ + { + "text": "Nous n’avons pas résolu le sens de la vie. Mais nous avons quelqu’un avec qui partager la question. Et encore deux biscuits. Prenons notre temps pour les deux.", + "cue": "warm closing; a soft smile; relaxed, unforced, like talking to a friend" + } + ] + } + ], + "translation_of": "script-spontaneous-en.json", + "translation_note": "Same content and speaker roles; localized by the coding assistant, with original sparse English performance cues." +} diff --git a/optimized_pipeline/script-spontaneous-nl.json b/optimized_pipeline/script-spontaneous-nl.json new file mode 100644 index 0000000000000000000000000000000000000000..a240188a5bcdbc93e9477185c194ba805f97c01e --- /dev/null +++ b/optimized_pipeline/script-spontaneous-nl.json @@ -0,0 +1,292 @@ +{ + "language": "nl", + "title": "Small Questions, Big Feelings — Meaning, Care and Viktor Frankl", + "hosts": [ + "Mira", + "Idris" + ], + "turns": [ + { + "index": 0, + "speaker": "S1", + "direction": "warm, intimate welcome; gently curious", + "text": "Welkom bij Kleine vragen, grote gevoelens. Vandaag: de zin van het leven. Idris, ik hoopte op een duidelijk antwoord. Het liefst iets wat ik kan onthouden terwijl ik mijn sleutels zoek.", + "delivery_chunks": [ + { + "text": "Welkom bij Kleine vragen, grote gevoelens. Vandaag: de zin van het leven. Idris, ik hoopte op een duidelijk antwoord.", + "cue": "warm, intimate welcome; gently curious; easy, spontaneous, gently spoken" + }, + { + "text": "Het liefst iets wat ik kan onthouden terwijl ik mijn sleutels zoek.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 1, + "speaker": "S2", + "direction": "affectionate dry humour; a small smile", + "text": "Ik heb koekjes meegenomen. Geen complete filosofie, maar ze maken onzekerheid een stuk gezelliger. Misschien kunnen we wat kleiner beginnen dan het hele universum uitleggen vóór de thee.", + "delivery_chunks": [ + { + "text": "Ik heb koekjes meegenomen. Geen complete filosofie, maar ze maken onzekerheid een stuk gezelliger. Misschien kunnen we wat kleiner beginnen dan het hele universum uitleggen vóór de thee.", + "cue": "affectionate dry humour; a small smile; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 2, + "speaker": "S1", + "direction": "thoughtful, sincere; let the question land", + "text": "Goed dan. Waarom voelt een gewone middag soms zo waardevol, terwijl een dag vol prestaties vreemd leeg kan aanvoelen? Wat is het verschil tussen druk zijn en echt leven?", + "delivery_chunks": [ + { + "text": "Goed dan. Waarom voelt een gewone middag soms zo waardevol, terwijl een dag vol prestaties vreemd leeg kan aanvoelen?", + "cue": "thoughtful, sincere; let the question land; soft natural delivery, thinking aloud" + }, + { + "text": "Wat is het verschil tussen druk zijn en echt leven?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 3, + "speaker": "S2", + "direction": "engaged and clear, without lecturing", + "text": "Viktor Frankl, de Oostenrijkse psychiater, stelde de zoektocht naar zin centraal in zijn benadering. Zijn vraag gaat verder dan plezier of succes: wat is belangrijk genoeg om erop te reageren?", + "delivery_chunks": [ + { + "text": "Viktor Frankl, de Oostenrijkse psychiater, stelde de zoektocht naar zin centraal in zijn benadering. Zijn vraag gaat verder dan plezier of succes: wat is belangrijk genoeg om erop te reageren?", + "cue": "engaged and clear, without lecturing; casual and sincere, unhurried" + } + ] + }, + { + "index": 4, + "speaker": "S1", + "direction": "curious, gently challenging", + "text": "Dus we zoeken niet naar één schitterende zin die ieders leven verklaart? Geen universele handleiding met een ontbrekende bladzijde en zo een onmogelijk klein schroevendraaiertje?", + "delivery_chunks": [ + { + "text": "Dus we zoeken niet naar één schitterende zin die ieders leven verklaart?", + "cue": "curious, gently challenging; gentle conversational flow, in the moment" + }, + { + "text": "Geen universele handleiding met een ontbrekende bladzijde en zo een onmogelijk klein schroevendraaiertje?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 5, + "speaker": "S2", + "direction": "lightly amused, then reflective", + "text": "Gelukkig hoef je niets in elkaar te zetten. Volgens Frankl ontdekken mensen betekenis in concrete situaties. Wat vanochtend voor jou telt, kan heel anders zijn dan wat tien jaar geleden belangrijk was.", + "delivery_chunks": [ + { + "text": "Gelukkig hoef je niets in elkaar te zetten. Volgens Frankl ontdekken mensen betekenis in concrete situaties. Wat vanochtend voor jou telt, kan heel anders zijn dan wat tien jaar geleden belangrijk was.", + "cue": "lightly amused, then reflective; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 6, + "speaker": "S1", + "direction": "warm, quietly moved", + "text": "Dat klinkt vriendelijker dan één perfecte roeping moeten vinden. Stel dat iemand een middag een buur helpt om boodschappen te dragen. Er gebeurt niets spectaculairs. Maar iemand komt thuis en voelt zich minder alleen.", + "delivery_chunks": [ + { + "text": "Dat klinkt vriendelijker dan één perfecte roeping moeten vinden. Stel dat iemand een middag een buur helpt om boodschappen te dragen.", + "cue": "warm, quietly moved; easy, spontaneous, gently spoken" + }, + { + "text": "Er gebeurt niets spectaculairs. Maar iemand komt thuis en voelt zich minder alleen.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 7, + "speaker": "S2", + "direction": "natural explanation with gentle emphasis", + "text": "Dat past bij een van Frankls wegen: wat we geven door ons handelen. Een andere is wat we ontvangen door ervaringen, schoonheid of liefde. Betekenis vraagt niet altijd dat we iets produceren.", + "delivery_chunks": [ + { + "text": "Dat past bij een van Frankls wegen: wat we geven door ons handelen. Een andere is wat we ontvangen door ervaringen, schoonheid of liefde. Betekenis vraagt niet altijd dat we iets produceren.", + "cue": "natural explanation with gentle emphasis; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 8, + "speaker": "S1", + "direction": "soft delight and recognition", + "text": "Naar een lied luisteren zonder op mijn telefoon te kijken. De dwaze moed zien van een bloem die tussen de stoeptegels groeit. Echt naar iemand luisteren, in plaats van ondertussen mijn slimme antwoord te bedenken.", + "delivery_chunks": [ + { + "text": "Naar een lied luisteren zonder op mijn telefoon te kijken. De dwaze moed zien van een bloem die tussen de stoeptegels groeit.", + "cue": "soft delight and recognition; soft natural delivery, thinking aloud" + }, + { + "text": "Echt naar iemand luisteren, in plaats van ondertussen mijn slimme antwoord te bedenken.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 9, + "speaker": "S2", + "direction": "playful self-awareness, then tender", + "text": "Mijn slimme antwoorden staan op een wachtlijst. Maar ja. Aandacht kan een vorm van vrijgevigheid zijn. Je hoeft niet iemands hele leven op te lossen om ruimte te maken in het jouwe.", + "delivery_chunks": [ + { + "text": "Mijn slimme antwoorden staan op een wachtlijst. Maar ja. Aandacht kan een vorm van vrijgevigheid zijn. Je hoeft niet iemands hele leven op te lossen om ruimte te maken in het jouwe.", + "cue": "playful self-awareness, then tender; casual and sincere, unhurried" + } + ] + }, + { + "index": 10, + "speaker": "S1", + "direction": "slower, vulnerable but not theatrical", + "text": "Nu het moeilijke deel. Hoe zit het met verdriet? Als degene die je wilt bellen er niet meer is, en een gewoon geluid in de keuken je die persoon ineens verschrikkelijk laat missen?", + "delivery_chunks": [ + { + "text": "Nu het moeilijke deel. Hoe zit het met verdriet?", + "cue": "slower, vulnerable but not theatrical; gentle conversational flow, in the moment" + }, + { + "text": "Als degene die je wilt bellen er niet meer is, en een gewoon geluid in de keuken je die persoon ineens verschrikkelijk laat missen?", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 11, + "speaker": "S2", + "direction": "compassionate, grounded; a small pause before answering", + "text": "Dan zou ik niet meteen met een les aankomen. Frankls derde weg gaat over onze houding tegenover onvermijdelijk lijden. Het is een mogelijkheid, geen verplichting om dankbaar te zijn voor pijn.", + "delivery_chunks": [ + { + "text": "Dan zou ik niet meteen met een les aankomen. Frankls derde weg gaat over onze houding tegenover onvermijdelijk lijden. Het is een mogelijkheid, geen verplichting om dankbaar te zijn voor pijn.", + "cue": "compassionate, grounded; a small pause before answering; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 12, + "speaker": "S1", + "direction": "firm but gentle", + "text": "En lijden dat we kunnen veranderen, moeten we veranderen. Vraag om hulp, verlaat de schadelijke situatie, deel de last. We zijn de wereld geen mooie verklaring schuldig voor alles wat pijn doet.", + "delivery_chunks": [ + { + "text": "En lijden dat we kunnen veranderen, moeten we veranderen. Vraag om hulp, verlaat de schadelijke situatie, deel de last.", + "cue": "firm but gentle; easy, spontaneous, gently spoken" + }, + { + "text": "We zijn de wereld geen mooie verklaring schuldig voor alles wat pijn doet.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 13, + "speaker": "S2", + "direction": "quiet reassurance, no grand speech", + "text": "Precies. Soms is de betekenisvolle daad iemand naast je laten zitten. Of zeggen: vandaag is moeilijk. Een leven verliest zijn waarde niet doordat degene die het leeft uitgeput is.", + "delivery_chunks": [ + { + "text": "Precies. Soms is de betekenisvolle daad iemand naast je laten zitten. Of zeggen: vandaag is moeilijk. Een leven verliest zijn waarde niet doordat degene die het leeft uitgeput is.", + "cue": "quiet reassurance, no grand speech; relaxed, unforced, like talking to a friend" + } + ] + }, + { + "index": 14, + "speaker": "S1", + "direction": "tender, painting a simple imagined scene", + "text": "Stel je een vader voor die zijn kind leert een fiets te repareren. Jaren later is het kind de uitleg vergeten. Maar zijn geduld blijft bij. Het gevoel dat fouten maken mocht.", + "delivery_chunks": [ + { + "text": "Stel je een vader voor die zijn kind leert een fiets te repareren. Jaren later is het kind de uitleg vergeten.", + "cue": "tender, painting a simple imagined scene; soft natural delivery, thinking aloud" + }, + { + "text": "Maar zijn geduld blijft bij. Het gevoel dat fouten maken mocht.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 15, + "speaker": "S2", + "direction": "gently moved, unhurried", + "text": "Dat is een mooie gedachte. Wat van ons blijft, is misschien een manier om mensen te behandelen. Een beetje meer geduld dat door de wereld reist, lang nadat de fiets is verroest.", + "delivery_chunks": [ + { + "text": "Dat is een mooie gedachte. Wat van ons blijft, is misschien een manier om mensen te behandelen. Een beetje meer geduld dat door de wereld reist, lang nadat de fiets is verroest.", + "cue": "gently moved, unhurried; casual and sincere, unhurried" + } + ] + }, + { + "index": 16, + "speaker": "S1", + "direction": "thoughtful, open rather than conclusive", + "text": "Misschien blijft het een mysterie. We kunnen anders denken over het universum en toch een moment herkennen dat om zorg vraagt. We hoeven niet overal zeker van te zijn om ergens van te houden.", + "delivery_chunks": [ + { + "text": "Misschien blijft het een mysterie. We kunnen anders denken over het universum en toch een moment herkennen dat om zorg vraagt.", + "cue": "thoughtful, open rather than conclusive; gentle conversational flow, in the moment" + }, + { + "text": "We hoeven niet overal zeker van te zijn om ergens van te houden.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 17, + "speaker": "S2", + "direction": "quiet conviction, conversational", + "text": "En zorg kan klein zijn. Een telefoontje dat je blijft uitstellen. Iets met aandacht maken. Je excuses aanbieden zonder uitvluchten. Dit zijn onze voorbeelden, geen lijstje dat Frankl ons heeft nagelaten.", + "delivery_chunks": [ + { + "text": "En zorg kan klein zijn. Een telefoontje dat je blijft uitstellen. Iets met aandacht maken. Je excuses aanbieden zonder uitvluchten. Dit zijn onze voorbeelden, geen lijstje dat Frankl ons heeft nagelaten.", + "cue": "quiet conviction, conversational; natural, lightly responsive, without performing" + } + ] + }, + { + "index": 18, + "speaker": "S1", + "direction": "gentle invitation, with breathing space", + "text": "Vraag je vandaag misschien af: wie of wat verdient mijn aandacht? Niet voor altijd. Alleen vandaag. En als het antwoord rust is, of iemand toelaten om te helpen, kan dat een eerlijk begin zijn.", + "delivery_chunks": [ + { + "text": "Vraag je vandaag misschien af: wie of wat verdient mijn aandacht? Niet voor altijd. Alleen vandaag.", + "cue": "gentle invitation, with breathing space; easy, spontaneous, gently spoken" + }, + { + "text": "En als het antwoord rust is, of iemand toelaten om te helpen, kan dat een eerlijk begin zijn.", + "cue": "gently, as a spontaneous thought" + } + ] + }, + { + "index": 19, + "speaker": "S2", + "direction": "warm closing; a soft smile", + "text": "We hebben de zin van het leven niet opgelost. Maar we hebben iemand om de vraag mee te delen. En nog twee koekjes. Laten we voor allebei de tijd nemen.", + "delivery_chunks": [ + { + "text": "We hebben de zin van het leven niet opgelost. Maar we hebben iemand om de vraag mee te delen. En nog twee koekjes. Laten we voor allebei de tijd nemen.", + "cue": "warm closing; a soft smile; relaxed, unforced, like talking to a friend" + } + ] + } + ], + "translation_of": "script-spontaneous-en.json", + "translation_note": "Same content and speaker roles; localized by the coding assistant, with original sparse English performance cues." +} diff --git a/optimized_pipeline/speaker_finish.py b/optimized_pipeline/speaker_finish.py new file mode 100644 index 0000000000000000000000000000000000000000..734de8a3f7a6a957ccd03bbd07d7aff8901fd8a9 --- /dev/null +++ b/optimized_pipeline/speaker_finish.py @@ -0,0 +1,158 @@ +"""Independent final audit and multilingual 50/50 speaker-reward listening report.""" +import argparse +import gc +import html +import json +from pathlib import Path +import shutil +import statistics +import time +from concurrent.futures import ProcessPoolExecutor +from recipe import HERE, WORKSPACE, SR, dump, errors, sha +from finish import export_episode # Resolve local module before setup edits sys.path. +from run import setup + +def page(out,receipts,config,times): + rows=[];cards=[] + prompting=('The original restrained turn-level direction is used. Repeated natural/authentic tags and extra sentence-by-sentence emotions are disabled.' + if config.get('prompt_style')=='legacy' else 'Sparse inline directions request easy, relaxed, gentle spontaneous speech. Original emotions stay restrained; at most one extra cue is placed inside alternating turns.' if config.get('prompt_style')=='spontaneous' else + 'Every sentence starts with the inline direction “Very genuine, very natural, very authentic”, followed by a context-appropriate, restrained emotion: curiosity, wonder, awe, skepticism, amusement, tenderness or sadness. These directions are not intended to be spoken.') + for r in receipts: + sec=round(r['seconds']);label=r['language'].upper() + rows.append(f"{label}{sec//60}:{sec%60:02d}{r['inference_seconds']:.1f} s{r['useful_rtf']:.3f}{r['mean_genuineness']:.3f}{r['mean_speaker_cosine']:.3f}{r['mean_wer']:.1%}") + stem=Path(r['file']).stem + cards.append(f"

{label} · Best-of-{config['n']}

Download MP3 · Scores and transcripts · Subtitles

Review turns (zero-based): {html.escape(str(r['review_turns']))}

") + refs=''.join(f"

{s}

" for s,v in config['references'].items()) + comparison='' + previous_path=out/'previous-bestof4-speaker-comparison.json' + if previous_path.exists(): + previous=json.loads(previous_path.read_text())['rows'];lines=[] + for r in receipts: + old=[p for p in previous if p['language']==r['language']] + if old: + lines.append(f"{r['language'].upper()}{statistics.mean(p['ecapa_cosine'] for p in old):.3f} → {r['mean_speaker_cosine']:.3f}{statistics.mean(p['genuineness'] for p in old):.3f} → {r['mean_genuineness']:.3f}") + if lines:comparison=f"

Comparison with the previous Best-of-4

{''.join(lines)}
LanguageSpeaker cosine · previous → newGenuineness / 6 · previous → new

Same reference embeddings and scripted content; both the reward and sentence directions changed. These are model-score means over twenty turns, not a blinded listening result or a claim of statistical significance. Per-turn comparison.

" + followup='' + if (out/'asr-review-en08.json').exists(): + followup="

ASR follow-up: English turn 8 has inconsistent recognizer output: the whole edited clip omits the final sentence in ASR, while ASR of its unchanged tail recognizes that sentence. The raw clip also yields it. The original diagnostic WER is retained; this flag is not proof of a missing spoken sentence. Turn 17 includes a Frankl/name segmentation mismatch. Additional recognition evidence.

" + (out/'index.html').write_text(f'''Podcast — genuineness and speaker identity + +

Podcast · spontaneous, gentle conversation

Episodes in the supplied script languages using the actual Podcast checkpoint, the same two published German reference clips, and complete-turn Best-of-{config['n']}. No streaming and no voice conversion.

+

Reward: 50% genuineness + 50% reference speaker similarity. Genuineness is clipped after division by 6. Speaker similarity is ECAPA cosine clipped to [0,1]. These are fixed scales, not per-batch min/max values. WER is a final diagnostic and does not influence selection. N=1 keeps the only take and skips online scoring; its quality metrics are computed in the final audit.

+
{''.join(rows)}
LanguageDurationGeneration + rankingUseful RTFGenuineness / 6Speaker cosineMean turn WER
+

RTF is generation/ranking time divided by final edited episode duration. Lower is faster; below 1 is faster than real time. Loading, timing probes, final audit and encoding are separate. Each shared batch is counted once, divided equally between its independent segments. This is not request-to-playback latency.

{''.join(cards)}
+

Performance directions

{prompting} The literal transcript is preserved from each supplied script; translated scripts carry the corresponding content in another language.

+

Speed changes

Multiple independent segments can share one policy batch, with N distinct takes per segment. Identical candidate prompts reuse prefill only when a real-model KV/hidden-state equality check passes. Acoustic decoding uses larger internal blocks; those blocks are not streamed. ECAPA references are cached once, candidate embeddings and genuineness are batched, and ASR is removed from ranking. The exact measured group-size choice and timing probes are in the manifest.

+

GPU occupancy and the selected execution mode are recorded in the manifest. Measurements across runs with different background workloads are not controlled speed comparisons. In phased mode, token generation and waveform decoding run in separate stages to reduce peak VRAM.

+{comparison}

Reference voices

{refs}

Quality limits

Speaker cosine is an approximate voice-identity cue, not a voice-verification guarantee. Maximizing these two model scores does not ensure an error-free transcript or the most enjoyable performance. The final audit scores the edited winner independently. Review flags are retained, not hidden by reselecting on WER.

{followup} +

Reproduce

Recipe and commands · Full measurements

{html.escape(json.dumps(times,indent=2))}
''') + +def main(a, resources=None): + setup(a.device) + import numpy as np + import soundfile as sf + import torch + from audit_alignment import BoundaryAligner + from generate import crop + from scoring import audio16 + from speaker_scoring import SpeakerScorer + torch.set_num_threads(4);torch.cuda.set_device(a.device) + runs=Path(a.runs).resolve();out=Path(a.output).resolve();out.mkdir(exist_ok=True,parents=True) + config=json.loads((runs/'configuration.json').read_text());(out/'references').mkdir(exist_ok=True) + for r in config['references'].values():shutil.copyfile(HERE/r['path'],out/'references'/Path(r['path']).name) + shutil.copyfile(HERE/'references/PROVENANCE.json',out/'references/PROVENANCE.json') + manual=(HERE/'SPEAKER_RECIPE.md').read_text() + manual=manual.replace('../podcast_pipeline/','https://github.com/LAION-AI/Humaneness-Voice/tree/main/podcast_pipeline/').replace('../optimized_pipeline/','https://huggingface.co/laion/Humanness-Voice-Podcast/tree/main/optimized_pipeline/') + manual=manual.replace('../docs/PODCAST_EXPERIMENT_HISTORY.md','https://github.com/LAION-AI/Humaneness-Voice/blob/main/docs/PODCAST_EXPERIMENT_HISTORY.md').replace('../guides/PODCAST_EXPERIMENT_HISTORY.md','https://huggingface.co/laion/Humanness-Voice-Podcast/blob/main/guides/PODCAST_EXPERIMENT_HISTORY.md') + (out/'PIPELINE.md').write_text(manual) + tick=time.perf_counter();owns_models=resources is None + if owns_models: + scorer=SpeakerScorer(a.device,config['references'],load_asr=True,asr_url=a.asr_url);aligner=BoundaryAligner(a.device) + else:scorer,aligner=resources + assert aligner.ok + targets=torch.stack(list(scorer.targets.values())) + dump(runs/'reference-controls.json',dict(speakers=list(scorer.targets),cosine=(targets@targets.T).cpu().tolist(), + seconds=scorer.reference_seconds,dimensions=int(targets.shape[-1]))) + load_s=time.perf_counter()-tick;audit_start=time.perf_counter();rows=[];pending=[] + for path in sorted(runs.glob('*/*/result.json')): + folder=path.parent + if (folder/'audited.json').exists():rows.append(json.loads((folder/'audited.json').read_text()));continue + row=json.loads(path.read_text());wave,sr=sf.read(folder/'raw.flac',dtype='float32');assert sr==SR + tick=time.perf_counter();align,alignment_meta=aligner.align(audio16(wave),row['turn']['text'].split(),language=row['language']) + good=bool(align) and all(w[3]>.5 for w in align) + first,last=(float(align[0][1]),float(align[-1][2])) if good else (0.,len(wave)/SR) + good=good and 0<=first.15 or not align['alignment_ok'], + wall_seconds=align_s+(timing['scoring_seconds']+asr_s)/len(group)) + dump(Path(row['source_folder'])/'audited.json',row);rows.append(row) + print('AUDIT',row['language'],row['turn']['index'],'WER',round(err['wer'],3),'ECAPA',round(score['ecapa_cosine'],3),flush=True) + # Measure the earlier whole-turn winners against the SAME cached targets. + # This is a paired-content comparison, not an isolated prompt/reward ablation. + previous=[] + old_paths=sorted((HERE/'runs/bestof4').glob('*/audited.json')) + for offset in range(0,len(old_paths),4): + old=[json.loads(p.read_text()) for p in old_paths[offset:offset+4]] + waves=[sf.read(r['edited'],dtype='float32')[0] for r in old] + vectors=scorer.embed([audio16(w) for w in waves]) + target=torch.stack([scorer.targets[r['turn']['speaker']] for r in old]) + similarities=(vectors*target).sum(-1).cpu().tolist() + previous.extend(dict(language=r['language'],turn=r['turn']['index'],ecapa_cosine=float(s), + genuineness=r['audit']['ears']['genuineness_0_6'],wer=r['audit']['wer'], + source=r['edited']) for r,s in zip(old,similarities)) + dump(out/'previous-bestof4-speaker-comparison.json',dict(rows=previous, + note='Same scripts/references, but both sentence prompting and reward changed. GPU contention also changed. Not an isolated causal ablation.')) + audit_s=time.perf_counter()-audit_start + if owns_models:del scorer,aligner;gc.collect();torch.cuda.empty_cache() + dump(runs/'gpu-finished.json',dict(audit_load_seconds=load_s,audit_seconds=audit_s,finished_unix=time.time())) + groups={} + for r in rows:groups.setdefault((r['variant'],r['language']),[]).append(r) + tick=time.perf_counter() + jobs=[(name,lang,sorted(rs,key=lambda r:r['turn']['index']),str(out)) for (name,lang),rs in sorted(groups.items())] + with ProcessPoolExecutor(max_workers=2) as pool:receipts=list(pool.map(export_episode,jobs)) + for r in receipts: + rs=groups[(r['variant'],r['language'])] + r['mean_speaker_cosine']=statistics.mean(row['audit']['ecapa_cosine'] for row in rs) + old=out/r.pop('untrimmed_stream_file');new=old.with_name(old.name.replace('-untrimmed-stream','-untrimmed')) + old.replace(new);r['untrimmed_file']=new.name + times=dict(generation=json.loads((runs/'generation-complete.json').read_text()),audit_load_seconds=load_s, + audit_seconds=audit_s,export_wall_seconds=time.perf_counter()-tick) + if (runs/'process-start.json').exists(): + created=json.loads((runs/'process-start.json').read_text())['created_unix'] + if config.get('execution','').startswith('phased'): + times['phase_timing_note']='Token and codec/ranking costs are summed per batch. Shared loading, correctness checks and inter-phase waiting are recorded in the parent comparison receipt; this is not per-mode request latency.' + else: + times['cold_setup_tests_and_pilot_seconds']=times['generation']['finished_unix']-times['generation']['production_seconds']-created + if config.get('execution','').startswith('phased'): + times['phase_start_to_exports_seconds']=time.time()-created + times['cold_timing_note']='Elapsed since this N phase began, including waiting for the other N mode and shared later stages; excludes prior shared loading. Use the parent comparison receipt for complete process-to-exports latency.' + else: + times['full_experiment_to_exports_seconds']=time.time()-created + times['cold_timing_note']='Includes this run’s model loading, correctness checks, cold CUDA compilation, timing probes, generation, final audit and MP3 export; excludes TTS service restoration.' + manifest=dict(configuration=config,episodes=receipts,stage_times=times, + speed_pilot=json.loads((runs/'speed-pilot.json').read_text()), + prefill_checks=json.loads((runs/'prefill-checks.json').read_text()), + previous_speaker_comparison='previous-bestof4-speaker-comparison.json', + generated_from=str(runs),code_sha256={p.name:sha(p) for p in HERE.glob('*.py')}) + dump(out/'manifest.json',manifest);page(out,receipts,config,times) + print('EXPORTED',len(receipts),'episodes',out,flush=True) + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--runs',required=True);p.add_argument('--output',required=True) + p.add_argument('--device',default='cuda:0');p.add_argument('--asr-url') + main(p.parse_args()) diff --git a/optimized_pipeline/speaker_run.py b/optimized_pipeline/speaker_run.py new file mode 100644 index 0000000000000000000000000000000000000000..70464db06fb679604e7cb342b20c0a9f1ab7a8ed --- /dev/null +++ b/optimized_pipeline/speaker_run.py @@ -0,0 +1,144 @@ +#!/usr/bin/env python3 +"""Generate fresh, offline Best-of-N podcasts with a 50/50 identity reward.""" +import argparse +import json +import os +from pathlib import Path +import time +from concurrent.futures import ThreadPoolExecutor +from archive import archive_batch +from recipe import HERE, WORKSPACE, GENERAL, MODEL_REPO, MODEL_REVISION, dump, sha, specification +from run import setup +from languages import LANGUAGE_SEEDS + +def main(a, resources=None): + if not 1 <= a.n <= 16 or a.groups < 0 or a.groups*a.n > 16 or a.limit < 0: + raise ValueError("N must be 1..16; groups*N <=16; limit must be nonnegative") + setup(a.device) + import numpy as np + import torch + import soundfile as sf + from safetensors.torch import save_file + from generation import Generator + from offline_batch import OfflineBatch + from speaker_scoring import SpeakerScorer, FORMULA, ECAPA_REPO, ECAPA_REVISION + torch.set_num_threads(4);torch.cuda.set_device(a.device);torch._dynamo.config.cache_size_limit=64 + out=Path(a.output).resolve();out.mkdir(parents=True,exist_ok=True) + from inputs import load_inputs + refs,scripts,jobs=load_inputs(a) + config=dict(model=MODEL_REPO,revision=MODEL_REVISION,general=GENERAL,references=refs, + reference_codes_sha256={s:sha(HERE/r['codes']) for s,r in refs.items() if r.get('codes')}, + scripts={str(p):sha(p) for p in scripts},effective_jobs=[[lang,t] for lang,t in jobs],n=a.n,mode='offline-turn',temperature=1.,cfg=2.5, + reward=FORMULA,speaker_model=ECAPA_REPO,speaker_revision=ECAPA_REVISION, + wer_role='final audit only; no multiplier or eligibility filter',voice_conversion=False, + optimization_flags={k:v for k,v in os.environ.items() if k.startswith('HVS_') and not k.endswith('CACHE')}, + prompt_style=a.prompt_style,requested_groups=a.groups,archive_mode='bounded-cpu-thread', + sentence_prompt=('Original single turn-level direction; no repeated sentence tags' if a.prompt_style=='legacy' + else 'Sparse spontaneous, relaxed, gentle inline cues' if a.prompt_style=='spontaneous' else 'Very genuine, very natural, very authentic; context-appropriate emotion'),device=a.device) + if (out/'configuration.json').exists():assert json.loads((out/'configuration.json').read_text())==config + else:dump(out/'configuration.json',config) + source_hashes={str(p.relative_to(HERE)):sha(p) for p in list(HERE.glob('*.py'))+list((HERE/'runtime').glob('*.py'))} + stamp=out/'source-files.json' + if stamp.exists(): + if json.loads(stamp.read_text()) != source_hashes:raise ValueError('Runtime changed; use a new output directory') + else:dump(stamp,source_hashes) + tick=time.perf_counter() + owns_models=resources is None + if resources is None: + scorer=SpeakerScorer(a.device,refs) if a.n>1 else None + g=Generator(a.model,refs,a.device) + else: + g,scorer=resources + offline=OfflineBatch(g) + g.engine.fast.semantic.limit=2;g.engine.fast.graph_limit=2 + load_s=time.perf_counter()-tick + if scorer is not None: + targets=torch.stack(list(scorer.targets.values())) + dump(out/'reference-controls.json',dict(speakers=list(scorer.targets),cosine=(targets@targets.T).cpu().tolist(), + seconds=scorer.reference_seconds,dimensions=int(targets.shape[-1]))) + save_file({s:v.cpu() for s,v in scorer.targets.items()},str(out/'reference-embeddings.safetensors')) + # Real-model regression: the generic batching path reproduces the existing + # one-segment runner before enabling prefill reuse or larger groups. + if a.n in (1,2,4): + language,turn=jobs[0];seed=81108 + expected,code,_,_=g.run(turn,language,n=a.n,mode='turn',chunk_frames=13,max_frames=39,seed=seed,force_winner=0) + offline.shared=False + waves,codes,_=offline.synthesize(jobs[:1],n=a.n,chunk_frames=13,max_frames=39,seed=seed) + check=dict(same_codes=bool(torch.equal(code,codes[0])),same_pcm=bool(np.array_equal(expected,waves[0]))) + dump(out/'offline-regression.json',check);assert all(check.values()),check + offline.shared=True + offline.check_prefill(jobs[:1],a.n) + if len(jobs)>1:offline.check_prefill(jobs[:2],a.n) + dump(out/'prefill-checks.json',dict(enabled=offline.shared,checks=offline.prefill_checks)) + if not 0<=a.groups<=16//a.n:raise ValueError("groups * N must be <=16") + if a.groups: + groups=a.groups + dump(out/"speed-pilot.json",dict(probes=[],selected_groups=groups,n=a.n,note="Explicit measured batch configuration; timing sweep omitted, correctness checks retained")) + else: + # Fixed 104-frame timing probes; truncated probe audio is NEVER an episode. + probes=[] + for count in (1,2): + if count*a.n>16 or count>len(jobs):continue + for repetition in range(2): + _,_,perf=offline.synthesize(jobs[:count],n=a.n,max_frames=104,chunk_frames=26,seed=82108) + probes.append(dict(**perf,repetition=repetition,seconds_per_segment=perf['wall_seconds']/count)) + print('SPEED PROBE',count,repetition,round(perf['wall_seconds'],3),flush=True) + warm=[p for p in probes if p['repetition']==1] + groups=min(warm,key=lambda p:p['seconds_per_segment'])['groups'] + dump(out/'speed-pilot.json',dict(probes=probes,selected_groups=groups,n=a.n, + note='One-segment probe uses the first English turn; two-segment probe uses the first two. Fixed 104-frame cap, warm second repeat. Normalized per-segment comparison is approximate. Probe audio is incomplete and discarded. Different batch shapes change random draws; not an audio-quality comparison.')) + if groups>2:offline.check_prefill(jobs[:min(groups,len(jobs))],a.n) + dump(out/'prefill-checks.json',dict(enabled=offline.shared,checks=offline.prefill_checks)) + print('PRODUCTION groups',groups,'N',a.n,'total candidates',groups*a.n,flush=True) + production_start=time.perf_counter();written=0 + batch_file=out/"production-batches.json" + batches=json.loads(batch_file.read_text()) if batch_file.exists() else [] + pool=ThreadPoolExecutor(max_workers=1,thread_name_prefix="podcast-archive") + archive_job=None;archive_stats=[];archive_wait_s=0. + for language in dict.fromkeys(lang for lang,_ in jobs): + pending=[job for job in jobs if job[0]==language] + for offset in range(0,len(pending),groups): + batch=pending[offset:offset+groups] + if all((out/f'bestof{a.n}-speaker5050'/f"{language}-{t['index']:02d}"/'result.json').exists() for _,t in batch):continue + seed=202611080+LANGUAGE_SEEDS[language]+batch[0][1]['index']*31 + tick=time.perf_counter();waves,codes,perf=offline.synthesize(batch,n=a.n,chunk_frames=26,seed=seed) + if a.n==1: + scores=[dict(reward=None,ranking_skipped=True,reference_speaker=t['speaker']) for _,t in batch] + timing=dict(ears_seconds=0.,speaker_seconds=0.,scoring_seconds=0.) + else: + scores,timing=scorer.score_speakers(waves,[t['speaker'] for _,t in batch for _ in range(a.n)]) + total_s=time.perf_counter()-tick + perf.update(timing,batch_wall_seconds=total_s,wall_seconds=total_s/len(batch)) + indices=[t['index'] for _,t in batch] + batches=[b for b in batches if not (b['language']==language and b['turns']==indices)] + batches.append(dict(language=language,turns=indices,**perf)) + dump(out/'production-batches.json',batches) + # At most one previous batch is writing while this GPU batch runs. + if archive_job is not None: + wait=time.perf_counter();archive_stats.append(archive_job.result());archive_wait_s+=time.perf_counter()-wait + archive_job=pool.submit(archive_batch,out,batch,waves,codes,scores,perf,refs,a.n,total_s) + written+=len(batch) + if archive_job is not None: + wait=time.perf_counter();archive_stats.append(archive_job.result());archive_wait_s+=time.perf_counter()-wait + pool.shutdown(wait=True) + dump(out/'archive-timing.json',dict(batches=archive_stats,blocked_seconds=archive_wait_s, + cpu_seconds=sum(x['seconds'] for x in archive_stats),bounded_pending_batches=1)) + if owns_models:g.close() + dump(out/'generation-complete.json',dict(load_seconds=load_s,production_seconds=time.perf_counter()-production_start, + turns=len(jobs),new_or_replayed_turns=written,n=a.n,groups=groups,finished_unix=time.time())) + print('GENERATION COMPLETE',flush=True) + return g,scorer + +def arguments(argv=None): + p=argparse.ArgumentParser(description=__doc__) + p.add_argument('--model',required=True) + p.add_argument('--output',default=str(HERE/'outputs/podcast/generation')) + p.add_argument('--prompt-style',choices=['legacy','sentence','spontaneous'],default='spontaneous', + help='Approved sparse spontaneous/gentle inline cues; legacy and sentence reproduce earlier experiments') + p.add_argument('--script',action='append',help='JSON script; repeat for multiple languages. Defaults to the two bundled approved episodes.') + p.add_argument('--references',default=str(HERE/'references.json'),help='Reference mapping JSON; paths relative to its directory') + p.add_argument('--groups',type=int,default=0,help='0 measures automatic choice; explicit group count skips only timing sweep') + p.add_argument('--device',default='cuda:0');p.add_argument('--n',type=int,default=4);p.add_argument('--limit',type=int,default=0) + return p.parse_args(argv) + +if __name__=='__main__':main(arguments()) diff --git a/optimized_pipeline/speaker_scoring.py b/optimized_pipeline/speaker_scoring.py new file mode 100644 index 0000000000000000000000000000000000000000..0a1b8fe1901fa956467940038f09574432be9f2a --- /dev/null +++ b/optimized_pipeline/speaker_scoring.py @@ -0,0 +1,78 @@ +"""Exactly 50% native-normalized genuineness + 50% reference ECAPA cosine. + +WER is a final diagnostic, never a multiplier or candidate eligibility gate. +Reference embeddings are computed once and reused. No per-batch normalization. +""" +import math +import time +from pathlib import Path +import numpy as np +import soundfile as sf +import torch +from scipy.signal import resample_poly +from recipe import references +from scoring import Scorer, audio16 + +ECAPA_REPO = 'speechbrain/spkrec-ecapa-voxceleb' +ECAPA_REVISION = '0f99f2d0ebe89ac095bcc5903c4dd8f72b367286' +FORMULA = '0.5*clip(genuineness/6,0,1) + 0.5*clip(ecapa_cosine,0,1)' + +def speaker_reward(genuineness, cosine): + if not all(math.isfinite(x) for x in (genuineness, cosine)): + raise ValueError('Non-finite speaker reward') + return .5*max(0., min(1., genuineness/6.)) + .5*max(0., min(1., cosine)) + +class SpeakerScorer(Scorer): + def __init__(self, device, reference_config, load_asr=False,asr_url=None): + super().__init__(device, asr_url=asr_url, load_asr=load_asr) + from speechbrain.inference.speaker import EncoderClassifier + from huggingface_hub import snapshot_download + import settings + root = snapshot_download(ECAPA_REPO, revision=ECAPA_REVISION, + cache_dir=str(Path(settings.HF_CACHE)/'hub'), local_files_only=True, + allow_patterns=['hyperparams.yaml','*.ckpt','label_encoder.txt']) + self.ecapa = EncoderClassifier.from_hparams(source=root, + overrides={'pretrained_path':root}, + savedir=str(Path(settings.HF_CACHE)/'small-ecapa-pinned'), + run_opts={'device':device}) + self.ecapa.eval() + self.targets={} + for speaker,path in references(reference_config).items(): + x,sr=sf.read(path,dtype='float32',always_2d=True) + divisor=math.gcd(sr,16000) + x=resample_poly(x.mean(1),16000//divisor,sr//divisor).astype(np.float32) + self.targets[speaker]=self.embed([x])[0] + self.reference_seconds={s:sf.info(p).duration for s,p in references(reference_config).items()} + + @torch.inference_mode() + def embed(self,waves16): + vectors=[] + # ECAPA's activation footprint grows with duration. Bound just this stage. + for offset in range(0,len(waves16),4): + group=waves16[offset:offset+4] + length=max(len(x) for x in group) + x=np.zeros((len(group),length),np.float32) + for i,w in enumerate(group):x[i,:len(w)]=w + lens=torch.tensor([len(w)/length for w in group],device=self.device) + with torch.autocast('cuda',enabled=False): + v=self.ecapa.encode_batch(torch.from_numpy(x).to(self.device),wav_lens=lens).reshape(len(group),-1).float() + assert torch.isfinite(v).all() and bool((v.norm(dim=-1)>1e-8).all()) + vectors.append(torch.nn.functional.normalize(v,dim=-1)) + return torch.cat(vectors) + + @torch.inference_mode() + def score_speakers(self,waves,speakers): + assert len(waves)==len(speakers) + tick=time.perf_counter() + x=[audio16(w) for w in waves] + x=[np.pad(w,(0,max(0,4800-len(w)))) for w in x] + quality,ears_s=self.quality(x) + start=time.perf_counter() + vectors=self.embed(x) + target=torch.stack([self.targets[s] for s in speakers]) + cosine=(vectors*target).sum(-1).clamp(-1,1).cpu().tolist() + speaker_s=time.perf_counter()-start + rows=[dict(ears=q,ecapa_cosine=float(c),genuineness_normalized=float(np.clip(q['genuineness_0_6']/6,0,1)), + speaker_similarity_normalized=float(np.clip(c,0,1)),reward=speaker_reward(q['genuineness_0_6'],c),reference_speaker=s) + for q,c,s in zip(quality,cosine,speakers)] + return rows,dict(ears_seconds=ears_s,speaker_seconds=speaker_s,scoring_seconds=time.perf_counter()-tick) diff --git a/optimized_pipeline/test_contracts.py b/optimized_pipeline/test_contracts.py new file mode 100644 index 0000000000000000000000000000000000000000..b337b6455ae142e83b01516b51136ddccb4e4cfa --- /dev/null +++ b/optimized_pipeline/test_contracts.py @@ -0,0 +1,69 @@ +"""Meaningful failure cases for prefix selection and immutable CFG cache forking.""" +import unittest +from recipe import errors, reward, GENERAL, chunk_choice + +class RewardTests(unittest.TestCase): + def test_unspoken_suffix_is_free_but_internal_omission_is_not(self): + self.assertEqual(errors('one two three four','one two',False)['wer'],0) + self.assertGreater(errors('one two three four','one three',False)['wer'],0) + self.assertEqual(errors('one two three four','one two',True)['wer'],.5) + def test_silence_cannot_be_a_perfect_prefix(self): + self.assertEqual(errors('hello world','',False)['wer'],1) + self.assertEqual(errors('hello world','',False)['matched_words'],0) + def test_genuineness_no_ce_and_finite_at_zero_wer(self): + self.assertAlmostEqual(reward(3,0),.5) + self.assertGreater(reward(4,.1),reward(3,.1)) + with self.assertRaises(ValueError): reward(float('nan'),0) + def test_prompt(self): + self.assertIn('Very authentic, very genuine',GENERAL) + self.assertNotIn('pleasant',GENERAL.lower()) + self.assertNotIn('nice to listen',GENERAL.lower()) + def test_wrong_ending_cannot_displace_better_unfinished_candidate(self): + prefix='Vielleicht bleibt das große Rätsel offen Wir können über die Welt verschieden denken und trotzdem spüren dass jetzt jemand Zuwendung braucht ' + text=prefix+'Wir müssen nicht alles wissen bevor wir etwas lieben dürfen' + hypotheses=[prefix+'Wir müssen nicht alles wissen bevor wir nicht mehr wissen', + prefix+'Wir müssen nicht alles wissen bevor'] + scores=[dict(**errors(text,h,False),asr=h,reward=r) for h,r in zip(hypotheses,[.65,.70])] + self.assertLessEqual(scores[0]['wer'],.12) + self.assertEqual(scores[0]['matched_words'],len(text.split())) + winner,complete,_=chunk_choice(scores,text,[False,False]) + self.assertEqual(winner,1);self.assertFalse(complete) + scores[1]=dict(**errors(text,text,False),asr=text,reward=.70) + winner,complete,_=chunk_choice(scores,text,[False,False]) + self.assertEqual(winner,1);self.assertTrue(complete) + +class StateTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + from run import setup + setup('cpu') + def test_cfg_rows_and_graph_addresses_survive_fork(self): + import torch + from types import SimpleNamespace + from generation import fork_semantic + cache=torch.arange(4*5*2).reshape(4,5,2).float() + bank=SimpleNamespace(device='cpu',cache=[(cache,cache.clone())], + allowed=torch.ones(4,5,dtype=torch.bool),ids=torch.arange(4).reshape(4,1,1), + query_valid=torch.ones(4,1,1,dtype=torch.bool)) + before=cache.clone();address=cache.data_ptr() + indexes=fork_semantic(bank,1,2,2,3) + self.assertEqual(indexes.tolist(),[1,1,3,3]) + self.assertEqual(cache.data_ptr(),address) + self.assertTrue(torch.equal(cache[:,:3],before[[1,1,3,3],:3])) + cache[0,0,0]=-999 + self.assertNotEqual(cache[1,0,0].item(),-999) + def test_codec_fork_preserves_addresses_without_aliasing(self): + import torch + from types import SimpleNamespace + from generation import fork_codec + state=SimpleNamespace(offset=torch.tensor([4,9]),cache=torch.arange(12).reshape(2,3,2).float()) + module=SimpleNamespace(_streaming_state=state) + codec=SimpleNamespace(decoder=SimpleNamespace(modules=lambda:[module])) + addr=state.cache.data_ptr();before=state.cache.clone() + fork_codec(codec,torch.tensor([1,1]),2) + self.assertEqual(state.cache.data_ptr(),addr) + self.assertTrue(torch.equal(state.cache,before[[1,1]])) + state.cache[0,0,0]=-999 + self.assertNotEqual(state.cache[1,0,0].item(),-999) + +if __name__=='__main__': unittest.main() diff --git a/optimized_pipeline/test_inputs.py b/optimized_pipeline/test_inputs.py new file mode 100644 index 0000000000000000000000000000000000000000..2df5a4d78b76b2c0b006b5b6302ec2f79d089d83 --- /dev/null +++ b/optimized_pipeline/test_inputs.py @@ -0,0 +1,39 @@ +import unittest,json,tempfile +from pathlib import Path +from speaker_run import arguments +from inputs import load_inputs +from recipe import HERE,specification +class InputTests(unittest.TestCase): + def test_default_is_listener_approved_spontaneous(self): + a=arguments(['--model','unused']);self.assertEqual(a.prompt_style,'spontaneous') + refs,scripts,jobs=load_inputs(a) + self.assertEqual(len(jobs),40) + for lang,t in jobs:self.assertEqual(' '.join(x['text'] for x in t['delivery_chunks']),t['text']) + def test_invalid_rewritten_spoken_text_is_rejected(self): + with tempfile.TemporaryDirectory() as folder: + p=Path(folder)/'script.json';p.write_text(json.dumps(dict(language='en',turns=[dict(speaker='S1',text='Hello there.',delivery_chunks=[dict(text='Different words.',cue='gentle')])])) ) + a=arguments(['--model','unused','--script',str(p)]) + with self.assertRaises(ValueError):load_inputs(a) + def test_single_turn_adds_style_but_preserves_words(self): + with tempfile.TemporaryDirectory() as folder: + p=Path(folder)/'script.json';p.write_text(json.dumps(dict(language='de',turns=[dict(speaker='S1',text='Ein kleiner Moment reicht.')])) ) + a=arguments(['--model','unused','--script',str(p)]) + _,_,jobs=load_inputs(a);t=jobs[0][1] + self.assertEqual(t['text'],'Ein kleiner Moment reicht.') + self.assertIn('relaxed, spontaneous, gently spoken',specification(t,'de')['prompt']) + +class MultilingualTests(unittest.TestCase): + def test_five_language_conditioning_and_preserved_chunks(self): + from languages import language_name + for lang,name in [('nl','Dutch'),('fr','French'),('es','Spanish')]: + a=arguments(['--model','unused','--script',str(HERE/f'script-spontaneous-{lang}.json')]);_,_,jobs=load_inputs(a) + self.assertEqual(language_name(lang),name);self.assertEqual(len(jobs),20) + for code,t in jobs: + self.assertEqual(code,lang);self.assertEqual(' '.join(c['text'] for c in t['delivery_chunks']),t['text']) + def test_boundary_fallback_rejects_missing_end(self): + from audit_alignment import transcript_supports_edges + self.assertTrue(transcript_supports_edges('Dit is een mooie dag.','Dit is een mooie dag.')) + self.assertFalse(transcript_supports_edges('Dit is een mooie dag.','Dit is een mooie')) + self.assertFalse(transcript_supports_edges('Dit is een mooie dag.','')) + +if __name__=='__main__':unittest.main() diff --git a/optimized_pipeline/test_speaker_recipe.py b/optimized_pipeline/test_speaker_recipe.py new file mode 100644 index 0000000000000000000000000000000000000000..4bc10d117bca6b4a4b91e131d01da9e00498b79d --- /dev/null +++ b/optimized_pipeline/test_speaker_recipe.py @@ -0,0 +1,25 @@ +import json +import unittest +from pathlib import Path +from recipe import specification, HERE + +class SpeakerRecipeTests(unittest.TestCase): + def test_each_sentence_is_directed_without_changing_spoken_text(self): + for lang in ('en','de'): + original=json.loads((HERE/f'script-{lang}.json').read_text()) + current=json.loads((HERE/f'script-speaker-{lang}.json').read_text()) + for old,turn in zip(original['turns'],current['turns']): + self.assertEqual(old['text'],turn['text']) + self.assertEqual(' '.join(s['text'] for s in turn['sentences']),turn['text']) + prompt=specification(turn,lang)['prompt'] + self.assertEqual(prompt.count('(Very genuine, very natural, very authentic;'),len(turn['sentences'])) + self.assertNotIn('pleasant',prompt.lower()) + + def test_equal_weights_and_no_wer_gate(self): + from speaker_scoring import speaker_reward + self.assertAlmostEqual(speaker_reward(3,.8),.65) + self.assertAlmostEqual(speaker_reward(6,0),speaker_reward(0,1)) + self.assertEqual(speaker_reward(100,-1),.5) + with self.assertRaises(ValueError):speaker_reward(float('nan'),.5) + +if __name__=='__main__':unittest.main() diff --git a/optimized_pipeline/test_spontaneous.py b/optimized_pipeline/test_spontaneous.py new file mode 100644 index 0000000000000000000000000000000000000000..f4d206769ee1c39766477a417092ce1100360f27 --- /dev/null +++ b/optimized_pipeline/test_spontaneous.py @@ -0,0 +1,25 @@ +import json,tempfile,unittest +from pathlib import Path +from unittest.mock import patch +from recipe import HERE,specification +class SpontaneousTests(unittest.TestCase): + def test_exact_words_and_sparse_cues(self): + for lang in ('en','de'): + original=json.loads((HERE/f'script-{lang}.json').read_text())['turns'] + new=json.loads((HERE/f'script-spontaneous-{lang}.json').read_text())['turns'] + self.assertEqual(len(new),len(original)) + for a,b in zip(original,new): + self.assertEqual(a['text'],b['text']);self.assertEqual(a['speaker'],b['speaker']) + self.assertEqual(' '.join(c['text'] for c in b['delivery_chunks']),a['text']) + self.assertLessEqual(len(b['delivery_chunks']),2) + self.assertIn('Very authentic, very genuine',specification(b,lang)['prompt']) + self.assertNotIn('sentences',b) + def test_failed_archive_does_not_publish_complete_receipt(self): + from archive import archive_batch + with tempfile.TemporaryDirectory() as tmp: + turn=dict(index=0,speaker='S1',text='Hello.',direction='warm') + with patch('archive.sf.write',side_effect=OSError('disk full')): + with self.assertRaises(OSError): + archive_batch(tmp,[('en',turn)],[None],[None],[{'reward':1}],{}, {},1,1) + self.assertFalse(list(Path(tmp).rglob('result.json'))) +if __name__=='__main__':unittest.main() diff --git a/optimized_pipeline/verify_artifacts.py b/optimized_pipeline/verify_artifacts.py new file mode 100644 index 0000000000000000000000000000000000000000..424c554abe1ae99af92383a927a394410d326308 --- /dev/null +++ b/optimized_pipeline/verify_artifacts.py @@ -0,0 +1,55 @@ +"""Check exported episodes and their strict 50/50 speaker-selection artifacts.""" +import argparse +import json +from pathlib import Path +import subprocess +import numpy as np +import soundfile as sf +from recipe import HERE, WORKSPACE, sha, dump +from speaker_scoring import speaker_reward + +p=argparse.ArgumentParser();p.add_argument('output');a=p.parse_args() +out=Path(a.output).resolve() +m=json.loads((out/'manifest.json').read_text());runs=Path(m['generated_from']) +n=m['configuration']['n'] +assert m['episodes'] and 1<=n<=16 +assert not m['configuration']['voice_conversion'] +assert 'no multiplier' in m['configuration']['wer_role'] +turn_count=0;reviews=[] +for e in m['episodes']: + path=out/e['file'];assert sha(path)==e['sha256'] + probe=json.loads(subprocess.check_output(['ffprobe','-v','error','-show_streams','-of','json',str(path)],text=True)) + s=probe['streams'][0];assert s['codec_name']=='mp3' and s['channels']==1 and int(s['sample_rate'])==48000 + rows=json.loads(path.with_suffix('.audit.json').read_text());assert rows + target=[t for lang,t in m['configuration'].get('effective_jobs',[]) if lang==e['language']] + if target:assert [r['turn'] for r in rows]==target + for r in rows: + p=r['performance'];scores=p['final_scores'];assert len(scores)==n + expected=0 if n==1 else max(range(n),key=lambda i:(scores[i]['reward'],-i));assert p['winner']==expected + for score in scores: + assert score['reference_speaker']==r['turn']['speaker'] + if n==1:assert score['ranking_skipped'] and score['reward'] is None + else:assert abs(score['reward']-speaker_reward(score['ears']['genuineness_0_6'],score['ecapa_cosine']))<1e-9 + folder=Path(r['source_folder']);raw,sr=sf.read(folder/'raw.flac',dtype='float32') + chosen,sr2=sf.read(folder/f'candidate-{expected}.flac',dtype='float32') + assert sr==sr2==48000 and np.array_equal(raw,chosen) + assert np.isfinite(raw).all() and np.sqrt(np.mean(raw*raw))>.001 + from recipe import specification + assert r['prompt']==specification(r['turn'],r['language'])['prompt'] + if r['audit']['review_required']:reviews.append([r['language'],r['turn']['index'],r['audit']['wer']]) + turn_count+=1 + timeline=json.loads(path.with_suffix('.timeline.json').read_text()) + for a,b in zip(timeline,timeline[1:]):assert abs(b['speech_start_s']-a['speech_end_s']-.4)<1/48000 + batch=json.loads((runs/'production-batches.json').read_text()) + assert abs(e['inference_seconds']-sum(b['batch_wall_seconds'] for b in batch if b['language']==e['language']))<1e-6 +if (runs/'token-regression.json').exists(): + assert json.loads((runs/'token-regression.json').read_text())['shared_and_full_prefill_codes_equal'] + assert (runs/'codec-regression.json').exists() +elif n in (1,2,4):assert all(json.loads((runs/'offline-regression.json').read_text()).values()) +controls=json.loads((runs/'reference-controls.json').read_text()) +assert controls['dimensions']==192 and min(np.diag(controls['cosine']))>.999 +result=dict(passed=True,episodes=len(m['episodes']),turns=turn_count,candidates=turn_count*n,review_turns=reviews, + checks=['pure 50/50 argmax; no WER gate','correct reference per speaker','selected PCM equals candidate', + 'exact prompt and preserved transcript','MP3 hashes/format','400ms gaps','batch timing counted once', + 'recorded prefill/token and decoder correctness checks']) +dump(out/'validation.json',result);print(json.dumps(result,indent=2)) diff --git a/podcast/__init__.py b/podcast/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f059c99921ee69f68fe249f2b8efa356822affda --- /dev/null +++ b/podcast/__init__.py @@ -0,0 +1 @@ +"""Humanness Voice Podcast: referenced turn generation and episode orchestration.""" diff --git a/podcast/alignment.py b/podcast/alignment.py new file mode 100644 index 0000000000000000000000000000000000000000..22b35427d8dd396d7d7be08361039868a5acfaea --- /dev/null +++ b/podcast/alignment.py @@ -0,0 +1,44 @@ +"""Literal-word alignment and hallucination rejection, never speaker relabelling.""" +import re,difflib,math +def tokens(s):return re.findall(r'\w+',s.lower(),re.UNICODE) +def wer(reference,hypothesis): + a,b=tokens(reference),tokens(hypothesis);prev=list(range(len(b)+1)) + for i,x in enumerate(a,1): + row=[i] + for j,y in enumerate(b,1):row.append(min(row[-1]+1,prev[j]+1,prev[j-1]+(x!=y))) + prev=row + return prev[-1]/max(1,len(a)) +def words_from_asr(raw,duration): + words=[] + for segment in raw.get('segments',[]): + for word in segment.get('words',[]): + a=word.get('start',word.get('start_s'));b=word.get('end',word.get('end_s')) + if a is None or b is None:raise ValueError('ASR returned untimed words') + if not all(math.isfinite(float(v)) for v in [a,b]) or not 0<=a<=b<=duration+.08:raise ValueError('ASR word clock outside audio') + words.append({'text':word.get('text',word.get('word','')),'start_s':float(a),'end_s':min(float(b),duration)}) + # Photon Redux already returns global word timestamps; do NOT add offsets twice. + if any(b['start_s']=a-.001 and w['end_s']<=b+.001] + error=wer(' '.join(t['text'] for t in turns),' '.join(w['text'] for w in kept)) + if error>max_wer:raise ValueError(f'Internal content mismatch:WER{error:.3f}>{max_wer:.3f}') + return aligned,kept,error diff --git a/podcast/asr.py b/podcast/asr.py new file mode 100644 index 0000000000000000000000000000000000000000..6d71ea12610dc9b97ea961a58c384d4995f6cb1f --- /dev/null +++ b/podcast/asr.py @@ -0,0 +1,21 @@ +"""Verified Parakeet Redux path plus explicit model override; no fictitious v4 ID.""" +from pathlib import Path +import json,subprocess +class ASR: + def __init__(self,model='moondream/parakeet-redux',device='cpu',command=None,model_path=None): + self.command=command;self.model_id=model + if not command: + import moondream + kwargs={'model_path':str(model_path)} if model_path else {} + if device.startswith('cuda'): + import torch + kwargs['dtype']=torch.bfloat16 + self.model=moondream.photon(model,device=device,**kwargs) + def transcribe(self,path): + if self.command: + # JSON stdin command protocol supports a separately installed Parakeet-v4 + # server/checkpoint when one is actually available; never executes shell=True. + p=subprocess.run(self.command,input=json.dumps({'audio':str(Path(path).resolve()),'timestamps':'word'}),text=True,capture_output=True,check=True) + raw=json.loads(p.stdout) + else:raw=self.model.transcribe(audio=str(path),timestamps='word') + return dict(raw,asr_model=self.model_id) diff --git a/podcast/audio.py b/podcast/audio.py new file mode 100644 index 0000000000000000000000000000000000000000..41c546684fb25d0dab3a2cd2c0a7204d9f4dc47f --- /dev/null +++ b/podcast/audio.py @@ -0,0 +1,82 @@ +"""Waveform assembly. Internal near-silence compaction is UNVALIDATED.""" +import math +from pathlib import Path +import numpy as np +import soundfile as sf +from scipy.signal import resample_poly +SR=48000 +def read(path,sr=SR): + wave,rate=sf.read(path,dtype='float32',always_2d=True);wave=wave.mean(1) + if not np.isfinite(wave).all() or len(wave)==0:raise ValueError('Empty/nonfinite audio') + if rate!=sr: + g=math.gcd(rate,sr);wave=resample_poly(wave,sr//g,rate//g).astype(np.float32) + return wave +def write(path,wave): + path=Path(path);path.parent.mkdir(parents=True,exist_ok=True);sf.write(path,wave,SR,subtype='PCM_24') +def crossfade(left,right,n): + n=min(int(n),len(left),len(right)) + if n<=0:return np.concatenate([left,right]) + t=np.linspace(0,np.pi/2,n) + # Constant gain, not equal power: identical quiet backgrounds do not get +3 dB. + blend=left[-n:]*np.cos(t)**2+right[:n]*np.sin(t)**2 + return np.concatenate([left[:-n],blend.astype(np.float32),right[n:]]) +def crop(wave,start,end,lead_ms=80,tail_ms=150): + first=round(start*SR);last=round(end*SR) + if not 0<=firsta:speech.append(float(np.sqrt(np.mean(wave[a:b]**2)+1e-20))) + if not speech:raise ValueError('No speech for relative energy calibration') + db=20*np.log10(max(np.median(speech),1e-10));threshold_db=min(absolute_dbfs,db-relative_db);threshold=10**(threshold_db/20) + edits=[];fade=round(crossfade_ms*SR/1000) + for left,right in zip(words,words[1:]): + last=round(left['end_s']*SR);first=round(right['start_s']*SR) + if first-lastfirst-round(.03*SR):continue + quiet=wave[a-fade:b+fade] + step=480;rms=[np.sqrt(np.mean(quiet[i:i+step]**2)+1e-20) for i in range(0,len(quiet),step)] + if not rms or max(rms)>threshold:continue + edits.append({'a':a,'b':b,'fade':fade,'removed':b-a+fade,'source_word_gap_s':(first-last)/SR,'retained_word_gap_s':keep_s}) + out=wave.copy() + for e in reversed(edits):out=crossfade(out[:e['a']],out[e['b']:],e['fade']) + def shift(t): + sample=round(t*SR);return (sample-sum(e['removed'] for e in edits if sample>=e['b']+e['fade']))/SR + updated=[dict(w,start_s=shift(w['start_s']),end_s=shift(w['end_s'])) for w in words] + for old,new in zip(words,updated): + a,b=round(old['start_s']*SR),round(old['end_s']*SR);x,y=round(new['start_s']*SR),round(new['end_s']*SR) + if not np.array_equal(wave[a:b],out[x:y]):raise RuntimeError('Pause compaction changed recognized speech') + return out,updated,{'enabled':True,'unvalidated':True,'threshold_dbfs':float(threshold_db),'min_pause_s':min_pause_s,'keep_s':keep_s,'cuts':edits} +def assemble(units,gap_ms=400): + chunks=[];maps=[];cursor=0;last=None + for unit_id,wave,edges in units: + first=round(edges['first_word_s']*SR);end=round(edges['last_word_s']*SR) + if last is not None: + silence=round(gap_ms*SR/1000)-(cursor-last)-first + if silence<0:raise ValueError('Requested gap is shorter than retained tail+lead. Reduce guards or increase gap.') + chunks.append(np.zeros(silence,np.float32));cursor+=silence + maps.append({'unit':unit_id,'start_s':cursor/SR,'first_word_s':(cursor+first)/SR,'last_word_s':(cursor+end)/SR}) + if last is not None and cursor+first-last!=round(gap_ms*SR/1000):raise RuntimeError('Incorrect word-clock gap') + chunks.append(wave);last=cursor+end;cursor+=len(wave) + if not chunks:raise ValueError('Cannot assemble an empty episode') + return np.concatenate(chunks),maps diff --git a/podcast/conversion.py b/podcast/conversion.py new file mode 100644 index 0000000000000000000000000000000000000000..553cc20bb31a49470cf05d99cd0530fdd8047551 --- /dev/null +++ b/podcast/conversion.py @@ -0,0 +1,11 @@ +"""Optional external Humaneness VC runner in its OWN environment; experimental.""" +from pathlib import Path +import subprocess +class Converter: + def __init__(self,directory,python='python',seed=91001): + self.directory=Path(directory).resolve();self.python=python;self.seed=seed + if not (self.directory/'infer.py').is_file():raise ValueError('Download the complete Humaneness Voice Converter repository first') + def convert(self,source,target,output,index=0): + args=[self.python,str(self.directory/'infer.py'),'--model-dir',str(self.directory),'--source',str(Path(source).resolve()),'--target',str(Path(target).resolve()),'--output',str(Path(output).resolve()),'--candidates','1','--precision','bf16','--seed',str(self.seed+index)] + subprocess.run(args,check=True) + if not Path(output).is_file():raise RuntimeError('Converter did not produce its promised waveform') diff --git a/podcast/ears_backend.py b/podcast/ears_backend.py new file mode 100644 index 0000000000000000000000000000000000000000..9f4378cb3a2a4fc36ffce05a09cf8553b52e3901 --- /dev/null +++ b/podcast/ears_backend.py @@ -0,0 +1,231 @@ +"""Pinned Humaneness Ears Medium inference for procedural voice captions. + +The original expert scores, when present, remain separate from these outputs. +No ASR decoder or original teacher is loaded by this backend. +""" +from __future__ import annotations + +import importlib.util +import json +import math +import os +import sys +from contextlib import nullcontext +from pathlib import Path + +MODEL_REPO = "laion/humaneness-ears-base-medium" +MODEL_REVISION = "818506970d93c809a3295a0a02c40dee8ff2bfc3" +NAMESPACE = "humaneness_ears_medium" +EMOTION_ALIASES = { + "Astonishment_Surprise": "Astonishment/Surprise", + "Emotional_Numbness": "Emotional Numbness", + "Fatigue_Exhaustion": "Fatigue/Exhaustion", + "Hope_Enthusiasm_Optimism": "Hope/Optimism", + "Impatience_and_Irritability": "Impatience and Irritability", + "Intoxication_Altered_States_of_Consciousness": "Intoxication/Altered States", + "Jealousy_and_Envy": "Jealousy & Envy", + "Malevolence_Malice": "Malevolence/Malice", + "Pleasure_Ecstasy": "Pleasure/Ecstasy", + "Sexual_Lust": "Sexual Lust", + "Thankfulness_Gratitude": "Thankfulness/Gratitude", +} + + +def caption_scores(prediction): + """Lossless raw-score view in caption.py's historical taxonomy keys.""" + raw = prediction["scores_raw"] + dims = {name[3:-4]: value for name, value in raw.items() + if name.startswith("vn_") and name.endswith("_reg")} + emotions = {EMOTION_ALIASES.get(name[4:], name[4:].replace("_", " ")): value + for name, value in raw.items() if name.startswith("emo_")} + return {"dims": dims, "emo": emotions, "genu": raw.get("genuineness_0_6"), + "blend": raw.get("blend_0_10"), + "content_enjoyment": raw.get("audiobox:CE"), + "score_backend": "humaneness-medium", "score_namespace": NAMESPACE} + + +def window_starts(samples, window=480000, overlap=80000): + """30-second windows, 5-second overlaps, end-anchored final window.""" + if samples <= window: + return [0] + starts = list(range(0, samples - window + 1, window - overlap)) + if starts[-1] != samples - window: + starts.append(samples - window) + return starts + + +class HumanenessMedium: + def __init__(self, repo_dir=None, device="cpu", threads=4, batch_size=32): + import numpy as np + import torch + from safetensors.torch import load_file + from transformers import WhisperFeatureExtractor + if repo_dir is None: + repo_dir = os.environ.get("HUMANENESS_EARS_DIR") + if not repo_dir: + from huggingface_hub import snapshot_download + repo_dir = snapshot_download(MODEL_REPO, revision=MODEL_REVISION, + allow_patterns=["model.py", "training_normalization.json", "classes.json", + "medium/config.json", "medium/model.safetensors", + "medium/preprocessor_config.json"]) + self.repo, self.device = Path(repo_dir), device + self.batch_size = batch_size + torch.set_num_threads(threads) + module_name = "_pvc_humaneness_encoder" + spec = importlib.util.spec_from_file_location(module_name, self.repo / "model.py") + module = importlib.util.module_from_spec(spec) + sys.modules[module_name] = module + spec.loader.exec_module(module) + self.norm = json.loads((self.repo / "training_normalization.json").read_text()) + self.classes = json.loads((self.repo / "classes.json").read_text())["names"] + self.names = self.norm["score_names"] + if len(self.names) != 192 or len([n for n in self.names if n.startswith("emo_")]) != 40: + raise ValueError("Unexpected Humaneness Ears target schema") + self.model = module.LayeredMultiTaskWhisper(self.repo / "medium", len(self.classes), + initialize_pretrained=False) + self.model.load_state_dict(load_file(self.repo / "medium/model.safetensors"), strict=True) + self.model.to(device).eval() + self.extractor = WhisperFeatureExtractor.from_pretrained(self.repo / "medium", local_files_only=True) + self.mean = np.asarray(self.norm["score_mean"], dtype=np.float64) + self.std = np.asarray(self.norm["score_std"], dtype=np.float64) + + def predict_batch(self, waves, *, event_threshold=.5, max_events=32, include_frames=True): + """Mono 16-kHz arrays, each 0.1–30 s. Raw outputs are never clipped.""" + import numpy as np + import torch + arrays = [np.asarray(w, dtype=np.float32).reshape(-1) for w in waves] + if not arrays: + return [] + if any(not 1600 <= len(w) <= 480000 or not np.isfinite(w).all() for w in arrays): + raise ValueError("Each waveform must contain finite 0.1–30 s audio at 16 kHz") + features = self.extractor(arrays, sampling_rate=16000, padding="longest", + truncation=True, max_length=480000, return_attention_mask=True, return_tensors="np") + mel = features["input_features"].astype(np.float32) + mask = features["attention_mask"].astype(np.int64) + if mel.shape[-1] % 2: + mel = np.pad(mel, ((0, 0), (0, 0), (0, 1))) + mask = np.pad(mask, ((0, 0), (0, 1))) + autocast = torch.autocast("cuda", dtype=torch.bfloat16) if str(self.device).startswith("cuda") else nullcontext() + with torch.inference_mode(), autocast: + out = self.model(torch.from_numpy(mel).to(self.device), torch.from_numpy(mask).to(self.device), + predict_events=True, event_threshold=event_threshold, max_pred_events=max_events) + tensors = {key: value.float().cpu().numpy() for key, value in out.items()} + standardized = tensors["scores"] + raw = standardized * self.std + self.mean + probabilities = torch.from_numpy(tensors["event_class"]).softmax(-1).numpy() + frames = torch.from_numpy(tensors["frame"]).sigmoid().numpy() + onsets = torch.from_numpy(tensors["onset"]).sigmoid().numpy() + results = [] + for i, wave in enumerate(arrays): + duration = len(wave) / 16000 + nframes = min(int((mask[i].sum() + 1) // 2), frames.shape[1]) + proposals = [] + for j in np.flatnonzero(tensors["predicted_event_valid"][i]): + a = int(tensors["predicted_event_starts"][i, j]) + b = int(tensors["predicted_event_ends"][i, j]) + start, end = a * .02, min(b * .02, duration) + if start >= end: + continue + top = np.argsort(probabilities[i, j])[-3:][::-1] + proposals.append({"start_s": round(start, 6), "end_s": min(duration, round(end, 6)), + "onset_probability": float(onsets[i, a]), + "top3_classes": [{"label": self.classes[int(k)], + "softmax_probability": float(probabilities[i, j, k])} for k in top]}) + r = {"scores_raw": dict(zip(self.names, map(float, raw[i]))), + "scores_training_z": dict(zip(self.names, map(float, standardized[i]))), + "duration_s": duration, "burst_event_proposals": proposals, + "characters_per_second": float(tensors["cps"][i] * self.norm["cps_std"] + self.norm["cps_mean"]), + "estimated_burst_count": float(np.expm1(np.clip(raw[i, 130], 0, 8))), + "orange_timbre_128d": tensors["timbre"][i].tolist(), + "orange_identity_250d": tensors["identity"][i].tolist(), + "provenance": {"model_repo": MODEL_REPO, "revision": MODEL_REVISION, + "variant": "medium", "namespace": NAMESPACE, "precision": "bfloat16" if str(self.device).startswith("cuda") else "float32"}} + if include_frames: + r["burst_probability_per_20ms_frame"] = frames[i, :nframes].tolist() + results.append(r) + return results + + def predict_waveform(self, waveform, *, include_frames=True): + """Full audio coverage, cross-faded frame track and duplicate-safe events. + + Overlapping windows are used only to provide context. Each event belongs + to the window whose centre is nearest its midpoint, so two windows do not + write the same event. Scores use partition-of-unity duration weights. + """ + import numpy as np + if hasattr(waveform, "detach"): + waveform = waveform.detach().cpu().numpy() + wave = np.asarray(waveform, dtype=np.float32).reshape(-1) + starts = window_starts(len(wave)) + if len(starts) == 1: + result = self.predict_batch([wave], include_frames=True)[0] + result["n_windows"] = 1 + if not include_frames: + result.pop("burst_probability_per_20ms_frame", None) + return result + results = [] + for i in range(0, len(starts), self.batch_size): + results.extend(self.predict_batch([wave[s:s+480000] for s in starts[i:i+self.batch_size]], include_frames=True)) + return self.combine_window_predictions(len(wave), starts, results, include_frames=include_frames) + + def combine_window_predictions(self, samples, starts, results, *, include_frames=True): + """Combine already batched windows; used by the corpus annotator.""" + import numpy as np + if len(starts) != len(results) or not results: + raise ValueError("Window address/prediction mismatch") + if len(starts) == 1: + result = dict(results[0], n_windows=1) + if not include_frames: + result.pop("burst_probability_per_20ms_frame", None) + return result + duration = samples / 16000 + nframes = math.ceil(samples / 320) + accumulated, weights = np.zeros(nframes), np.zeros(nframes) + window_weights = [] + centres = [(s + min(480000, samples - s) / 2) / 16000 for s in starts] + # Adjacent centre midpoints partition the global timeline exactly. + bounds = [0.] + [(a+b)/2 for a,b in zip(centres, centres[1:])] + [duration] + events = [] + for i, (s, r) in enumerate(zip(starts, results)): + offset = s / 16000 + p = np.asarray(r["burst_probability_per_20ms_frame"]) + # The end-anchored window can start between global 20-ms frames. + # Rounding that offset down would leave the last partial frame + # uncovered. Align by timestamp and interpolate within the window. + f0 = math.ceil(s / 320) + fend = min(nframes, math.ceil((s + round(r["duration_s"] * 16000)) / 320)) + count = fend - f0 + t = (np.arange(count) + f0) * .02 + # Smooth triangular context weights; no uncovered or zero-weight frames. + context = np.maximum(.001, 1. - np.abs((t-offset) / max(r["duration_s"], .001) * 2 - 1)) + aligned = np.interp(t, offset + np.arange(len(p)) * .02, p) + accumulated[f0:f0+count] += aligned * context + weights[f0:f0+count] += context + window_weights.append(bounds[i+1] - bounds[i]) + for event in r["burst_event_proposals"]: + e = dict(event, start_s=min(duration, event["start_s"]+offset), + end_s=min(duration, event["end_s"]+offset)) + midpoint = (e["start_s"]+e["end_s"]) / 2 + if bounds[i] <= midpoint < bounds[i+1]: + events.append(e) + if np.any(weights <= 0): + raise RuntimeError("Uncovered Humaneness Ears frame") + mixture = np.asarray(window_weights) / duration + raw = sum(w * np.asarray([r["scores_raw"][n] for n in self.names]) for w,r in zip(mixture, results)) + result = dict(results[0]) + result.update(duration_s=duration, scores_raw=dict(zip(self.names,map(float,raw))), + scores_training_z=dict(zip(self.names,map(float,(raw-self.mean)/self.std))), + characters_per_second=float(sum(w*r["characters_per_second"] for w,r in zip(mixture,results))), + burst_event_proposals=sorted(events,key=lambda e:e["start_s"]), n_windows=len(starts), + estimated_burst_count=len(events), burst_probability_per_20ms_frame=(accumulated/weights).tolist()) + for key in ["orange_timbre_128d", "orange_identity_250d"]: + embedding = sum(w*np.asarray(r[key]) for w,r in zip(mixture,results)) + norm = np.linalg.norm(embedding) + result[key] = (embedding / max(float(norm),1e-12)).tolist() + result["long_audio_aggregation"] = {"scores": "duration-weighted partition by nearest window centre", + "count": "number of owned onset/duration proposals", "window_s": 30, "overlap_s": 5, + "frame_track": "normalised triangular context weights", + "event_ownership": "nearest window centre to event midpoint; class scores uncalibrated"} + if not include_frames: + result.pop("burst_probability_per_20ms_frame",None) + return result diff --git a/podcast/engine.py b/podcast/engine.py new file mode 100644 index 0000000000000000000000000000000000000000..085d4be0ee8826f5e56066da0d007585339ff738 --- /dev/null +++ b/podcast/engine.py @@ -0,0 +1,98 @@ +"""Batched native CFG over different prompts, texts and seeds; BF16 CUDA inference.""" +from pathlib import Path +import json,time,importlib.util +import numpy as np +def module(name,path): + spec=importlib.util.spec_from_file_location(name,path);m=importlib.util.module_from_spec(spec);spec.loader.exec_module(m);return m +def draw(model,logits,generators,top_p): + import torch + scores=model._filter_logits(logits.float(),top_k=50,top_p=top_p);probs=scores.softmax(-1) + return torch.cat([torch.multinomial(probs[i:i+1],1,generator=g).reshape(1) for i,g in enumerate(generators)]) +def native_batch(model,processor,conditional,neutral,seeds,cfg,max_frames): + import torch + if not len(conditional)==len(neutral)==len(seeds) or not seeds:raise ValueError('Different candidate batch sizes') + if not 1<=cfg<=5:raise ValueError('CFG must be1–5') + dev=next(model.parameters()).device;B=len(seeds);generators=[torch.Generator(device=dev).manual_seed(s) for s in seeds] + states=[] + for branch in ([conditional] if cfg==1 else [conditional,neutral]): + b=processor([[u] for u in branch],mode='generation') + states.append({'mi':b['input_ids'].to(dev),'am':b['attention_mask'].to(dev,dtype=torch.bool),'pkv':None}) + slot=int(model.config.audio_assistant_slot_token_id);end=int(model.config.audio_end_token_id);pad=int(model.config.audio_pad_token_id) + finished=torch.zeros(B,dtype=torch.bool,device=dev);natural=finished.clone();frames=[];local_dtype=model.local_transformer.ln_f.weight.dtype + if int(model.config.n_vq)!=12:raise ValueError('Twelve MOSS-v2 codebooks required') + torch.cuda.synchronize(dev);started=time.monotonic() + with torch.inference_mode(),torch.autocast('cuda',dtype=torch.bfloat16): + for _ in range(max_frames): + hidden=[];local=[] + for st in states: + out=model.transformer(input_ids=None,past_key_values=st['pkv'],attention_mask=st['am'],position_ids=None,inputs_embeds=model._build_inputs_embeds(st['mi']),use_cache=True,output_attentions=False,output_hidden_states=False,return_dict=True,cu_seqlens=None,num_sequences=None) + st['pkv']=out.past_key_values;prefix=model._global_hidden_to_local(out.last_hidden_state[:,-1,:]).to(local_dtype) + h,cache=model._decode_local_hidden_states_with_cache(prefix.unsqueeze(1));hidden.append(h[:,-1,:]);local.append(cache) + if not model._use_binary_local_text_head():raise ValueError('Unexpected stop head') + stop=model._local_text_candidate_ids(dev)[draw(model,model.local_text_lm_head(hidden[0]),generators,1.)] + cont=stop.eq(slot)&~finished;natural|=stop.eq(end);finished|=stop.eq(end) + if not bool(cont.any()):break + tokens=[] + for channel in range(12): + cond=model.audio_lm_heads[channel](hidden[0]).float() + guided=cond if cfg==1 else model.audio_lm_heads[channel](hidden[1]).float() + if cfg!=1:guided=guided+cfg*(cond-guided) + token=draw(model,guided,generators,.95);tokens.append(token) + if channel<11: + emb=model.audio_embeddings[channel](token).to(local_dtype).unsqueeze(1) + for branch in range(len(states)): + h,local[branch]=model._decode_local_hidden_states_with_cache(emb,past_key_values=local[branch]);hidden[branch]=h[:,-1,:] + frame=torch.stack(tokens,-1).masked_fill(~cont[:,None],pad);frames.append(frame) + for st in states: + row=model._build_generation_row(batch_size=B,device=dev,audio_token_ids=frame) + row[~cont,0,0]=int(model.config.pad_token_id);row[~cont,0,1:]=pad + st['mi']=row;st['am']=torch.cat([st['am'],cont[:,None]],1) + torch.cuda.synchronize(dev);codes=[] + for i in range(B): + c=torch.stack(frames,1)[i] if frames else torch.empty((0,12),device=dev,dtype=torch.long) + c=c[~c.eq(pad).all(1)].long().cpu() + if len(c) and (c.min()<0 or c.max()>1023):raise ValueError('Corrupt codec output') + codes.append(c) + return codes,{'seconds':time.monotonic()-started,'batch_size':B,'ended_naturally':natural.cpu().tolist(),'frame_caps':[len(c)>=max_frames for c in codes]} +class Synthesizer: + def __init__(self,directory,codec='OpenMOSS-Team/MOSS-Audio-Tokenizer-v2',device='cuda:0'): + import torch + from transformers import AutoModel,AutoTokenizer + from transformers.dynamic_module_utils import get_class_from_dynamic_module + directory=Path(directory) + if not directory.is_dir(): + from huggingface_hub import snapshot_download + directory=Path(snapshot_download(str(directory))) + self.directory=directory;self.device=device + self.model=AutoModel.from_pretrained(directory,trust_remote_code=True,dtype=torch.bfloat16,attn_implementation='sdpa').to(device).eval().requires_grad_(False) + cls=get_class_from_dynamic_module('processing_moss_tts.MossTTSLocalProcessor',str(directory)) + self.proc=cls(tokenizer=AutoTokenizer.from_pretrained(directory,trust_remote_code=True),audio_tokenizer=None,model_config=self.model.config) + self.api=module('podcast_portable_codec_api',directory/'runtime/base_infer.py');self.api.load_codec(self.proc,codec,device) + def references(self,files,cached=None): + import torch + from .audio import read + if cached: + with np.load(cached,allow_pickle=False) as a:refs={s:a[s].astype(np.int64) for s in ['S1','S2']} + else: + refs={} + for s,path in files.items(): + wave=read(path) + if len(wave)<5.04*48000:raise ValueError('Reference audio must be at least5.04 seconds') + wave=wave[:round(14.96*48000)] + with torch.inference_mode():refs[s]=self.proc.encode_audios_from_wav([torch.from_numpy(wave[None,:].copy())],48000,n_vq=12)[0][:187].cpu().numpy() + if set(refs)!={'S1','S2'} or any(c.ndim!=2 or c.shape[1]!=12 or not 63<=len(c)<=187 for c in refs.values()):raise ValueError('Bad reference code layout or duration') + return refs + def generate(self,requests,refs,mode,language,timed=False,cfg=2.5,cap=375,general=None): + from .prompting import build_user,Processor,GENERAL + general=general or GENERAL + cond=[build_user(self.proc,r['turns'],mode,language,refs,timed,False,general) for r in requests] + neutral=[build_user(self.proc,r['turns'],mode,language,refs,timed,True,general) for r in requests] + codes,perf=native_batch(self.model,Processor(self.proc,mode),cond,neutral,[r['seed'] for r in requests],cfg,cap) + outputs=[] + for code in codes: + if len(code)<2:outputs.append(None) + else:outputs.append(self.api.decode(self.proc,code,device=self.device)[0]) + return outputs,perf + def close(self): + import torch + del self.model,self.proc;torch.cuda.empty_cache() diff --git a/podcast/pipeline.py b/podcast/pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..f1ae692e8a281a43b6b4edc964a64adbe427c0ff --- /dev/null +++ b/podcast/pipeline.py @@ -0,0 +1,148 @@ +"""Resumable podcast episode CLI: one-turn or two-turn units, batched candidates.""" +import argparse,hashlib,html,json,sys,time,sqlite3,io +from pathlib import Path +import numpy as np +import soundfile as sf +from .audio import read,write,crop,compact_pauses,assemble,SR +from .alignment import words_from_asr,check +from .asr import ASR +def blob(wave): + f=io.BytesIO();sf.write(f,wave,SR,format='FLAC',subtype='PCM_24');return f.getvalue() +def loadblob(data): + w,sr=sf.read(io.BytesIO(data),dtype='float32') + if sr!=SR:raise ValueError('Stored waveform sample rate changed') + return w +def save(path,value): + path=Path(path);tmp=path.with_name(path.name+'.tmp');tmp.write_text(json.dumps(value,indent=2,ensure_ascii=False,allow_nan=False));tmp.replace(path) +def journal(root): + db=sqlite3.connect(root/'candidates.sqlite',timeout=120);db.execute('PRAGMA journal_mode=WAL');db.execute('PRAGMA synchronous=FULL') + db.executescript('CREATE TABLE IF NOT EXISTS candidates(id TEXT PRIMARY KEY,meta TEXT,audio BLOB);CREATE TABLE IF NOT EXISTS selected(unit INTEGER PRIMARY KEY,meta TEXT,audio BLOB);');db.commit();return db +def progress(root,db,status): + save(root/'STATUS.json',status) + selected=[json.loads(m) for m, in db.execute('SELECT meta FROM selected ORDER BY unit')] + cards=[] + for m in selected: + cards.append('

Unit '+str(m['unit']+1)+'

'+html.escape(m['text'])+'

'+html.escape(json.dumps(m,indent=2,ensure_ascii=False))+'
') + previews=[] + for j,(raw,data) in enumerate(db.execute("SELECT meta,audio FROM candidates WHERE json_extract(meta,'$.accepted')=1 ORDER BY rowid DESC LIMIT 4").fetchall()): + m=json.loads(raw);directory=root/'previews';directory.mkdir(exist_ok=True);write(directory/f'preview-{j}.wav',loadblob(data)) + previews.append('

Provisional raw candidate '+html.escape(m['id'])+'

Still subject to final candidate selection and trimming.

') + p='Podcast generation progress

Humanness Voice Podcast

'+html.escape(status['state'])+' · '+str(len(selected))+' completed units.

'+('

Assembled episode

' if (root/'episode.wav').exists() else '')+''.join(cards)+'

Recent candidate previews

'+''.join(previews)+'' + (root/'listening.html').write_text(p) +def evaluate_candidate(meta,wave,root,asr,scorer,args): + path=root/'asr'/('current-'+meta['id']+'.wav');write(path,wave) + try: + raw=asr.transcribe(path);words=words_from_asr(raw,len(wave)/SR);aligned,kept,error=check(meta['turns'],words,args.max_wer,args.min_coverage) + rank=scorer.score(wave,meta['turns'],aligned,error) if scorer else {'reward':1/(1+error),'scope':'ASR only; no identity validation'} + meta.update(accepted=True,asr=raw,words=kept,aligned=aligned,wer=error,rank=rank,script_start_s=aligned[0]['start_s'],script_end_s=aligned[-1]['end_s'],stage='evaluated') + except ValueError as exc:meta.update(rejection=str(exc),stage='evaluated') + finally:path.unlink(missing_ok=True) + return meta +def main(): + p=argparse.ArgumentParser(description=__doc__);p.add_argument('--model',default='laion/Humanness-Voice-Podcast');p.add_argument('--script',type=Path,required=True);p.add_argument('--output',type=Path,required=True) + p.add_argument('--mode',choices=['turns','pairs'],default='turns');p.add_argument('--candidates',type=int,choices=[1,2,4,8],default=2);p.add_argument('--batch-size',type=int,default=2) + p.add_argument('--cfg',type=float,default=2.5);p.add_argument('--seed',type=int,default=73101);p.add_argument('--timed',action='store_true');p.add_argument('--max-frames',type=int);p.add_argument('--device',default='cuda:0') + p.add_argument('--revision');p.add_argument('--codec',default='OpenMOSS-Team/MOSS-Audio-Tokenizer-v2');p.add_argument('--asr-model',default='moondream/parakeet-redux');p.add_argument('--asr-device',default='cpu');p.add_argument('--asr-model-path',type=Path);p.add_argument('--asr-command',type=Path,help='JSON array command for an explicitly installed word-timestamp ASR service') + p.add_argument('--reward',choices=['identity_wer','pleasant','asr'],default='identity_wer');p.add_argument('--score-device',default='cuda:0');p.add_argument('--max-wer',type=float,default=.30);p.add_argument('--min-coverage',type=float,default=.8) + p.add_argument('--tail-ms',type=float,default=150);p.add_argument('--lead-ms',type=float,default=80);p.add_argument('--gap-ms',type=float,default=400) + p.add_argument('--compact-pauses',action='store_true',help='UNVALIDATED: shorten eligible quiet word gaps');p.add_argument('--pause-trigger',type=float,default=.8);p.add_argument('--pause-keep',type=float,default=.18);p.add_argument('--quiet-dbfs',type=float,default=-45) + p.add_argument('--vc-model-dir',type=Path);p.add_argument('--vc-python',default='python');p.add_argument('--vc-buffer-ms',type=float,default=100) + a=p.parse_args() + if a.batch_size<1 or not 0<=a.max_wer<=1 or not .5<=a.min_coverage<=1:raise ValueError('Invalid batching or content QA limits') + if not 100<=a.tail_ms<=200 or not 0<=a.lead_ms<=200:raise ValueError('Use100–200ms tails and0–200ms leads') + script=json.loads(a.script.read_text());parent=a.script.resolve().parent;root=a.output.resolve();root.mkdir(parents=True,exist_ok=True);(root/'units').mkdir(exist_ok=True);(root/'asr').mkdir(exist_ok=True) + refs={s:str((parent/v).resolve()) for s,v in script['references'].items()} + if set(refs)!={'S1','S2'}:raise ValueError('Provide exactly S1 and S2 reference recordings') + turns=script['turns'];language=script['language'] + if not turns or any(t['speaker'] not in refs or not t['text'].strip() for t in turns):raise ValueError('Invalid literal speaker turns') + if a.timed and any(not 030*SR:raise RuntimeError('Optional VC supports only1–30s source turns; split this turn first') + converter.convert(path,refs[turn['speaker']],out,u*2+ti) + converted=read(out);raw=asr.transcribe(out);words=words_from_asr(raw,len(converted)/SR);al,kept,error=check([turn],words,a.max_wer,a.min_coverage) + processed,updated,pause=compact_pauses(converted,kept,enabled=a.compact_pauses,min_pause_s=a.pause_trigger,keep_s=a.pause_keep,absolute_dbfs=a.quiet_dbfs) + edited,edge=crop(processed,updated[0]['start_s'],updated[-1]['end_s'],a.lead_ms,a.tail_ms);outputs.append((selected_id+f'-vc{ti}',edited,edge)) + vc_reports.append({'speaker':turn['speaker'],'post_vc_wer':error,'pause_compaction':pause,'original_buffer_s':[lo,hi]}) + edited,maps=assemble(outputs,a.gap_ms);edge={'first_word_s':maps[0]['first_word_s'],'last_word_s':maps[-1]['last_word_s'],'duration_s':len(edited)/SR};pause={'per_converted_turn':vc_reports} + else: + processed,updated,pause=compact_pauses(wave,winner['words'],enabled=a.compact_pauses,min_pause_s=a.pause_trigger,keep_s=a.pause_keep,absolute_dbfs=a.quiet_dbfs) + edited,edge=crop(processed,updated[0]['start_s'],updated[-1]['end_s'],a.lead_ms,a.tail_ms) + meta={'id':selected_id,'unit':u,'text':' '.join(t['text'] for t in unit),'selected_seed':winner['seed'],'candidate_rank':winner['rank'],'pre_edit_wer':winner['wer'],'pre_edit_cap':winner['cap_reached'],'edges':edge,'pause_processing':pause,'optional_vc':bool(converter),'scores_scope':'Candidate scores precede pause edits and optional VC; final output not globally rescored.'} + write(root/'units'/(selected_id+'.wav'),edited);db.execute('INSERT INTO selected VALUES(?,?,?)',(u,json.dumps(meta,ensure_ascii=False),blob(edited)));db.commit();progress(root,db,{'state':'Assembling units','time':time.time()}) + selected=[] + for u,raw,data in db.execute('SELECT unit,meta,audio FROM selected ORDER BY unit'): + m=json.loads(raw);selected.append((m['id'],loadblob(data),m['edges'])) + if len(selected)!=len(units):raise RuntimeError('Incomplete episode; refusing to call it final') + episode,mapping=assemble(selected,a.gap_ms);write(root/'episode.wav',episode);save(root/'episode_timeline.json',mapping) + progress(root,db,{'state':'Complete','duration_s':len(episode)/SR,'units':len(units),'time':time.time()});db.close() + print(json.dumps({'output':str(root/'episode.wav'),'listening':str(root/'listening.html'),'duration_s':len(episode)/SR}),flush=True) +if __name__=='__main__':main() diff --git a/podcast/prompting.py b/podcast/prompting.py new file mode 100644 index 0000000000000000000000000000000000000000..f02ba2fe890703ffee7fa3f0dd00a81a5d9691de --- /dev/null +++ b/podcast/prompting.py @@ -0,0 +1,35 @@ +"""Same trained GENERAL/SCRIPT and reference wrapper; no new vocabulary tokens.""" +LANGUAGES={'en':'English','de':'German','fr':'French','es':'Spanish','nl':'Dutch'} +GENERAL='A very authentic, very genuine conversation. Natural, relaxed, gentle and spontaneous delivery, clear words, subtle emotion and brief meaningful pauses. Keep each supplied speaker identity. Speak only the scripted words; never read directions aloud.' +def prompt(turns,mode,timed=False,neutral=False,general=GENERAL): + lines=[] + for t in turns: + tag=('speaker='+t['speaker']+', ') if mode=='pairs' else '' + direction='neutral conversational delivery' if neutral else t.get('direction','warm and genuine')+'; relaxed, spontaneous, gently spoken' + duration=(' ['+str(t['seconds'])+' seconds duration]') if timed else '' + lines.append('('+tag+direction+')'+duration+' '+t['text']) + identity='Only the one referenced speaker speaks in this output. ' if mode=='turns' else 'Keep S1 and S2 distinct, matching each labelled speaker to its own reference. ' + return 'GENERAL:\n'+identity+('Speak only the scripted words.' if neutral else general)+'\nSCRIPT:\n'+'\n'.join(lines) +def build_user(proc,turns,mode,language,refs,timed=False,neutral=False,general=GENERAL,history=None,training_frames=None): + import torch + frames=training_frames if training_frames is not None else (round(sum(t['seconds'] for t in turns)*12.5) if timed else None) + user=proc.build_user_message(text=' '.join(t['text'] for t in turns),instruction=prompt(turns,mode,timed,neutral,general),tokens=frames,language=LANGUAGES[language],reference=[torch.as_tensor(refs[turns[0]['speaker']],dtype=torch.long)] if mode=='turns' and turns[0]['speaker'] in refs else None) + if mode=='turns':return user + parts=[];audio=[] + for s in ['S1','S2']: + c=refs[s] + if c.ndim!=2 or c.shape[1]!=12 or not 63<=len(c)<=187:raise ValueError('Use5.04–14.96-second single-speaker anchors') + parts.append('Speaker '+s+' identity reference:\n<|audio|>');audio.append(torch.as_tensor(c,dtype=torch.long)) + if history is not None: + code,desc=history + if len(code)+sum(len(x) for x in audio)>750:raise ValueError('Anchors+history exceed the trained60-second budget') + parts.append('Previous conversation, chronological and strictly before target:\n'+desc+'\n<|audio|>');audio.append(torch.as_tensor(code,dtype=torch.long)) + marker='- Reference(s):\nNone\n' + if user['content'].count(marker)!=1:raise RuntimeError('Processor wrapper mismatch') + user['content']=user['content'].replace(marker,'- Reference(s):\n'+'\n'.join(parts)+'\n',1) + user['audio_codes_list']=audio;user.pop('text',None) + user['content']='<|im_start|>user\n'+user['content']+'<|im_end|>\n<|im_start|>assistant\n' + return user +class Processor: + def __init__(self,proc,mode):self.proc=proc;self.mode=mode + def __call__(self,messages,mode):return self.proc(messages,mode=mode,**({'apply_chat_template':False} if self.mode=='pairs' else {})) diff --git a/podcast/ranking.py b/podcast/ranking.py new file mode 100644 index 0000000000000000000000000000000000000000..09ad83e42d66dc0f4cdacdf9e278d625042e5d6b --- /dev/null +++ b/podcast/ranking.py @@ -0,0 +1,39 @@ +"""Diagnostic candidate rewards; proposed pleasantness reward is unvalidated.""" +import math +def cosine(a,b): + import numpy as np + a,b=np.asarray(a,float),np.asarray(b,float) + return float(a@b/max(1e-12,float(np.linalg.norm(a)*np.linalg.norm(b)))) +def cdf(z):return .5*(1+math.erf(z/math.sqrt(2))) +def identity_reward(turns,measurements,references,wer): + groups={s:[] for s in {t['speaker'] for t in turns}};margins={s:[] for s in groups} + cross=cosine(references['S1'],references['S2']);den=max(.05,1-cross) + for t,m in zip(turns,measurements): + s=t['speaker'];own=m.get('own_cosine');other=m.get('other_cosine') + groups[s].append(max(0,min(1,own)) if own is not None else 0) + margins[s].append(max(0,min(1,(own-other)/den)) if own is not None else 0) + mean=lambda d:sum(sum(v)/max(1,len(v)) for v in d.values())/len(d) + C,M=mean(groups),mean(margins) + return {'C':C,'M':M,'reward':(.5*C+.5*M)/(1+wer)} +class Scorer: + def __init__(self,refs,device='cuda:0',kind='identity_wer'): + from .ears_backend import HumanenessMedium + from .audio import read + self.ears=HumanenessMedium(device=device,batch_size=8);self.kind=kind + self.references={s:self.ears.predict_waveform(read(p,16000),include_frames=False)['orange_identity_250d'] for s,p in refs.items()} + def score(self,wave,turns,aligned,wer): + from scipy.signal import resample_poly + import numpy as np + measurements=[] + for t,a in zip(turns,aligned): + crop=wave[round(a['start_s']*48000):round(a['end_s']*48000)] + if len(crop)<1.2*48000:measurements.append({});continue + p=self.ears.predict_waveform(resample_poly(crop[:12*48000],1,3).astype(np.float32),include_frames=False) + v=p['orange_identity_250d'];s=t['speaker'];other='S2' if s=='S1' else 'S1' + measurements.append({'own_cosine':cosine(v,self.references[s]),'other_cosine':cosine(v,self.references[other])}) + value=identity_reward(turns,measurements,self.references,wer);value['per_turn']=measurements + if self.kind=='pleasant': + q=self.ears.predict_waveform(resample_poly(wave,1,3).astype(np.float32),include_frames=False);z=q['scores_training_z'] + g,ce=cdf(z['genuineness_0_6']),cdf(z['audiobox:CE']) + value.update(reward=(.4*value['C']+.2*value['M']+.2*g+.2*ce)/(1+wer),genuineness_cdf=g,content_enjoyment_cdf=ce,quality_raw={k:q['scores_raw'][k] for k in ['genuineness_0_6','audiobox:CE']},recipe_unvalidated=True) + return value diff --git a/processing_moss_tts.py b/processing_moss_tts.py new file mode 100644 index 0000000000000000000000000000000000000000..94c33dea59269059772efe0df34acc3fe7d7d067 --- /dev/null +++ b/processing_moss_tts.py @@ -0,0 +1,914 @@ +# coding=utf-8 +"""Processor for the MOSS-TTS-Local-Transformer-v1.5 HuggingFace release.""" + +from __future__ import annotations + +import os +import re +from dataclasses import dataclass +from pathlib import Path +from typing import Any, Dict, List, Optional, Sequence, Tuple, Union, cast + +import torch +import torchaudio +from transformers import ( + AutoConfig, + AutoModel, + AutoTokenizer, + BatchFeature, + PreTrainedTokenizerBase, + ProcessorMixin, + logging, + processing_utils, +) + +from .configuration_moss_tts import MossTTSLocalConfig + + +if hasattr(processing_utils, "MODALITY_TO_BASE_CLASS_MAPPING"): + processing_utils.MODALITY_TO_BASE_CLASS_MAPPING["audio_tokenizer"] = "PreTrainedModel" +else: + processing_utils.AUTO_TO_BASE_CLASS_MAPPING["AutoModel"] = "PreTrainedModel" +logger = logging.get_logger(__name__) + +AUDIO_PLACEHOLDER = "<|audio|>" +USER_ROLE_PREFIX = "user\n" +USER_TEMPLATE_REFERENCE_PREFIX = ( + "\n" + "- Reference(s):\n" +) +USER_TEMPLATE_AFTER_REFERENCE_SUFFIX = ( + "\n" + "- Text:\n" +) +USER_TEMPLATE_SUFFIX = "\n" +ASSISTANT_TURN_PREFIX = "\n" +ASSISTANT_ROLE_PREFIX = "assistant\n" +USER_MESSAGE_FIELDS = ( + "text", + "reference", + "instruction", + "tokens", + "quality", + "sound_event", + "ambient_sound", + "language", +) + + +def _normalize_template_value(value: Any) -> str: + if value is None: + return "None" + resolved = str(value).strip() + return resolved or "None" + + +def _render_user_prompt_after_reference( + language_code: object | None = None, + prompt_fields: Optional[Dict[str, Any]] = None, +) -> str: + fields = dict(prompt_fields or {}) + return ( + "\n- Instruction:\n" + + _normalize_template_value(fields.get("instruction")) + + "\n- Tokens:\n" + + _normalize_template_value(fields.get("tokens")) + + "\n- Quality:\n" + + _normalize_template_value(fields.get("quality")) + + "\n- Sound Event:\n" + + _normalize_template_value(fields.get("sound_event")) + + "\n- Ambient Sound:\n" + + _normalize_template_value(fields.get("ambient_sound")) + + "\n- Language:\n" + + _normalize_template_value(fields.get("language", language_code)) + + USER_TEMPLATE_AFTER_REFERENCE_SUFFIX + ) + + +@dataclass +class Message: + def to_dict(self) -> Dict[str, Any]: + raise NotImplementedError + + +@dataclass +class UserMessage(Message): + text: Optional[str] = None + reference: Optional[List[Optional[Union[str, os.PathLike, torch.Tensor]]]] = None + instruction: Optional[str] = None + tokens: Optional[int] = None + quality: Optional[str] = None + sound_event: Optional[str] = None + ambient_sound: Optional[str] = None + language: Optional[str] = None + + def __post_init__(self) -> None: + template = """ +- Reference(s): +{reference} +- Instruction: +{instruction} +- Tokens: +{tokens} +- Quality: +{quality} +- Sound Event: +{sound_event} +- Ambient Sound: +{ambient_sound} +- Language: +{language} +- Text: +{text} +""" + + audio_codes_list: list[Union[str, os.PathLike, torch.Tensor]] = [] + if self.reference is None: + reference = "None" + else: + reference_items: list[str] = [] + for speaker_idx, speaker_reference in enumerate(self.reference): + if speaker_reference is None: + continue + # Keep raw audio placeholders directly under "- Reference(s):". + # Speaker labels such as "[S1]:" change the token sequence and + # can affect voice-clone conditioning. + reference_items.append(AUDIO_PLACEHOLDER) + audio_codes_list.append(speaker_reference) + reference = "\n".join(reference_items) if reference_items else "None" + + self._content = ( + template.replace("{reference}", str(reference)) + .replace("{instruction}", str(self.instruction)) + .replace("{tokens}", str(self.tokens)) + .replace("{quality}", str(self.quality)) + .replace("{sound_event}", str(self.sound_event)) + .replace("{ambient_sound}", str(self.ambient_sound)) + .replace("{language}", str(self.language)) + .replace("{text}", str(self.text)) + ) + self._audio_codes_list = audio_codes_list + + def to_dict(self) -> Dict[str, Any]: + return { + "role": "user", + "content": self._content, + "audio_codes_list": self._audio_codes_list, + "text": self.text, + "instruction": self.instruction, + "tokens": self.tokens, + "quality": self.quality, + "sound_event": self.sound_event, + "ambient_sound": self.ambient_sound, + "language": self.language, + } + + +@dataclass +class AssistantMessage(Message): + audio_codes_list: List[Union[str, os.PathLike, torch.Tensor]] + content: str = AUDIO_PLACEHOLDER + + def to_dict(self) -> Dict[str, Any]: + return { + "role": "assistant", + "content": self.content, + "audio_codes_list": self.audio_codes_list, + } + + +class MossTTSLocalProcessor(ProcessorMixin): + attributes = ["tokenizer"] + tokenizer_class = "AutoTokenizer" + audio_tokenizer_class = "AutoModel" + + tokenizer: PreTrainedTokenizerBase + audio_tokenizer: Any + + def __init__( + self, + tokenizer: PreTrainedTokenizerBase, + audio_tokenizer: Any = None, + model_config: Optional[MossTTSLocalConfig] = None, + **kwargs, + ) -> None: + super().__init__(tokenizer=tokenizer, audio_tokenizer=audio_tokenizer, **kwargs) + self.tokenizer = tokenizer + self.audio_tokenizer = audio_tokenizer + self.model_config = model_config or MossTTSLocalConfig() + + def _id_to_token(token_id: int) -> str: + token = tokenizer.convert_ids_to_tokens(int(token_id)) + if isinstance(token, list): + return token[0] if token else "" + return cast(str, token) + + self.audio_user_slot_token = _id_to_token(self.model_config.audio_user_slot_token_id) + self.audio_assistant_slot_token = _id_to_token(self.model_config.audio_assistant_slot_token_id) + self.audio_start_token = _id_to_token(self.model_config.audio_start_token_id) + self.audio_end_token = _id_to_token(self.model_config.audio_end_token_id) + + @classmethod + def from_pretrained(cls, pretrained_model_name_or_path, *args, **kwargs): + trust_remote_code = kwargs.pop("trust_remote_code", True) + kwargs.pop("_from_auto", None) + codec_path = kwargs.pop("codec_path", None) + codec_weight_dtype = kwargs.pop("codec_weight_dtype", "fp32") + codec_compute_dtype = kwargs.pop("codec_compute_dtype", None) + codec_attention_implementation = kwargs.pop("codec_attention_implementation", None) + + codec_kwargs: Dict[str, Any] = {} + if codec_weight_dtype is not None: + # Default to fp32 codec weights; callers can pass codec_weight_dtype="bf16" to reduce memory. + codec_kwargs["codec_weight_dtype"] = codec_weight_dtype + + model_ref = Path(str(pretrained_model_name_or_path)) + model_ref_or_name = model_ref if model_ref.exists() else pretrained_model_name_or_path + model_config = cast( + MossTTSLocalConfig, + AutoConfig.from_pretrained( + model_ref_or_name, + *args, + trust_remote_code=trust_remote_code, + **kwargs, + ), + ) + + if codec_path is None: + try: + processor_dict, _ = cls.get_processor_dict( + pretrained_model_name_or_path, + **dict(kwargs), + ) + codec_path = processor_dict.get("audio_tokenizer_name_or_path") + audio_tokenizer_dict = processor_dict.get("audio_tokenizer", {}) + if isinstance(audio_tokenizer_dict, dict): + codec_path = audio_tokenizer_dict.get("audio_tokenizer_name_or_path") or codec_path + except Exception: + codec_path = None + if codec_path is None: + codec_path = getattr(model_config, "audio_tokenizer_name_or_path", None) + if codec_path is None: + codec_path = "OpenMOSS-Team/MOSS-Audio-Tokenizer-v2" + + tokenizer = AutoTokenizer.from_pretrained( + model_ref_or_name, + *args, + trust_remote_code=trust_remote_code, + **kwargs, + ) + audio_tokenizer = AutoModel.from_pretrained( + codec_path, + trust_remote_code=trust_remote_code, + **kwargs, + **codec_kwargs, + ) + if codec_compute_dtype is not None and hasattr(audio_tokenizer, "set_compute_dtype"): + audio_tokenizer.set_compute_dtype(codec_compute_dtype) + if codec_attention_implementation is not None and hasattr( + audio_tokenizer, "set_attention_implementation" + ): + audio_tokenizer.set_attention_implementation(codec_attention_implementation) + return cls( + tokenizer=tokenizer, + audio_tokenizer=audio_tokenizer, + model_config=model_config, + **kwargs, + ) + + @staticmethod + def build_user_message( + text: Optional[str] = None, + reference: Optional[List[Optional[Union[str, os.PathLike, torch.Tensor]]]] = None, + instruction: Optional[str] = None, + tokens: Optional[int] = None, + quality: Optional[str] = None, + sound_event: Optional[str] = None, + ambient_sound: Optional[str] = None, + language: Optional[str] = None, + ) -> Dict[str, Any]: + if reference is not None and not isinstance(reference, list): + reference = [reference] + return UserMessage( + text=text, + reference=reference, + instruction=instruction, + tokens=tokens, + quality=quality, + sound_event=sound_event, + ambient_sound=ambient_sound, + language=language, + ).to_dict() + + @staticmethod + def build_assistant_message( + audio_codes_list: List[Union[str, os.PathLike, torch.Tensor]], + content: str = AUDIO_PLACEHOLDER, + ) -> Dict[str, Any]: + return AssistantMessage(audio_codes_list=audio_codes_list, content=content).to_dict() + + def _assert_fixed_nq(self, n_vq: Optional[int]) -> int: + config_nq = int(self.model_config.n_vq) + if n_vq is not None and int(n_vq) != config_nq: + raise ValueError( + "This MOSS-TTS-Local-Transformer-v1.5 release uses the RVQ depth stored in the model config. " + f"Expected n_vq={config_nq}, got {int(n_vq)}." + ) + return config_nq + + def _encode_text(self, text: str) -> list[int]: + try: + return list(self.tokenizer.encode(text, add_special_tokens=False)) + except TypeError: + return list(self.tokenizer.encode(text)) + + def _build_text_rows(self, token_ids: Sequence[int], *, device: Optional[torch.device] = None) -> torch.Tensor: + rows = torch.full( + (len(token_ids), int(self.model_config.n_vq) + 1), + int(self.model_config.audio_pad_token_id), + dtype=torch.long, + device=device, + ) + if token_ids: + rows[:, 0] = torch.tensor([int(token_id) for token_id in token_ids], dtype=torch.long, device=rows.device) + return rows + + def _build_audio_rows(self, audio_tokens: torch.Tensor, slot_token_id: int) -> torch.Tensor: + rows = torch.full( + (int(audio_tokens.shape[0]), int(self.model_config.n_vq) + 1), + int(self.model_config.audio_pad_token_id), + dtype=torch.long, + device=audio_tokens.device, + ) + if rows.shape[0] > 0: + rows[:, 0] = int(slot_token_id) + rows[:, 1:] = audio_tokens.to(dtype=torch.long) + return rows + + def _user_prompt_prefix_ids(self) -> list[int]: + return ( + [int(self.model_config.im_start_token_id)] + + self._encode_text(USER_ROLE_PREFIX) + + self._encode_text(USER_TEMPLATE_REFERENCE_PREFIX) + ) + + def _user_prompt_after_reference_ids( + self, + language_code: object | None, + prompt_fields: Optional[Dict[str, Any]], + ) -> list[int]: + return self._encode_text( + _render_user_prompt_after_reference( + language_code=language_code, + prompt_fields=prompt_fields, + ) + ) + + def _assistant_prompt_prefix_ids(self) -> list[int]: + return ( + self._encode_text(USER_TEMPLATE_SUFFIX) + + [int(self.model_config.im_end_token_id)] + + self._encode_text(ASSISTANT_TURN_PREFIX) + + [int(self.model_config.im_start_token_id)] + + self._encode_text(ASSISTANT_ROLE_PREFIX) + ) + + def _prompt_fields_from_user_message(self, message: Dict[str, Any]) -> dict[str, Any]: + fields = {} + for key in ("instruction", "tokens", "quality", "sound_event", "ambient_sound"): + if key in message and message.get(key) is not None: + fields[key] = message.get(key) + if "language" in message and message.get("language") is not None: + fields["language"] = message.get("language") + return fields + + def _build_generation_or_voice_clone_codes( + self, + message: Dict[str, Any], + n_vq: int, + ) -> torch.Tensor: + if "text" not in message: + raise ValueError("Direct MOSS-TTS-Local-Transformer-v1.5 generation requires messages built by build_user_message(...).") + text = "" if message.get("text") is None else str(message.get("text")) + prompt_fields = self._prompt_fields_from_user_message(message) + language_code = message.get("language") + audio_codes_list = self._resolve_audio_items(message.get("audio_codes_list", []), n_vq) + text_token_ids = self._encode_text(text) + + if audio_codes_list: + parts: list[torch.Tensor] = [self._build_text_rows( + self._user_prompt_prefix_ids(), + device=audio_codes_list[0].device, + )] + for reference_codes in audio_codes_list: + parts.append(self._build_text_rows([int(self.model_config.audio_start_token_id)], device=reference_codes.device)) + parts.append(self._build_audio_rows(reference_codes, int(self.model_config.audio_user_slot_token_id))) + parts.append(self._build_text_rows([int(self.model_config.audio_end_token_id)], device=reference_codes.device)) + parts.append( + self._build_text_rows( + self._user_prompt_after_reference_ids(language_code, prompt_fields) + + text_token_ids + + self._assistant_prompt_prefix_ids() + + [int(self.model_config.audio_start_token_id)], + device=audio_codes_list[0].device, + ) + ) + return torch.cat(parts, dim=0) + + prompt_token_ids = ( + self._user_prompt_prefix_ids() + + self._encode_text("None") + + self._user_prompt_after_reference_ids(language_code, prompt_fields) + + text_token_ids + + self._assistant_prompt_prefix_ids() + + [int(self.model_config.audio_start_token_id)] + ) + return self._build_text_rows(prompt_token_ids) + + def _build_continuation_codes( + self, + conversation: list[Dict[str, Any]], + n_vq: int, + ) -> torch.Tensor: + if len(conversation) < 2: + raise ValueError("continuation mode requires a user message followed by an assistant audio message.") + user_message = conversation[-2] + assistant_message = conversation[-1] + if user_message.get("role") != "user" or assistant_message.get("role") != "assistant": + raise ValueError("continuation mode requires the last two messages to be user, assistant.") + if "text" not in user_message: + raise ValueError("Direct MOSS-TTS-Local-Transformer-v1.5 continuation requires user messages built by build_user_message(...).") + + text = "" if user_message.get("text") is None else str(user_message.get("text")) + prompt_fields = self._prompt_fields_from_user_message(user_message) + language_code = user_message.get("language") + prompt_token_ids = ( + self._user_prompt_prefix_ids() + + self._encode_text("None") + + self._user_prompt_after_reference_ids(language_code, prompt_fields) + + self._encode_text(text) + + self._assistant_prompt_prefix_ids() + + [int(self.model_config.audio_start_token_id)] + ) + audio_codes_list = self._resolve_audio_items(assistant_message.get("audio_codes_list", []), n_vq) + if not audio_codes_list: + return self._build_text_rows(prompt_token_ids) + if len(audio_codes_list) != 1: + raise ValueError("The MOSS-TTS-Local-Transformer-v1.5 continuation path expects exactly one prompt audio item.") + prompt_audio_codes = audio_codes_list[0] + return torch.cat( + [ + self._build_text_rows(prompt_token_ids, device=prompt_audio_codes.device), + self._build_audio_rows(prompt_audio_codes, int(self.model_config.audio_assistant_slot_token_id)), + ], + dim=0, + ) + + def _try_build_direct_codes( + self, + conversation: list[Dict[str, Any]], + mode: str, + n_vq: int, + ) -> Optional[torch.Tensor]: + if mode == "generation" and len(conversation) == 1 and conversation[-1].get("role") == "user": + if "text" in conversation[-1]: + return self._build_generation_or_voice_clone_codes(conversation[-1], n_vq) + return None + if mode == "continuation" and len(conversation) >= 2: + if "text" in conversation[-2]: + return self._build_continuation_codes(conversation, n_vq) + return None + return None + + def __call__(self, *args, **kwargs) -> BatchFeature: + conversations = args[0] if args else kwargs.pop("conversations") + mode: str = kwargs.pop("mode", "generation") + apply_chat_template: bool = kwargs.pop("apply_chat_template", True) + n_vq = self._assert_fixed_nq(kwargs.pop("n_vq", None)) + + kwargs.pop("return_tensors", None) + kwargs.pop("padding", None) + kwargs.pop("truncation", None) + + if mode not in {"generation", "continuation", "computing_loss"}: + raise ValueError(f"Unsupported mode: {mode}") + if isinstance(conversations, (Message, dict)): + conversations = [conversations] + elif isinstance(conversations, list) and conversations and all( + isinstance(item, (Message, dict)) for item in conversations + ): + conversations = [conversations] + + input_ids_list: list[torch.Tensor] = [] + for conversation in conversations: + if isinstance(conversation, (Message, dict)): + conversation = [conversation] + conversation = [self._normalize_message(message) for message in conversation] + + if (mode == "generation") ^ (conversation[-1]["role"] == "user"): + raise ValueError("generation mode must end with a user message.") + if mode == "continuation" and conversation[-1]["role"] != "assistant": + raise ValueError("continuation mode must end with an assistant message.") + + direct_codes = self._try_build_direct_codes(conversation, mode, n_vq) + if direct_codes is not None: + input_ids_list.append(direct_codes) + continue + + unified_parts = [] + for message_idx, message in enumerate(conversation): + content = str(message["content"]) + if apply_chat_template: + add_generation_prompt = mode == "generation" and message_idx == len(conversation) - 1 + try: + content = self.tokenizer.apply_chat_template( + [{"role": message["role"], "content": content}], + add_generation_prompt=add_generation_prompt, + tokenize=False, + ) + except Exception: + logger.warning("apply_chat_template failed; falling back to raw message content.") + + raw_audio_items = message.get("audio_codes_list", []) + audio_codes_list = self._resolve_audio_items(raw_audio_items, n_vq) + unified_parts.append( + self._get_unified_codes( + role=message["role"], + content=content, + audio_codes_list=audio_codes_list, + truncation=(mode == "continuation"), + ) + ) + + unified_codes = torch.cat(unified_parts, dim=0) + if mode == "generation": + audio_start_row = torch.full( + (1, n_vq + 1), + int(self.model_config.audio_pad_token_id), + dtype=unified_codes.dtype, + device=unified_codes.device, + ) + audio_start_row[:, 0] = int(self.model_config.audio_start_token_id) + unified_codes = torch.cat([unified_codes, audio_start_row], dim=0) + input_ids_list.append(unified_codes) + + return BatchFeature(data=self._pad(input_ids_list)) + + def _normalize_message(self, message: Union[Message, Dict[str, Any]]) -> Dict[str, Any]: + if isinstance(message, Message): + return message.to_dict() + if not isinstance(message, dict): + raise TypeError("Each message must be a Message or dict.") + if "content" in message and "audio_codes_list" in message: + return message + role = message.get("role") + if role == "user": + return self.build_user_message(**{key: message.get(key) for key in USER_MESSAGE_FIELDS}) + if role == "assistant": + return self.build_assistant_message( + audio_codes_list=message.get("audio_codes_list", []), + content=message.get("content", AUDIO_PLACEHOLDER), + ) + raise ValueError(f"Unsupported role: {role}") + + def _resolve_audio_items( + self, + raw_audio_items: list[Any], + n_vq: int, + ) -> list[torch.Tensor]: + if not raw_audio_items: + return [] + resolved: list[Optional[torch.Tensor]] = [None] * len(raw_audio_items) + paths: list[str] = [] + path_positions: list[int] = [] + for index, item in enumerate(raw_audio_items): + if isinstance(item, torch.Tensor): + if item.ndim != 2 or int(item.shape[1]) != n_vq: + raise ValueError(f"audio code tensor must have shape [T, {n_vq}], got {tuple(item.shape)}.") + resolved[index] = item.to(dtype=torch.long).cpu() + elif isinstance(item, (str, os.PathLike)): + paths.append(str(item)) + path_positions.append(index) + else: + raise TypeError("Audio items must be tensors or path-like values.") + if paths: + encoded = self.encode_audios_from_path(paths, n_vq=n_vq) + for position, codes in zip(path_positions, encoded): + resolved[position] = codes + return [cast(torch.Tensor, item) for item in resolved] + + def _pad(self, input_ids_list: list[torch.Tensor]) -> Dict[str, torch.Tensor]: + device = input_ids_list[0].device + lengths = torch.tensor([item.shape[0] for item in input_ids_list], device=device) + padded = torch.nn.utils.rnn.pad_sequence( + input_ids_list, + batch_first=True, + padding_value=int(self.model_config.audio_pad_token_id), + padding_side="left", + ) + left_pad_mask = (padded.shape[1] - lengths).unsqueeze(1) > torch.arange( + padded.shape[1], + device=device, + ).unsqueeze(0) + padded[..., 0][left_pad_mask] = int(self.model_config.pad_token_id) + attention_mask = torch.zeros(padded.shape[:2], dtype=torch.bool, device=device) + attention_mask[~left_pad_mask] = True + return {"input_ids": padded, "attention_mask": attention_mask} + + @staticmethod + def _replace_audio_placeholders( + content: str, + lengths: list[int], + slot_token: str, + audio_start_token: str, + audio_end_token: str, + ) -> str: + placeholder_count = content.count(AUDIO_PLACEHOLDER) + if placeholder_count != len(lengths): + raise ValueError( + f"Number of {AUDIO_PLACEHOLDER} ({placeholder_count}) does not match " + f"audio item count ({len(lengths)})." + ) + lengths_iter = iter(lengths) + + def replacer(_: re.Match) -> str: + length = int(next(lengths_iter)) + if length <= 0: + return f"{audio_start_token}{audio_end_token}" + return f"{audio_start_token}{slot_token * length}{audio_end_token}" + + return re.sub(re.escape(AUDIO_PLACEHOLDER), replacer, content) + + def _get_unified_codes( + self, + role: str, + content: str, + audio_codes_list: list[torch.Tensor], + truncation: bool, + ) -> torch.Tensor: + n_vq = int(self.model_config.n_vq) + slot_token = self.audio_user_slot_token if role == "user" else self.audio_assistant_slot_token + content = self._replace_audio_placeholders( + content=content, + lengths=[int(codes.shape[0]) for codes in audio_codes_list], + slot_token=slot_token, + audio_start_token=self.audio_start_token, + audio_end_token=self.audio_end_token, + ) + text_codes = torch.tensor( + self.tokenizer.encode(content), + dtype=torch.long, + device=audio_codes_list[0].device if audio_codes_list else None, + ) + + audio_start_indices = torch.where(text_codes == int(self.model_config.audio_start_token_id))[0] + audio_end_indices = torch.where(text_codes == int(self.model_config.audio_end_token_id))[0] + if len(audio_start_indices) != len(audio_codes_list) or len(audio_end_indices) != len(audio_codes_list): + raise ValueError("Audio placeholders do not match the encoded audio spans.") + + if not audio_codes_list: + audio_codes = torch.full( + (len(text_codes), n_vq), + int(self.model_config.audio_pad_token_id), + dtype=torch.long, + device=text_codes.device, + ) + else: + pieces: list[torch.Tensor] = [] + prefix_idx = 0 + for start_t, end_t, codes in zip(audio_start_indices, audio_end_indices, audio_codes_list): + start_idx = int(start_t.item()) + end_idx = int(end_t.item()) + pad_before = torch.full( + (start_idx - prefix_idx + 1, n_vq), + int(self.model_config.audio_pad_token_id), + dtype=torch.long, + device=codes.device, + ) + pieces.extend([pad_before, codes.to(dtype=torch.long)]) + prefix_idx = end_idx + if truncation: + trailing = torch.zeros( + (0, n_vq), + dtype=torch.long, + device=audio_codes_list[0].device, + ) + else: + last_end = int(audio_end_indices[-1].item()) + trailing = torch.full( + (len(text_codes) - last_end, n_vq), + int(self.model_config.audio_pad_token_id), + dtype=torch.long, + device=audio_codes_list[0].device, + ) + pieces.append(trailing) + audio_codes = torch.cat(pieces, dim=0) + + if text_codes.shape[0] != audio_codes.shape[0]: + min_len = min(text_codes.shape[0], audio_codes.shape[0]) + text_codes = text_codes[:min_len] + audio_codes = audio_codes[:min_len] + return torch.cat([text_codes.unsqueeze(1), audio_codes], dim=1) + + def _parse_text_codes(self, start_length: int, text_codes: torch.LongTensor) -> str: + text = cast(str, self.tokenizer.decode(text_codes)) + prefix = cast(str, self.tokenizer.decode(text_codes[:start_length])) + text = text[len(prefix):] + audio_pattern = re.compile( + rf"(?:{re.escape(self.audio_start_token)})?" + rf"(?:{re.escape(self.audio_assistant_slot_token)})*" + rf"{re.escape(self.audio_end_token)}" + ) + return audio_pattern.sub( + lambda match: AUDIO_PLACEHOLDER if self.audio_assistant_slot_token in match.group(0) else "", + text, + ) + + def _parse_audio_codes( + self, + start_length: int, + audio_codes: torch.LongTensor, + *, + return_stereo: bool = True, + ) -> list[torch.Tensor]: + is_pad = audio_codes.eq(int(self.model_config.audio_pad_token_id)).all(dim=1) + non_pad = ~is_pad + if not bool(non_pad.any().item()): + return [] + idx = torch.nonzero(non_pad).squeeze(1) + breaks = torch.where(idx[1:] != idx[:-1] + 1)[0] + 1 + segment_indices = [idx] if breaks.numel() == 0 else list(torch.tensor_split(idx, breaks.cpu().tolist())) + code_segments = [audio_codes[segment] for segment in segment_indices] + decoded = self.decode_audio_codes(code_segments, return_stereo=return_stereo) + + if start_length > 0 and code_segments and decoded: + first_code_length = int(code_segments[0].shape[0]) + if first_code_length > 0: + trim_ratio = max(0.0, min(float(start_length) / float(first_code_length), 1.0)) + if trim_ratio >= 1.0: + decoded = decoded[1:] + elif trim_ratio > 0.0: + trim_samples = int(decoded[0].shape[-1] * trim_ratio) + decoded[0] = decoded[0][..., trim_samples:] + return decoded + + def decode(self, output: Any, *, return_stereo: bool = True) -> list[Optional[AssistantMessage]]: + generated_messages: list[Optional[AssistantMessage]] = [] + for start_length, generation_ids in output: + content = self._parse_text_codes(int(start_length), generation_ids[:, 0]) + audio_codes_list = self._parse_audio_codes( + int(start_length), + generation_ids[:, 1:], + return_stereo=return_stereo, + ) + if content == "": + generated_messages.append(None) + else: + generated_messages.append( + AssistantMessage( + content=content, + audio_codes_list=cast(list[Union[str, torch.Tensor]], audio_codes_list), + ) + ) + return generated_messages + + @staticmethod + def loudness_normalize( + wav: torch.Tensor, + target_dbfs: float = -20.0, + gain_range: tuple[float, float] = (-3.0, 3.0), + ) -> torch.Tensor: + wav = wav.to(torch.float32) + if wav.numel() == 0: + return wav + current_dbfs = 10.0 * torch.log10(torch.mean(wav**2) + 1e-9) + gain = max(gain_range[0], min(float(target_dbfs - current_dbfs), gain_range[1])) + return wav * (10.0 ** (gain / 20.0)) + + def _get_audio_tokenizer_device(self) -> torch.device: + audio_tokenizer = getattr(self, "audio_tokenizer", None) + if audio_tokenizer is None: + raise RuntimeError("audio_tokenizer is not set.") + try: + return next(audio_tokenizer.parameters()).device + except StopIteration: + return torch.device("cpu") + + def encode_audios_from_wav( + self, + wav_list: Union[torch.Tensor, list[torch.Tensor]], + sampling_rate: int, + n_vq: Optional[int] = None, + ) -> list[torch.Tensor]: + n_vq = self._assert_fixed_nq(n_vq) + if self.audio_tokenizer is None: + raise RuntimeError("audio_tokenizer is not set.") + if isinstance(wav_list, torch.Tensor): + wav_list = [wav_list] + target_sr = int(self.model_config.sampling_rate) + device = self._get_audio_tokenizer_device() + prepared = [] + for wav in wav_list: + if wav.ndim == 1: + wav = wav.unsqueeze(0) + if wav.shape[0] == 1: + wav = wav.repeat(2, 1) + elif wav.shape[0] > 2: + wav = wav[:2] + if int(sampling_rate) != target_sr: + wav = torchaudio.functional.resample(wav, int(sampling_rate), target_sr) + prepared.append(self.loudness_normalize(wav).to(device)) + + if hasattr(self.audio_tokenizer, "batch_encode"): + encoded = self.audio_tokenizer.batch_encode(prepared, num_quantizers=n_vq) + audio_codes = encoded.audio_codes + audio_lengths = encoded.audio_codes_lengths + else: + max_len = max(int(wav.shape[-1]) for wav in prepared) + input_values = torch.zeros(len(prepared), 1, max_len, dtype=torch.float32, device=device) + padding_mask = torch.zeros(len(prepared), max_len, dtype=torch.bool, device=device) + for index, wav in enumerate(prepared): + input_values[index, 0, : wav.shape[-1]] = wav + padding_mask[index, : wav.shape[-1]] = True + encoded = self.audio_tokenizer.encode( + input_values, + padding_mask=padding_mask, + num_quantizers=n_vq, + return_dict=True, + ) + audio_codes = encoded.audio_codes + audio_lengths = encoded.audio_codes_lengths + + if audio_codes is None or audio_lengths is None: + raise RuntimeError("audio_tokenizer did not return audio_codes/audio_codes_lengths.") + result = [] + for index in range(int(audio_codes.shape[1])): + length = int(audio_lengths[index].item()) + result.append(audio_codes[:, index, :length].transpose(0, 1).contiguous().cpu().long()) + return result + + def encode_audios_from_path( + self, + wav_path_list: Union[str, os.PathLike, list[Union[str, os.PathLike]]], + n_vq: Optional[int] = None, + ) -> list[torch.Tensor]: + if isinstance(wav_path_list, (str, os.PathLike)): + wav_path_list = [wav_path_list] + wavs = [] + target_sr = int(self.model_config.sampling_rate) + for wav_path in wav_path_list: + wav, sr = torchaudio.load(str(wav_path)) + if int(sr) != target_sr: + wav = torchaudio.functional.resample(wav, int(sr), target_sr) + wavs.append(wav) + return self.encode_audios_from_wav(wavs, target_sr, n_vq=n_vq) + + def decode_audio_codes( + self, + audio_tokens_list: Union[torch.Tensor, list[torch.Tensor]], + *, + return_stereo: bool = True, + ) -> list[torch.Tensor]: + if self.audio_tokenizer is None: + raise RuntimeError("audio_tokenizer is not set.") + if isinstance(audio_tokens_list, torch.Tensor): + audio_tokens_list = [audio_tokens_list] + if not audio_tokens_list: + return [] + + n_vq = int(self.model_config.n_vq) + device = self._get_audio_tokenizer_device() + codes_list = [ + codes[:, :n_vq].transpose(0, 1).contiguous().to(device=device, dtype=torch.long) + for codes in audio_tokens_list + ] + max_len = max(int(codes.shape[1]) for codes in codes_list) + audio_codes = torch.zeros(n_vq, len(codes_list), max_len, device=device, dtype=torch.long) + padding_mask = torch.zeros(len(codes_list), max_len, device=device, dtype=torch.bool) + for index, codes in enumerate(codes_list): + length = int(codes.shape[1]) + audio_codes[:, index, :length] = codes + padding_mask[index, :length] = True + + decoded = self.audio_tokenizer.decode( + audio_codes, + padding_mask=padding_mask, + num_quantizers=n_vq, + return_dict=True, + chunk_duration=8, + ) + audio = decoded.audio + audio_lengths = decoded.audio_lengths + if audio is None or audio_lengths is None: + raise RuntimeError("audio_tokenizer.decode did not return audio/audio_lengths.") + wavs = [] + for index in range(int(audio.shape[0])): + length = int(audio_lengths[index].item()) + wav = audio[index, :, :length].contiguous().cpu().to(torch.float32) + if not return_stereo: + if wav.shape[0] == 1: + wav = wav.squeeze(0) + else: + wav = wav.mean(dim=0) + wavs.append(wav) + return wavs diff --git a/processor_config.json b/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..afcaf45a8830d9129021cdf16da0ee85d983af47 --- /dev/null +++ b/processor_config.json @@ -0,0 +1,7 @@ +{ + "processor_class": "MossTTSLocalProcessor", + "auto_map": { + "AutoProcessor": "processing_moss_tts.MossTTSLocalProcessor" + }, + "audio_tokenizer_name_or_path": "OpenMOSS-Team/MOSS-Audio-Tokenizer-v2" +} \ No newline at end of file diff --git a/qwen3_decoder.py b/qwen3_decoder.py new file mode 100644 index 0000000000000000000000000000000000000000..3756bd7033d88388d51a9e64d2fa0efd71959e84 --- /dev/null +++ b/qwen3_decoder.py @@ -0,0 +1,582 @@ +# coding=utf-8 +from __future__ import annotations + +import json +from pathlib import Path +from typing import Optional + +import torch +import torch.nn as nn +import torch.utils.checkpoint +from safetensors.torch import load_file +from transformers.activations import ACT2FN +from transformers.modeling_outputs import BaseModelOutputWithPast + +from .gpt2_decoder import PackedSequenceMetadata, MossTTSNanoGPT2Model + +try: + from flash_attn import flash_attn_func, flash_attn_varlen_func + from flash_attn.bert_padding import pad_input, unpad_input + + _FLASH_ATTN_AVAILABLE = True +except Exception: + flash_attn_func = None + flash_attn_varlen_func = None + pad_input = None + unpad_input = None + _FLASH_ATTN_AVAILABLE = False + + +class MossQwen3RMSNorm(nn.Module): + def __init__(self, hidden_size: int, eps: float = 1e-6) -> None: + super().__init__() + self.weight = nn.Parameter(torch.ones(hidden_size)) + self.variance_epsilon = eps + + def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: + input_dtype = hidden_states.dtype + hidden_states = hidden_states.to(torch.float32) + variance = hidden_states.pow(2).mean(-1, keepdim=True) + hidden_states = hidden_states * torch.rsqrt(variance + self.variance_epsilon) + return self.weight * hidden_states.to(input_dtype) + + +class MossQwen3RotaryEmbedding(nn.Module): + def __init__(self, config) -> None: + super().__init__() + head_dim = int(getattr(config, "head_dim", config.hidden_size // config.num_attention_heads)) + rope_theta = getattr(config, "rope_theta", None) + if rope_theta is None: + rope_scaling = getattr(config, "rope_scaling", None) + if isinstance(rope_scaling, dict): + rope_theta = rope_scaling.get("rope_theta") + if rope_theta is None: + rope_theta = 1000000.0 + rope_theta = float(rope_theta) + self.head_dim = head_dim + self.rope_theta = rope_theta + self.register_buffer("inv_freq", self._compute_inv_freq(), persistent=False) + + def _compute_inv_freq(self, device: Optional[torch.device] = None) -> torch.Tensor: + return 1.0 / ( + self.rope_theta ** (torch.arange(0, self.head_dim, 2, device=device, dtype=torch.float32) / self.head_dim) + ) + + def forward( + self, + hidden_states: torch.Tensor, + position_ids: torch.LongTensor, + ) -> tuple[torch.Tensor, torch.Tensor]: + inv_freq = self._compute_inv_freq(device=hidden_states.device) + freqs = torch.einsum( + "bs,d->bsd", + position_ids.to(device=hidden_states.device, dtype=inv_freq.dtype), + inv_freq, + ) + emb = torch.cat((freqs, freqs), dim=-1) + return emb.cos().to(dtype=hidden_states.dtype), emb.sin().to(dtype=hidden_states.dtype) + + +def rotate_half(hidden_states: torch.Tensor) -> torch.Tensor: + first_half = hidden_states[..., : hidden_states.shape[-1] // 2] + second_half = hidden_states[..., hidden_states.shape[-1] // 2 :] + return torch.cat((-second_half, first_half), dim=-1) + + +def apply_rotary_pos_emb( + query: torch.Tensor, + key: torch.Tensor, + cos: torch.Tensor, + sin: torch.Tensor, +) -> tuple[torch.Tensor, torch.Tensor]: + cos = cos.unsqueeze(-2) + sin = sin.unsqueeze(-2) + query = (query * cos) + (rotate_half(query) * sin) + key = (key * cos) + (rotate_half(key) * sin) + return query, key + + +def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: + if n_rep == 1: + return hidden_states + batch, seq_len, num_key_value_heads, head_dim = hidden_states.shape + hidden_states = hidden_states[:, :, :, None, :].expand(batch, seq_len, num_key_value_heads, n_rep, head_dim) + return hidden_states.reshape(batch, seq_len, num_key_value_heads * n_rep, head_dim) + + +class MossQwen3MLP(nn.Module): + def __init__(self, config) -> None: + super().__init__() + self.gate_proj = nn.Linear(config.hidden_size, config.intermediate_size, bias=False) + self.up_proj = nn.Linear(config.hidden_size, config.intermediate_size, bias=False) + self.down_proj = nn.Linear(config.intermediate_size, config.hidden_size, bias=False) + self.act_fn = ACT2FN[getattr(config, "hidden_act", "silu")] + + def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: + return self.down_proj(self.act_fn(self.gate_proj(hidden_states)) * self.up_proj(hidden_states)) + + +class MossQwen3Attention(nn.Module): + def __init__(self, config, layer_idx: int) -> None: + super().__init__() + self.config = config + self.layer_idx = int(layer_idx) + self.hidden_size = int(config.hidden_size) + self.num_heads = int(config.num_attention_heads) + self.num_key_value_heads = int(config.num_key_value_heads) + self.head_dim = int(getattr(config, "head_dim", self.hidden_size // self.num_heads)) + self.num_key_value_groups = self.num_heads // self.num_key_value_heads + self.scaling = self.head_dim ** -0.5 + self.attention_dropout = float(getattr(config, "attention_dropout", 0.0)) + self.attn_implementation = str(getattr(config, "_attn_implementation", "eager")) + + self.q_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=bool(config.attention_bias)) + self.k_proj = nn.Linear( + self.hidden_size, + self.num_key_value_heads * self.head_dim, + bias=bool(config.attention_bias), + ) + self.v_proj = nn.Linear( + self.hidden_size, + self.num_key_value_heads * self.head_dim, + bias=bool(config.attention_bias), + ) + self.o_proj = nn.Linear(self.num_heads * self.head_dim, self.hidden_size, bias=bool(config.attention_bias)) + self.q_norm = MossQwen3RMSNorm(self.head_dim, eps=float(config.rms_norm_eps)) + self.k_norm = MossQwen3RMSNorm(self.head_dim, eps=float(config.rms_norm_eps)) + + def _causal_attention_mask( + self, + attention_mask: Optional[torch.Tensor], + query_length: int, + key_length: int, + device: torch.device, + ) -> torch.Tensor: + query_positions = torch.arange(query_length, device=device, dtype=torch.long) + query_positions = query_positions + max(key_length - query_length, 0) + key_positions = torch.arange(key_length, device=device, dtype=torch.long) + causal = key_positions.unsqueeze(0) <= query_positions.unsqueeze(1) + causal = causal.unsqueeze(0).unsqueeze(0) + if attention_mask is None: + return causal + key_mask = attention_mask[:, None, None, :].to(dtype=torch.bool) + return causal & key_mask + + def _eager_attention( + self, + query: torch.Tensor, + key: torch.Tensor, + value: torch.Tensor, + attention_mask: Optional[torch.Tensor], + ) -> torch.Tensor: + key = repeat_kv(key, self.num_key_value_groups) + value = repeat_kv(value, self.num_key_value_groups) + query = query.transpose(1, 2) + key = key.transpose(1, 2) + value = value.transpose(1, 2) + scores = torch.matmul(query, key.transpose(-1, -2)) * self.scaling + mask = self._causal_attention_mask( + attention_mask=attention_mask, + query_length=query.shape[-2], + key_length=key.shape[-2], + device=query.device, + ) + scores = scores.masked_fill(~mask, torch.finfo(scores.dtype).min) + probs = torch.softmax(scores, dim=-1) + if self.training and self.attention_dropout > 0: + probs = torch.dropout(probs, self.attention_dropout, train=True) + output = torch.matmul(probs, value) + return output.transpose(1, 2).contiguous() + + def _sdpa_attention( + self, + query: torch.Tensor, + key: torch.Tensor, + value: torch.Tensor, + attention_mask: Optional[torch.Tensor], + ) -> torch.Tensor: + key = repeat_kv(key, self.num_key_value_groups) + value = repeat_kv(value, self.num_key_value_groups) + query = query.transpose(1, 2) + key = key.transpose(1, 2) + value = value.transpose(1, 2) + mask = None + if attention_mask is not None or query.shape[-2] != key.shape[-2]: + mask = self._causal_attention_mask( + attention_mask=attention_mask, + query_length=query.shape[-2], + key_length=key.shape[-2], + device=query.device, + ) + output = torch.nn.functional.scaled_dot_product_attention( + query, + key, + value, + attn_mask=mask, + dropout_p=self.attention_dropout if self.training else 0.0, + is_causal=mask is None, + scale=self.scaling, + ) + return output.transpose(1, 2).contiguous() + + def _flash_attention( + self, + query: torch.Tensor, + key: torch.Tensor, + value: torch.Tensor, + attention_mask: Optional[torch.Tensor], + packed_metadata: Optional[PackedSequenceMetadata], + ) -> torch.Tensor: + if not _FLASH_ATTN_AVAILABLE: + raise ImportError("flash_attn is not installed, but attn_implementation='flash_attention_2' was requested.") + if query.device.type != "cuda": + raise ValueError("flash_attention_2 requires CUDA tensors.") + if query.dtype not in (torch.float16, torch.bfloat16): + raise ValueError(f"flash_attention_2 requires fp16/bf16 tensors, got dtype={query.dtype}.") + + dropout_p = self.attention_dropout if self.training else 0.0 + if packed_metadata is not None: + if packed_metadata.indices is not None: + query = query.reshape(-1, self.num_heads, self.head_dim).index_select(0, packed_metadata.indices) + key = key.reshape(-1, self.num_key_value_heads, self.head_dim).index_select(0, packed_metadata.indices) + value = value.reshape(-1, self.num_key_value_heads, self.head_dim).index_select(0, packed_metadata.indices) + output = flash_attn_varlen_func( + query, + key, + value, + packed_metadata.cu_seqlens, + packed_metadata.cu_seqlens, + packed_metadata.max_seqlen, + packed_metadata.max_seqlen, + dropout_p=dropout_p, + causal=True, + ) + if packed_metadata.indices is None: + return output + return pad_input( + output, + packed_metadata.indices, + packed_metadata.batch_size, + packed_metadata.seq_len, + ) + + if attention_mask is None or bool(attention_mask.all()): + return flash_attn_func(query, key, value, dropout_p=dropout_p, causal=True) + + if query.shape[1] != key.shape[1]: + query_attention_mask = attention_mask[:, -query.shape[1] :] + unpadded_query, query_indices, cu_seqlens_q, max_seqlen_q, _ = unpad_input( + query, + query_attention_mask, + ) + unpadded_key, _, cu_seqlens_k, max_seqlen_k, _ = unpad_input(key, attention_mask) + unpadded_value, _, _, _, _ = unpad_input(value, attention_mask) + output = flash_attn_varlen_func( + unpadded_query, + unpadded_key, + unpadded_value, + cu_seqlens_q, + cu_seqlens_k, + max_seqlen_q, + max_seqlen_k, + dropout_p=dropout_p, + causal=True, + ) + return pad_input(output, query_indices, query.shape[0], query.shape[1]) + + unpadded_query, indices, cu_seqlens, max_seqlen, _ = unpad_input(query, attention_mask) + unpadded_key, _, _, _, _ = unpad_input(key, attention_mask) + unpadded_value, _, _, _, _ = unpad_input(value, attention_mask) + output = flash_attn_varlen_func( + unpadded_query, + unpadded_key, + unpadded_value, + cu_seqlens, + cu_seqlens, + max_seqlen, + max_seqlen, + dropout_p=dropout_p, + causal=True, + ) + return pad_input(output, indices, query.shape[0], query.shape[1]) + + def forward( + self, + hidden_states: torch.Tensor, + position_embeddings: tuple[torch.Tensor, torch.Tensor], + attention_mask: Optional[torch.Tensor] = None, + packed_metadata: Optional[PackedSequenceMetadata] = None, + layer_past: Optional[tuple[torch.Tensor, torch.Tensor]] = None, + use_cache: bool = False, + ) -> tuple[torch.Tensor, Optional[tuple[torch.Tensor, torch.Tensor]]]: + input_shape = hidden_states.shape[:-1] + query_states = self.q_norm( + self.q_proj(hidden_states).view(*input_shape, self.num_heads, self.head_dim) + ) + key_states = self.k_norm( + self.k_proj(hidden_states).view(*input_shape, self.num_key_value_heads, self.head_dim) + ) + value_states = self.v_proj(hidden_states).view(*input_shape, self.num_key_value_heads, self.head_dim) + + cos, sin = position_embeddings + query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin) + + if layer_past is not None: + past_key, past_value = layer_past + key_states = torch.cat([past_key.to(device=key_states.device, dtype=key_states.dtype), key_states], dim=1) + value_states = torch.cat( + [past_value.to(device=value_states.device, dtype=value_states.dtype), value_states], + dim=1, + ) + + present = (key_states, value_states) if use_cache else None + if self.attn_implementation == "flash_attention_2": + attn_output = self._flash_attention( + query=query_states, + key=key_states, + value=value_states, + attention_mask=attention_mask, + packed_metadata=packed_metadata, + ) + elif self.attn_implementation == "sdpa": + attn_output = self._sdpa_attention( + query=query_states, + key=key_states, + value=value_states, + attention_mask=attention_mask, + ) + else: + attn_output = self._eager_attention( + query=query_states, + key=key_states, + value=value_states, + attention_mask=attention_mask, + ) + attn_output = attn_output.reshape(*input_shape, -1).contiguous() + return self.o_proj(attn_output), present + + +class MossQwen3DecoderLayer(nn.Module): + def __init__(self, config, layer_idx: int) -> None: + super().__init__() + self.self_attn = MossQwen3Attention(config=config, layer_idx=layer_idx) + self.mlp = MossQwen3MLP(config) + self.input_layernorm = MossQwen3RMSNorm(config.hidden_size, eps=float(config.rms_norm_eps)) + self.post_attention_layernorm = MossQwen3RMSNorm(config.hidden_size, eps=float(config.rms_norm_eps)) + + def forward( + self, + hidden_states: torch.Tensor, + attention_mask: Optional[torch.Tensor] = None, + packed_metadata: Optional[PackedSequenceMetadata] = None, + layer_past: Optional[tuple[torch.Tensor, torch.Tensor]] = None, + use_cache: bool = False, + position_embeddings: Optional[tuple[torch.Tensor, torch.Tensor]] = None, + ) -> tuple[torch.Tensor, Optional[tuple[torch.Tensor, torch.Tensor]]]: + residual = hidden_states + hidden_states = self.input_layernorm(hidden_states) + attn_output, present = self.self_attn( + hidden_states=hidden_states, + position_embeddings=position_embeddings, + attention_mask=attention_mask, + packed_metadata=packed_metadata, + layer_past=layer_past, + use_cache=use_cache, + ) + hidden_states = residual + attn_output + + residual = hidden_states + hidden_states = self.post_attention_layernorm(hidden_states) + hidden_states = residual + self.mlp(hidden_states) + return hidden_states, present + + +class MossQwen3Model(nn.Module): + def __init__(self, config) -> None: + super().__init__() + self.config = config + self.attn_implementation = str(getattr(config, "_attn_implementation", "eager")) + self.padding_idx = getattr(config, "pad_token_id", None) + self.vocab_size = int(config.vocab_size) + self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, self.padding_idx) + self.layers = nn.ModuleList( + [MossQwen3DecoderLayer(config, layer_idx=index) for index in range(config.num_hidden_layers)] + ) + self.norm = MossQwen3RMSNorm(config.hidden_size, eps=float(config.rms_norm_eps)) + self.rotary_emb = MossQwen3RotaryEmbedding(config) + self.gradient_checkpointing = False + self.gradient_checkpointing_use_reentrant = bool( + getattr(config, "gradient_checkpointing_use_reentrant", False) + ) + self._reset_parameters() + + def _reset_parameters(self) -> None: + init_std = float(getattr(self.config, "initializer_range", 0.02)) + for module in self.modules(): + if isinstance(module, nn.Linear): + nn.init.normal_(module.weight, mean=0.0, std=init_std) + if module.bias is not None: + nn.init.zeros_(module.bias) + elif isinstance(module, nn.Embedding): + nn.init.normal_(module.weight, mean=0.0, std=init_std) + + def get_input_embeddings(self): + return self.embed_tokens + + def set_input_embeddings(self, value): + self.embed_tokens = value + + def load_qwen3_pretrained_weights(self, pretrained_path: str) -> None: + model_dir = Path(pretrained_path) + index_path = model_dir / "model.safetensors.index.json" + if not index_path.exists(): + raise FileNotFoundError(f"Missing Qwen3 safetensors index: {index_path}") + with index_path.open("r", encoding="utf-8") as handle: + index = json.load(handle) + weight_map = index.get("weight_map", {}) + shard_to_keys: dict[str, list[str]] = {} + for key, shard in weight_map.items(): + if not key.startswith("model."): + continue + shard_to_keys.setdefault(str(shard), []).append(key) + + state_dict = self.state_dict() + loaded_state = {} + for shard, keys in sorted(shard_to_keys.items()): + shard_tensors = load_file(str(model_dir / shard), device="cpu") + for key in keys: + target_key = key[len("model.") :] + if target_key not in state_dict: + continue + tensor = shard_tensors[key] + if tuple(tensor.shape) != tuple(state_dict[target_key].shape): + raise ValueError( + f"Shape mismatch while loading Qwen3 weight {key}: " + f"checkpoint={tuple(tensor.shape)} model={tuple(state_dict[target_key].shape)}" + ) + loaded_state[target_key] = tensor + + missing, unexpected = self.load_state_dict(loaded_state, strict=False) + unexpected = [key for key in unexpected if key] + if unexpected: + raise RuntimeError(f"Unexpected Qwen3 pretrained keys after load: {unexpected[:10]}") + missing = [key for key in missing if key not in loaded_state] + if missing: + raise RuntimeError(f"Missing Qwen3 pretrained keys after load: {missing[:10]}") + + def forward( + self, + input_ids: Optional[torch.LongTensor] = None, + past_key_values: Optional[tuple[tuple[torch.Tensor, torch.Tensor], ...]] = None, + attention_mask: Optional[torch.Tensor] = None, + position_ids: Optional[torch.LongTensor] = None, + inputs_embeds: Optional[torch.FloatTensor] = None, + use_cache: Optional[bool] = None, + output_attentions: Optional[bool] = None, + output_hidden_states: Optional[bool] = None, + return_dict: bool = True, + cu_seqlens: Optional[torch.Tensor] = None, + num_sequences: Optional[torch.Tensor] = None, + ) -> BaseModelOutputWithPast: + del input_ids, output_attentions + if inputs_embeds is None: + raise ValueError("inputs_embeds must be provided.") + + use_cache = bool(use_cache) + if use_cache and cu_seqlens is not None: + raise ValueError("use_cache=True is not supported together with cu_seqlens packing.") + + hidden_states = inputs_embeds + if attention_mask is None: + attention_mask = torch.ones(hidden_states.shape[:2], dtype=torch.bool, device=hidden_states.device) + else: + attention_mask = attention_mask.to(dtype=torch.bool, device=hidden_states.device) + query_attention_mask = attention_mask[:, -hidden_states.shape[1] :] + + packed_metadata = None + if position_ids is None: + if cu_seqlens is not None: + position_ids = MossTTSNanoGPT2Model.build_packed_position_ids( + attention_mask=attention_mask, + cu_seqlens=cu_seqlens.to(device=hidden_states.device), + num_sequences=num_sequences.to(device=hidden_states.device) if num_sequences is not None else None, + sequence_length=hidden_states.shape[1], + ) + elif attention_mask is not None: + position_ids = attention_mask.long().cumsum(dim=-1) - 1 + position_ids = position_ids.masked_fill(~attention_mask, 0) + position_ids = position_ids[:, -hidden_states.shape[1] :] + else: + past_length = 0 + if past_key_values is not None and len(past_key_values) > 0: + past_length = past_key_values[0][0].shape[1] + position_ids = torch.arange(hidden_states.shape[1], device=hidden_states.device, dtype=torch.long) + position_ids = position_ids + past_length + position_ids = position_ids.unsqueeze(0).expand(hidden_states.shape[0], -1) + + if cu_seqlens is not None and self.attn_implementation == "flash_attention_2": + packed_metadata = MossTTSNanoGPT2Model.build_packed_metadata( + hidden_states=hidden_states, + cu_seqlens=cu_seqlens.to(device=hidden_states.device), + num_sequences=num_sequences.to(device=hidden_states.device) if num_sequences is not None else None, + ) + + hidden_states = hidden_states * query_attention_mask.unsqueeze(-1).to(dtype=hidden_states.dtype) + position_embeddings = self.rotary_emb(hidden_states, position_ids) + + all_hidden_states = () if output_hidden_states else None + presents = [] if use_cache else None + for layer_index, decoder_layer in enumerate(self.layers): + if output_hidden_states: + all_hidden_states = all_hidden_states + (hidden_states,) + + if self.gradient_checkpointing and self.training: + if use_cache: + raise ValueError("use_cache=True is not supported when gradient checkpointing is enabled during training.") + + def custom_forward(*inputs): + output, _ = decoder_layer( + hidden_states=inputs[0], + attention_mask=inputs[1], + packed_metadata=packed_metadata, + layer_past=None, + use_cache=False, + position_embeddings=position_embeddings, + ) + return output + + hidden_states = torch.utils.checkpoint.checkpoint( + custom_forward, + hidden_states, + attention_mask, + use_reentrant=self.gradient_checkpointing_use_reentrant, + ) + present = None + else: + hidden_states, present = decoder_layer( + hidden_states=hidden_states, + attention_mask=attention_mask, + packed_metadata=packed_metadata, + layer_past=None if past_key_values is None else past_key_values[layer_index], + use_cache=use_cache, + position_embeddings=position_embeddings, + ) + + hidden_states = hidden_states * query_attention_mask.unsqueeze(-1).to(dtype=hidden_states.dtype) + if presents is not None: + presents.append(present) + + hidden_states = self.norm(hidden_states) + hidden_states = hidden_states * query_attention_mask.unsqueeze(-1).to(dtype=hidden_states.dtype) + if output_hidden_states: + all_hidden_states = all_hidden_states + (hidden_states,) + + if not return_dict: + return (hidden_states, tuple(presents) if presents is not None else None, all_hidden_states, None) + + return BaseModelOutputWithPast( + last_hidden_state=hidden_states, + past_key_values=tuple(presents) if presents is not None else None, + hidden_states=all_hidden_states, + attentions=None, + ) diff --git a/requirements-legacy.txt b/requirements-legacy.txt new file mode 100644 index 0000000000000000000000000000000000000000..20e959a8e7b684e2cf87b62757aa7e72812cdfc3 --- /dev/null +++ b/requirements-legacy.txt @@ -0,0 +1,9 @@ +torch>=2.9 +transformers==5.14.1 +accelerate==1.14.0 +safetensors +huggingface_hub +numpy +scipy +soundfile>=0.13 +moondream>=2.4.0 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ae48abd6e48a4b1123a4378c3f39ce1156cabc29 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# Current optimized pipeline; see README for the CUDA Torch wheel install. +-r optimized_pipeline/requirements.txt diff --git a/runtime/base_infer.py b/runtime/base_infer.py new file mode 100644 index 0000000000000000000000000000000000000000..b9f7a0ad618ea669d9f25cbcc18643f831b8f298 --- /dev/null +++ b/runtime/base_infer.py @@ -0,0 +1,144 @@ +"""Humaneness Voice Large 1.3 Alpha: portable full-model inference. + +Use a downloaded model directory, or a Hugging Face model ID. This file has no +JUPITER-specific runtime dependency. Twelve MOSS-v2 codebooks,48kHz mono. +""" +import argparse +import json +from pathlib import Path + +LANGUAGES = {'en': 'English', 'de': 'German', 'nl': 'Dutch', 'fr': 'French', 'es': 'Spanish'} + + +def load_model(directory, device='cuda:0'): + import torch + from transformers import AutoModel, AutoTokenizer + from transformers.dynamic_module_utils import get_class_from_dynamic_module + model = AutoModel.from_pretrained(str(directory), trust_remote_code=True, + dtype=torch.bfloat16, attn_implementation='sdpa').to(device).eval() + Processor = get_class_from_dynamic_module('processing_moss_tts.MossTTSLocalProcessor', str(directory)) + tokenizer = AutoTokenizer.from_pretrained(str(directory), trust_remote_code=True) + proc = Processor(tokenizer=tokenizer, audio_tokenizer=None, model_config=model.config) + return model, proc + + +def load_codec(proc, path, device='cuda:0'): + from transformers import AutoModel + codec = AutoModel.from_pretrained(str(path), trust_remote_code=True, codec_weight_dtype='fp32') + if hasattr(codec, 'set_compute_dtype'): + codec.set_compute_dtype('bf16') + proc.audio_tokenizer = codec.to(device).eval() + return proc + + +def build_user(proc, *, text, prompt, frames, language, reference=None, alias=None): + if not text.strip() or not prompt.strip() or language not in LANGUAGES: + raise ValueError('Nonempty literal text, English directions and a supported language required') + if reference is not None and (reference.ndim != 2 or reference.shape[1] != 12 + or not 63 <= len(reference) <= 187): + raise ValueError('Reference codes must contain12codebooks over5.04–14.96seconds') + if alias is not None: + if reference is not None: + raise ValueError('Choose either a reference recording or a registered voice name, not both') + catalog = json.loads(Path(__file__).with_name('voices.json').read_text()) + names = {v['speaker_alias'] for v in catalog['voices']} + if alias not in names: + raise ValueError('Unknown voice name; see VOICE_ALIASES.md and voices.json') + user = proc.build_user_message(text=text, instruction=prompt, tokens=int(frames), + language=LANGUAGES[language], reference=[reference] if reference is not None else None) + if alias is not None: + # Exact alias representation used by training/legacy/acting_data.py. + # It is not an invented prefix in the spoken text or a new special token. + marker = '- Reference(s):\nNone\n' + if user['content'].count(marker) != 1 or user.get('audio_codes_list'): + raise RuntimeError('Processor wrapper no longer matches the trained voice-name format') + user['content'] = user['content'].replace(marker, f'- Reference(s):\nSpeaker: {alias}\n', 1) + return user + + +def generate(model, proc, user, *, seed=777, max_frames=625, device='cuda:0'): + import torch + batch = proc([[user]], mode='generation') + torch.manual_seed(seed) + torch.cuda.manual_seed_all(seed) + with torch.inference_mode(), torch.autocast('cuda', dtype=torch.bfloat16): + output = model.generate(input_ids=batch['input_ids'].to(device), + attention_mask=batch['attention_mask'].to(device), max_new_frames=max_frames, + do_sample=True, audio_temperature=1., audio_top_p=.95, audio_top_k=50, + audio_repetition_penalty=1., use_kv_cache=True) + prefix, sequence = output[0] + if prefix != 0 or sequence.ndim != 2 or sequence.shape[1] != 13: + raise RuntimeError('Unexpected MOSS frame layout') + codes = sequence[1:, 1:] + codes = codes[(codes[:, 0] >= 0) & (codes[:, 0] != model.config.audio_pad_token_id)] + if len(codes) < 2 or int(codes.min()) < 0 or int(codes.max()) > 1023: + raise RuntimeError('Too few frames or corrupt codec indices') + return codes.cpu() + + +def decode(proc, codes, device='cuda:0'): + import numpy as np + import torch + with torch.inference_mode(): + wave = proc.decode_audio_codes([codes.to(device)], return_stereo=False)[0] + wave = wave.float().cpu().numpy().reshape(-1) + rate = int(proc.model_config.sampling_rate) + if not np.isfinite(wave).all() or abs(len(wave) / len(codes) - rate / 12.5) > .01 * rate / 12.5: + raise RuntimeError('Codec frame-rate/sample-rate canary failed') + return wave, rate + + +def main(): + p = argparse.ArgumentParser(description=__doc__) + p.add_argument('--model', default='laion/Humaneness-Voice-Large-1.3-Alpha') + p.add_argument('--codec', default='OpenMOSS-Team/MOSS-Audio-Tokenizer-v2') + p.add_argument('--text', required=True, help='Literal spoken words, without directing tags') + p.add_argument('--prompt', help='GENERAL/SCRIPT directions; literal \\n accepted') + p.add_argument('--prompt-file', type=Path) + p.add_argument('--language', choices=LANGUAGES, default='en') + voice = p.add_mutually_exclusive_group() + voice.add_argument('--reference-wav', type=Path) + voice.add_argument('--voice-name', help='Registered fictional voice alias; see VOICE_ALIASES.md') + p.add_argument('--seconds', type=float, default=8.) + p.add_argument('--seed', type=int, default=777) + p.add_argument('--output', type=Path, required=True) + args = p.parse_args() + if bool(args.prompt) == bool(args.prompt_file): + p.error('Supply exactly one of --prompt or --prompt-file') + if not 1 <= args.seconds <= 60: + p.error('Target seconds must be between1and60') + import numpy as np + import soundfile as sf + import torch + if not torch.cuda.is_available(): + raise RuntimeError('The tested path requires a CUDA GPU') + device = 'cuda:0' + model, proc = load_model(args.model, device) + load_codec(proc, args.codec, device) + reference = None + if args.reference_wav: + wave, sr = sf.read(args.reference_wav, dtype='float32', always_2d=True) + if not np.isfinite(wave).all() or len(wave) / sr < 5.04: + raise ValueError('Use at least5.04seconds of clean single-speaker reference speech') + # Never reinstate37frames/2.96s. Crop waveform BEFORE encoding. + wave = wave[:int(sr * 14.96)] + with torch.inference_mode(): + reference = proc.encode_audios_from_wav([torch.from_numpy(wave.T.copy())], int(sr), n_vq=12)[0][:187] + prompt = args.prompt_file.read_text() if args.prompt_file else args.prompt.replace('\\n', '\n') + frames = round(args.seconds * 12.5) + user = build_user(proc, text=args.text, prompt=prompt, frames=frames, + language=args.language, reference=reference, alias=args.voice_name) + codes = generate(model, proc, user, seed=args.seed, max_frames=min(1000, frames + 190)) + wave, sr = decode(proc, codes) + args.output.parent.mkdir(parents=True, exist_ok=True) + if args.output.exists(): + raise FileExistsError('Refusing to overwrite ' + str(args.output)) + sf.write(args.output, wave, sr, subtype='PCM_16') + print(json.dumps({'output': str(args.output), 'duration_s': len(wave) / sr, + 'requested_s': args.seconds, 'frames': len(codes), 'language': args.language, + 'reference_frames': len(reference) if reference is not None else 0, + 'voice_name': args.voice_name, 'seed': args.seed})) + + +if __name__ == '__main__': + main() diff --git a/runtime/native_cfg.py b/runtime/native_cfg.py new file mode 100644 index 0000000000000000000000000000000000000000..5387687c7f3de8abd29ead5247b56c969d146a3f --- /dev/null +++ b/runtime/native_cfg.py @@ -0,0 +1,73 @@ +"""True logit CFG, same sampled token in both caches, independent RNG per row. + +Guides all twelve causal audio channels at every 80ms frame. The conditional +stop head remains unmodified. g=1 uses conditional logits exactly, avoiding +subtract/add cancellation. Does not toggle or re-merge an adapter. +""" +import time +import torch + +def draw(model,logits,generators,top_p): + scores=model._filter_logits(logits.float(),top_k=50,top_p=top_p) + probs=torch.softmax(scores,-1) + return torch.cat([torch.multinomial(probs[i:i+1],1,generator=g).reshape(1) + for i,g in enumerate(generators)]) + +@torch.inference_mode() +def generate(model,proc,conditional,neutral,seeds,guidance,max_frames): + if not seeds:raise ValueError('Empty batch') + dev=next(model.parameters()).device;B=len(seeds) + generators=[torch.Generator(device=dev).manual_seed(s) for s in seeds] + states=[] + for user in [conditional,neutral]: + b=proc([[user]],mode='generation') + ids=b['input_ids'].to(dev).repeat(B,1,1) + states.append(dict(mi=ids,am=b['attention_mask'].to(dev,dtype=torch.bool).repeat(B,1),pkv=None)) + slot=int(model.config.audio_assistant_slot_token_id);end=int(model.config.audio_end_token_id) + pad=int(model.config.audio_pad_token_id);n=int(model.config.n_vq) + if n!=12:raise ValueError('Pilot requires twelve codebooks') + finished=torch.zeros(B,dtype=torch.bool,device=dev);frames=[] + local_dtype=model.local_transformer.ln_f.weight.dtype + torch.cuda.synchronize();started=time.monotonic() + with torch.autocast('cuda',dtype=torch.bfloat16): + for _ in range(max_frames): + hidden=[];local_cache=[] + for st in states: + out=model.transformer(input_ids=None,past_key_values=st['pkv'],attention_mask=st['am'], + position_ids=None,inputs_embeds=model._build_inputs_embeds(st['mi']),use_cache=True, + output_attentions=False,output_hidden_states=False,return_dict=True, + cu_seqlens=None,num_sequences=None) + st['pkv']=out.past_key_values + prefix=model._global_hidden_to_local(out.last_hidden_state[:,-1,:]).to(local_dtype) + h,cache=model._decode_local_hidden_states_with_cache(prefix.unsqueeze(1)) + hidden.append(h[:,-1,:]);local_cache.append(cache) + if not model._use_binary_local_text_head():raise ValueError('Unexpected stop-head contract') + stop_ix=draw(model,model.local_text_lm_head(hidden[0]),generators,1.) + stop=model._local_text_candidate_ids(dev)[stop_ix] + cont=stop.eq(slot)&~finished;finished|=stop.eq(end) + if not bool(cont.any()):break + tokens=[] + for channel in range(n): + cond=model.audio_lm_heads[channel](hidden[0]).float() + neu=model.audio_lm_heads[channel](hidden[1]).float() + guided=cond if guidance==1. else neu+guidance*(cond-neu) + token=draw(model,guided,generators,.95);tokens.append(token) + if channel+1=0 and int(code.max())<=1023):raise ValueError('Bad audio index') + result.append(code) + return result,dict(seconds=time.monotonic()-started,ended=finished.cpu().tolist(),batch=B, + peak_memory_bytes=torch.cuda.max_memory_allocated()) diff --git a/special_tokens_map.json b/special_tokens_map.json new file mode 100644 index 0000000000000000000000000000000000000000..a2a920bbe1a549d19078491a836432ca805caa22 --- /dev/null +++ b/special_tokens_map.json @@ -0,0 +1,21 @@ +{ + "additional_special_tokens": [ + "<|audio_start|>", + "<|audio_end|>", + "<|audio_pad|>" + ], + "eos_token": { + "content": "<|im_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "pad_token": { + "content": "<|endoftext|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + } +} diff --git a/stats/DONE.json b/stats/DONE.json new file mode 100644 index 0000000000000000000000000000000000000000..ab3f71389872cae816b3157af572d586bd2eecb6 --- /dev/null +++ b/stats/DONE.json @@ -0,0 +1,6 @@ +{ + "status": "COMPLETE", + "step": 9874, + "contract_sha256": "cdbe7ac3f5d780f332889ac4d1e6fc31b69f51b4906bea0325cddf6c06d67927", + "time": 1794022095.6726804 +} diff --git a/stats/editing_pilot.json b/stats/editing_pilot.json new file mode 100644 index 0000000000000000000000000000000000000000..a1decea363b603e1fca0c1cb4d5229af5cf80cc9 --- /dev/null +++ b/stats/editing_pilot.json @@ -0,0 +1,46 @@ +{ + "version": "script-edge-trim-v1", + "source_generation_job": 2738551, + "new_neural_jobs": 0, + "cpu_workers": 4, + "source_candidates": 1536, + "trimmed_candidates": 1416, + "review_candidates": 120, + "episode_conditions": 160, + "assembled_edited_conditions": 123, + "review_episode_conditions": 37, + "diagnostic_examples": [ + "en-conversation-02-podcast-segment-free-u06-c00", + "en-conversation-01-podcast-segment-timed-u03-c00", + "en-conversation-04-podcast-block-free-u02-c03", + "en-conversation-04-podcast-block-timed-u02-c03", + "en-conversation-01-base17-segment-free-u02-c00", + "en-conversation-05-base17-segment-timed-u13-c00", + "en-conversation-04-base17-block-free-u02-c05", + "en-conversation-02-base17-block-timed-u01-c01", + "de-conversation-02-podcast-segment-free-u01-c00", + "de-conversation-01-podcast-segment-timed-u07-c00", + "de-conversation-02-podcast-block-free-u02-c02", + "de-conversation-05-podcast-block-timed-u01-c05", + "de-conversation-01-base17-segment-free-u03-c00", + "de-conversation-05-base17-segment-timed-u13-c00", + "de-conversation-04-base17-block-free-u02-c04", + "de-conversation-05-base17-block-timed-u03-c06" + ], + "tail_variants_ms": [ + 100, + 150, + 200 + ], + "default_tail_ms": 150, + "lead_guard_ms": 80, + "fade_in_ms_max": 20, + "fade_out_ms_max": 50, + "join_gap_word_clock_ms": 400, + "selection_unchanged": true, + "metric_scope": "All new edits are unscored waveform derivatives. No original score is relabelled as a new measurement.", + "removed_tail_seconds_total": 11272.060000000058, + "median_source_duration_s": 19.68, + "median_trimmed_duration_s": 17.51, + "time": 1794069875.103719 +} diff --git a/stats/gpu_smoke_details.json b/stats/gpu_smoke_details.json new file mode 100644 index 0000000000000000000000000000000000000000..aa920030750af6e69bf12305f582b21cac1b0c07 --- /dev/null +++ b/stats/gpu_smoke_details.json @@ -0,0 +1,72 @@ +{ + "job": 2743115, + "state": "COMPLETED", + "exit_code": "0:0", + "elapsed_s": 328, + "conditions": [ + { + "condition": "de-pairs", + "candidate_count": 4, + "accepted": 2, + "rejected": 2, + "selected_units": 2, + "duration_s": 20.07, + "selected_pre_edit_wer": [ + 0.09523809523809523, + 0.0 + ], + "internal_pause_cuts_triggered": 0, + "no_vc": true + }, + { + "condition": "de-turns", + "candidate_count": 4, + "accepted": 3, + "rejected": 1, + "selected_units": 2, + "duration_s": 11.99, + "selected_pre_edit_wer": [ + 0.18181818181818182, + 0.0 + ], + "internal_pause_cuts_triggered": 0, + "no_vc": true + }, + { + "condition": "en-pairs", + "candidate_count": 4, + "accepted": 2, + "rejected": 2, + "selected_units": 2, + "duration_s": 19.51, + "selected_pre_edit_wer": [ + 0.08, + 0.0 + ], + "internal_pause_cuts_triggered": 0, + "no_vc": true + }, + { + "condition": "en-turns", + "candidate_count": 4, + "accepted": 3, + "rejected": 1, + "selected_units": 2, + "duration_s": 11.35, + "selected_pre_edit_wer": [ + 0.14285714285714285, + 0.0 + ], + "internal_pause_cuts_triggered": 0, + "no_vc": true + } + ], + "candidates_total": 16, + "accepted_total": 10, + "all_four_output_episodes_complete": true, + "quiet_compaction_option_enabled": true, + "actual_internal_cuts_triggered": 0, + "quality_claim": "Functional ASR/identity-selection/generation/assembly test,not a listening-quality validation. Quiet cuts were covered by synthetic CPU tests; no eligible real pause occurred in these four outputs.", + "optional_vc_tested": false, + "time": 1794080020.823688 +} \ No newline at end of file diff --git a/stats/release_validation.json b/stats/release_validation.json new file mode 100644 index 0000000000000000000000000000000000000000..f5955f51918908f9c84ac3c07b788531f2dae5e1 --- /dev/null +++ b/stats/release_validation.json @@ -0,0 +1,63 @@ +{ + "cpu_contract_tests": { + "passed": true, + "count": 16, + "commands": [ + "python -m unittest discover -s tests -v" + ], + "covers": [ + "literal script-end trimming", + "internal hallucination rejection", + "180-ms quiet-pause compaction without modifying words", + "audible gaps retained", + "constant-background crossfade no gain bump", + "400-ms word-clock assembly", + "no double ASR offsets", + "identity-collapse contrast", + "timing/routing format", + "heterogeneous prompt batch CPU fakes", + "CFG1", + "target-only training labels", + "float codec input rejected", + "empty progress journal SQL/render regression", + "populated candidate progress-preview SQL/render regression", + "actual Accelerate sampler partitions across two virtual ranks without an extra tensor dimension" + ] + }, + "source_checkpoint_generation_and_scoring": { + "passed": true, + "candidates": 1536, + "assembled_conditions": 160 + }, + "bf16_export": { + "passed": true, + "proof": "EXPORT_PROOF.json" + }, + "fresh_gpu_smoke": { + "job": 2743115, + "state": "COMPLETED", + "completed": true, + "scope": "Exported BF16 weights + new portable CLI;EN/DE,turns/pairs,two candidates,identity scoring,ASR and quiet-pause option.No VC;not a perceptual quality validation.", + "passed": true, + "time": 1794079841.1333866 + }, + "portable_full_training_run": { + "completed": false, + "historical_full_training_completed": true + }, + "unvalidated": [ + "perceptual effect of internal pause compaction", + "end-to-end optional per-turn voice conversion", + "fresh cross-platform dependency resolver installation" + ], + "time": 1794077542.7875059, + "previous_gpu_smoke_attempts": [ + { + "job": 2742907, + "state": "FAILED", + "phase": "initial progress page before model generation", + "error": "SQL LIMIT4", + "fixed_by": "pipeline-v2, LIMIT 4 plus two regression tests" + } + ] +} \ No newline at end of file diff --git a/stats/segment_block_pilot.json b/stats/segment_block_pilot.json new file mode 100644 index 0000000000000000000000000000000000000000..2bd021872398105aaedf9ad7d9314efb87bb5846 --- /dev/null +++ b/stats/segment_block_pilot.json @@ -0,0 +1,1211 @@ +{ + "raw_generated": 1536, + "raw_expected": 1536, + "raw_scored": 1536, + "episode_records": 160, + "episodes_planned": 160, + "assembled": 160, + "failed": 0, + "fully_scored_montages": 271, + "slurm": { + "job": "2738551", + "state": "COMPLETED", + "raw_generated": 1536, + "raw_expected": 1536, + "raw_scored": 1536, + "episode_records": 160, + "episodes_expected": 160, + "full_montages_scored": 271, + "time": 1794069953.029554, + "terminal_state_verified_with_sacct": true + }, + "complete": true, + "conditions": [ + { + "model": "base17", + "timing": "free", + "strategy": "segment", + "best_of": 1, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 5.85536759522722, + "production_quality": 7.894098595015163, + "genuineness": 3.599622900206049, + "wer": 0.3316813574244717, + "speaker_similarity": 0.5502695124542012, + "reference_preference_rate": 0.9458333333333334, + "early_late_speaker_cosine": 0.7198496464697152, + "alignment_coverage": 1.0, + "detected_speakers": 2.3, + "words_per_minute": 85.50870062196472, + "duration_s": 164.275 + } + }, + { + "model": "base17", + "timing": "free", + "strategy": "segment", + "best_of": 1, + "gap_policy": "400", + "planned": 10, + "assembled": 7, + "failed": 0, + "fully_measured": 7, + "counts": { + "content_enjoyment": 7, + "production_quality": 7, + "genuineness": 7, + "wer": 7, + "speaker_similarity": 7, + "reference_preference_rate": 7, + "early_late_speaker_cosine": 7, + "alignment_coverage": 7, + "detected_speakers": 7, + "words_per_minute": 7, + "duration_s": 7 + }, + "means": { + "content_enjoyment": 5.872232090839163, + "production_quality": 7.884516724946183, + "genuineness": 3.614322490051373, + "wer": 0.3467636898972367, + "speaker_similarity": 0.47717534150196084, + "reference_preference_rate": 0.9226190476190477, + "early_late_speaker_cosine": 0.7160587932375727, + "alignment_coverage": 1.0, + "detected_speakers": 2.2857142857142856, + "words_per_minute": 88.54445688012564, + "duration_s": 160.28 + } + }, + { + "model": "base17", + "timing": "free", + "strategy": "block", + "best_of": 1, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 5.939213395014515, + "production_quality": 7.819897817808024, + "genuineness": 3.7433745156534357, + "wer": 0.19080004358049524, + "speaker_similarity": 0.3804982015392526, + "reference_preference_rate": 0.4708333333333333, + "early_late_speaker_cosine": 0.6507960131458036, + "alignment_coverage": 0.95, + "detected_speakers": 1.5, + "words_per_minute": 132.19033751836656, + "duration_s": 86.95 + } + }, + { + "model": "base17", + "timing": "free", + "strategy": "block", + "best_of": 1, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 5.935470041056929, + "production_quality": 7.819677108051861, + "genuineness": 3.7368743836969287, + "wer": 0.1887017960536364, + "speaker_similarity": 0.37979576115596825, + "reference_preference_rate": 0.47916666666666663, + "early_late_speaker_cosine": 0.6521618353951864, + "alignment_coverage": 0.95, + "detected_speakers": 1.3, + "words_per_minute": 131.82020891370706, + "duration_s": 87.16 + } + }, + { + "model": "base17", + "timing": "free", + "strategy": "block", + "best_of": 4, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.100239056832441, + "production_quality": 7.88318509772153, + "genuineness": 3.7377014788903686, + "wer": 0.10904047570983082, + "speaker_similarity": 0.41966699597041657, + "reference_preference_rate": 0.5083333333333334, + "early_late_speaker_cosine": 0.6599039410090808, + "alignment_coverage": 1.0, + "detected_speakers": 1.2, + "words_per_minute": 143.46889184350368, + "duration_s": 82.05699999999999 + } + }, + { + "model": "base17", + "timing": "free", + "strategy": "block", + "best_of": 4, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.094970907647564, + "production_quality": 7.88140541818896, + "genuineness": 3.73038148414106, + "wer": 0.10664259313046065, + "speaker_similarity": 0.42018293987854427, + "reference_preference_rate": 0.5166666666666667, + "early_late_speaker_cosine": 0.6607717273538318, + "alignment_coverage": 1.0, + "detected_speakers": 1.2, + "words_per_minute": 142.93558888409606, + "duration_s": 82.137 + } + }, + { + "model": "base17", + "timing": "free", + "strategy": "block", + "best_of": 8, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.104450285173675, + "production_quality": 7.878230624497505, + "genuineness": 3.7267373389746608, + "wer": 0.1017607033795378, + "speaker_similarity": 0.42929617150833554, + "reference_preference_rate": 0.5, + "early_late_speaker_cosine": 0.7016326778776053, + "alignment_coverage": 1.0, + "detected_speakers": 1.3, + "words_per_minute": 147.44396672836393, + "duration_s": 78.24499999999999 + } + }, + { + "model": "base17", + "timing": "free", + "strategy": "block", + "best_of": 8, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.102638401035697, + "production_quality": 7.8779510924570815, + "genuineness": 3.7185973304997715, + "wer": 0.10188690721867796, + "speaker_similarity": 0.42923477137738847, + "reference_preference_rate": 0.5, + "early_late_speaker_cosine": 0.6996932699379864, + "alignment_coverage": 1.0, + "detected_speakers": 1.3, + "words_per_minute": 147.12961989946695, + "duration_s": 78.38499999999999 + } + }, + { + "model": "base17", + "timing": "timed", + "strategy": "segment", + "best_of": 1, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.3038326069949635, + "production_quality": 8.106851882247295, + "genuineness": 3.4937805885806767, + "wer": 0.03954556787841465, + "speaker_similarity": 0.542391765780202, + "reference_preference_rate": 0.9395833333333332, + "early_late_speaker_cosine": 0.7292993183364024, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 167.6709060560152, + "duration_s": 61.404999999999994 + } + }, + { + "model": "base17", + "timing": "timed", + "strategy": "segment", + "best_of": 1, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.307433865088372, + "production_quality": 8.10864990674671, + "genuineness": 3.4745560838994516, + "wer": 0.039735949711601284, + "speaker_similarity": 0.5432102457785811, + "reference_preference_rate": 0.9479166666666666, + "early_late_speaker_cosine": 0.7314133879745455, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 167.04063626486928, + "duration_s": 61.625 + } + }, + { + "model": "base17", + "timing": "timed", + "strategy": "block", + "best_of": 1, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.387930251019111, + "production_quality": 7.972109076334171, + "genuineness": 3.7369283882885247, + "wer": 0.02551019946104844, + "speaker_similarity": 0.3362376411740571, + "reference_preference_rate": 0.4770833333333333, + "early_late_speaker_cosine": 0.6311214009103634, + "alignment_coverage": 1.0, + "detected_speakers": 1.6, + "words_per_minute": 174.54754931410594, + "duration_s": 59.24699999999999 + } + }, + { + "model": "base17", + "timing": "timed", + "strategy": "block", + "best_of": 1, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.388431997344315, + "production_quality": 7.972213316221305, + "genuineness": 3.7269507665700337, + "wer": 0.026602474908004832, + "speaker_similarity": 0.3363279571885135, + "reference_preference_rate": 0.4770833333333333, + "early_late_speaker_cosine": 0.6314992415938822, + "alignment_coverage": 1.0, + "detected_speakers": 1.6, + "words_per_minute": 174.15626702128938, + "duration_s": 59.357000000000006 + } + }, + { + "model": "base17", + "timing": "timed", + "strategy": "block", + "best_of": 4, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.388477300914346, + "production_quality": 7.997228458685603, + "genuineness": 3.696091226649044, + "wer": 0.024701225617864996, + "speaker_similarity": 0.3917199334651899, + "reference_preference_rate": 0.50625, + "early_late_speaker_cosine": 0.6146858622412361, + "alignment_coverage": 1.0, + "detected_speakers": 1.3, + "words_per_minute": 174.8270362597857, + "duration_s": 59.179999999999986 + } + }, + { + "model": "base17", + "timing": "timed", + "strategy": "block", + "best_of": 4, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.388404810606246, + "production_quality": 7.999258709793111, + "genuineness": 3.6807422275417117, + "wer": 0.02811012778422165, + "speaker_similarity": 0.39195461152577843, + "reference_preference_rate": 0.50625, + "early_late_speaker_cosine": 0.6152867529658674, + "alignment_coverage": 1.0, + "detected_speakers": 1.3, + "words_per_minute": 173.8654060735492, + "duration_s": 59.36999999999999 + } + }, + { + "model": "base17", + "timing": "timed", + "strategy": "block", + "best_of": 8, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.389871140617067, + "production_quality": 7.997969680570863, + "genuineness": 3.6949067572660965, + "wer": 0.025746911694357444, + "speaker_similarity": 0.4174737730461565, + "reference_preference_rate": 0.5166666666666667, + "early_late_speaker_cosine": 0.6508908939518216, + "alignment_coverage": 1.0, + "detected_speakers": 1.1, + "words_per_minute": 174.91072477260528, + "duration_s": 59.166999999999994 + } + }, + { + "model": "base17", + "timing": "timed", + "strategy": "block", + "best_of": 8, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.389388592136155, + "production_quality": 7.996919063495528, + "genuineness": 3.680973973302147, + "wer": 0.027442322859099238, + "speaker_similarity": 0.4173270737124727, + "reference_preference_rate": 0.5166666666666667, + "early_late_speaker_cosine": 0.6509254377745276, + "alignment_coverage": 1.0, + "detected_speakers": 1.1, + "words_per_minute": 174.2223132685221, + "duration_s": 59.35699999999999 + } + }, + { + "model": "podcast", + "timing": "free", + "strategy": "segment", + "best_of": 1, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.047689504036309, + "production_quality": 7.981385058788684, + "genuineness": 3.560262633723822, + "wer": 0.42586779258759516, + "speaker_similarity": 0.5420028423804454, + "reference_preference_rate": 0.95, + "early_late_speaker_cosine": 0.6929473959185495, + "alignment_coverage": 1.0, + "detected_speakers": 2.4, + "words_per_minute": 99.53646553003325, + "duration_s": 149.659 + } + }, + { + "model": "podcast", + "timing": "free", + "strategy": "segment", + "best_of": 1, + "gap_policy": "400", + "planned": 10, + "assembled": 9, + "failed": 0, + "fully_measured": 9, + "counts": { + "content_enjoyment": 9, + "production_quality": 9, + "genuineness": 9, + "wer": 9, + "speaker_similarity": 9, + "reference_preference_rate": 9, + "early_late_speaker_cosine": 9, + "alignment_coverage": 9, + "detected_speakers": 9, + "words_per_minute": 9, + "duration_s": 9 + }, + "means": { + "content_enjoyment": 6.051208004244348, + "production_quality": 7.988974700323878, + "genuineness": 3.5321467661594976, + "wer": 0.3742069968843303, + "speaker_similarity": 0.5600067608155497, + "reference_preference_rate": 0.9629629629629629, + "early_late_speaker_cosine": 0.6944801873227878, + "alignment_coverage": 1.0, + "detected_speakers": 2.4444444444444446, + "words_per_minute": 97.92422301460832, + "duration_s": 148.5522222222222 + } + }, + { + "model": "podcast", + "timing": "free", + "strategy": "block", + "best_of": 1, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.284394822375707, + "production_quality": 8.147430218906726, + "genuineness": 3.51515378125006, + "wer": 0.16882816049622404, + "speaker_similarity": 0.6960639763140976, + "reference_preference_rate": 0.9416666666666668, + "early_late_speaker_cosine": 0.7767627213059443, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 152.9719661482249, + "duration_s": 77.621 + } + }, + { + "model": "podcast", + "timing": "free", + "strategy": "block", + "best_of": 1, + "gap_policy": "400", + "planned": 10, + "assembled": 8, + "failed": 0, + "fully_measured": 8, + "counts": { + "content_enjoyment": 8, + "production_quality": 8, + "genuineness": 8, + "wer": 8, + "speaker_similarity": 8, + "reference_preference_rate": 8, + "early_late_speaker_cosine": 8, + "alignment_coverage": 8, + "detected_speakers": 8, + "words_per_minute": 8, + "duration_s": 8 + }, + "means": { + "content_enjoyment": 6.295696369376243, + "production_quality": 8.15700429113472, + "genuineness": 3.479576657139114, + "wer": 0.1693096990372646, + "speaker_similarity": 0.6490661679915813, + "reference_preference_rate": 0.9270833333333334, + "early_late_speaker_cosine": 0.7592563020866512, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 154.14738914753246, + "duration_s": 75.22875 + } + }, + { + "model": "podcast", + "timing": "free", + "strategy": "block", + "best_of": 4, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.315576413819602, + "production_quality": 8.157808308913289, + "genuineness": 3.403685846799225, + "wer": 0.030571552365046502, + "speaker_similarity": 0.7251187771876217, + "reference_preference_rate": 0.9833333333333332, + "early_late_speaker_cosine": 0.8033289687204984, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 162.63372134379657, + "duration_s": 64.49600000000001 + } + }, + { + "model": "podcast", + "timing": "free", + "strategy": "block", + "best_of": 4, + "gap_policy": "400", + "planned": 10, + "assembled": 9, + "failed": 0, + "fully_measured": 9, + "counts": { + "content_enjoyment": 9, + "production_quality": 9, + "genuineness": 9, + "wer": 9, + "speaker_similarity": 9, + "reference_preference_rate": 9, + "early_late_speaker_cosine": 9, + "alignment_coverage": 9, + "detected_speakers": 9, + "words_per_minute": 9, + "duration_s": 9 + }, + "means": { + "content_enjoyment": 6.322489965097138, + "production_quality": 8.163687784230262, + "genuineness": 3.378440642350801, + "wer": 0.026313710959606953, + "speaker_similarity": 0.7089866259267489, + "reference_preference_rate": 0.9814814814814814, + "early_late_speaker_cosine": 0.794867004525894, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 163.483313631721, + "duration_s": 61.2988888888889 + } + }, + { + "model": "podcast", + "timing": "free", + "strategy": "block", + "best_of": 8, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.3213015851372445, + "production_quality": 8.168142624857472, + "genuineness": 3.4001958170804243, + "wer": 0.022463708256278227, + "speaker_similarity": 0.7455560040796031, + "reference_preference_rate": 0.9916666666666666, + "early_late_speaker_cosine": 0.7992065306125586, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 162.4318488045723, + "duration_s": 63.750000000000014 + } + }, + { + "model": "podcast", + "timing": "free", + "strategy": "block", + "best_of": 8, + "gap_policy": "400", + "planned": 10, + "assembled": 9, + "failed": 0, + "fully_measured": 9, + "counts": { + "content_enjoyment": 9, + "production_quality": 9, + "genuineness": 9, + "wer": 9, + "speaker_similarity": 9, + "reference_preference_rate": 9, + "early_late_speaker_cosine": 9, + "alignment_coverage": 9, + "detected_speakers": 9, + "words_per_minute": 9, + "duration_s": 9 + }, + "means": { + "content_enjoyment": 6.327630042202263, + "production_quality": 8.171495812283599, + "genuineness": 3.3731702328209487, + "wer": 0.02200982333293451, + "speaker_similarity": 0.729612947873133, + "reference_preference_rate": 0.9907407407407407, + "early_late_speaker_cosine": 0.7898778331879657, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 163.95074796840635, + "duration_s": 60.721111111111114 + } + }, + { + "model": "podcast", + "timing": "timed", + "strategy": "segment", + "best_of": 1, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.30635811109447, + "production_quality": 8.106802515983798, + "genuineness": 3.4960491485958136, + "wer": 0.025712652646948126, + "speaker_similarity": 0.5154009437305571, + "reference_preference_rate": 0.9291666666666666, + "early_late_speaker_cosine": 0.6566684767324543, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 164.95203292040938, + "duration_s": 62.556 + } + }, + { + "model": "podcast", + "timing": "timed", + "strategy": "segment", + "best_of": 1, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.305652415483051, + "production_quality": 8.110311552276926, + "genuineness": 3.4837175526611097, + "wer": 0.02763164660415864, + "speaker_similarity": 0.5149896510272358, + "reference_preference_rate": 0.9291666666666666, + "early_late_speaker_cosine": 0.6562704498531609, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 164.1420350558235, + "duration_s": 62.926 + } + }, + { + "model": "podcast", + "timing": "timed", + "strategy": "block", + "best_of": 1, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.349035407824361, + "production_quality": 8.168999461748445, + "genuineness": 3.4640558493097564, + "wer": 0.030740101559570708, + "speaker_similarity": 0.6886187894012035, + "reference_preference_rate": 0.95, + "early_late_speaker_cosine": 0.7976208305915122, + "alignment_coverage": 1.0, + "detected_speakers": 2.1, + "words_per_minute": 173.53586933175598, + "duration_s": 59.282 + } + }, + { + "model": "podcast", + "timing": "timed", + "strategy": "block", + "best_of": 1, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.345567781706444, + "production_quality": 8.170113694667503, + "genuineness": 3.4412321487841786, + "wer": 0.03140592477144655, + "speaker_similarity": 0.6886649371584801, + "reference_preference_rate": 0.95, + "early_late_speaker_cosine": 0.798932210761788, + "alignment_coverage": 1.0, + "detected_speakers": 2.1, + "words_per_minute": 173.0246957722008, + "duration_s": 59.572 + } + }, + { + "model": "podcast", + "timing": "timed", + "strategy": "block", + "best_of": 4, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.329630714211929, + "production_quality": 8.167999263161317, + "genuineness": 3.4381575492561787, + "wer": 0.030152509112517635, + "speaker_similarity": 0.7262931969295091, + "reference_preference_rate": 0.9833333333333334, + "early_late_speaker_cosine": 0.8208115164961104, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 174.33345178329265, + "duration_s": 59.25 + } + }, + { + "model": "podcast", + "timing": "timed", + "strategy": "block", + "best_of": 4, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.3276903091431285, + "production_quality": 8.16841324360458, + "genuineness": 3.423139081018372, + "wer": 0.028199776963674195, + "speaker_similarity": 0.7264421171804363, + "reference_preference_rate": 0.9833333333333334, + "early_late_speaker_cosine": 0.8222042875839326, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 173.01791873856442, + "duration_s": 59.629999999999995 + } + }, + { + "model": "podcast", + "timing": "timed", + "strategy": "block", + "best_of": 8, + "gap_policy": "balanced", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.332137125540553, + "production_quality": 8.171326471840725, + "genuineness": 3.411347767597383, + "wer": 0.026856656481473805, + "speaker_similarity": 0.7409398850722263, + "reference_preference_rate": 0.9833333333333334, + "early_late_speaker_cosine": 0.7974450824993953, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 174.34772730361956, + "duration_s": 59.283 + } + }, + { + "model": "podcast", + "timing": "timed", + "strategy": "block", + "best_of": 8, + "gap_policy": "400", + "planned": 10, + "assembled": 10, + "failed": 0, + "fully_measured": 10, + "counts": { + "content_enjoyment": 10, + "production_quality": 10, + "genuineness": 10, + "wer": 10, + "speaker_similarity": 10, + "reference_preference_rate": 10, + "early_late_speaker_cosine": 10, + "alignment_coverage": 10, + "detected_speakers": 10, + "words_per_minute": 10, + "duration_s": 10 + }, + "means": { + "content_enjoyment": 6.328533083264525, + "production_quality": 8.172638454204002, + "genuineness": 3.393094600507152, + "wer": 0.02621971380631457, + "speaker_similarity": 0.7412697783301299, + "reference_preference_rate": 0.9833333333333334, + "early_late_speaker_cosine": 0.7975876063404458, + "alignment_coverage": 1.0, + "detected_speakers": 2.0, + "words_per_minute": 173.3574340303344, + "duration_s": 59.553 + } + } + ], + "metric_version": "Audiobox CE/PQ heads; EARS Genuineness; no EIV proxy substitution", + "updated_unix": 1794070311.0336566 +} diff --git a/stats/steps.jsonl b/stats/steps.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..5b092fd9ab6cf4c09382cbd1396bfa25ef23bf04 --- /dev/null +++ b/stats/steps.jsonl @@ -0,0 +1,497 @@ +{"step": 1, "total_steps": 9874, "loss": 4.723504759371281, "lr_semantic": 4.0485829959514176e-08, "lr_talker": 8.097165991902835e-08, "elapsed_s": 6.090472545998637, "job_id": "2703623"} +{"step": 2, "total_steps": 9874, "loss": 4.828038796782494, "lr_semantic": 8.097165991902835e-08, "lr_talker": 1.619433198380567e-07, "elapsed_s": 8.18357604299672, "job_id": "2703623"} +{"step": 3, "total_steps": 9874, "loss": 4.810097008943558, "lr_semantic": 1.2145748987854252e-07, "lr_talker": 2.4291497975708504e-07, "elapsed_s": 10.062941710988525, "job_id": "2703623"} +{"step": 20, "total_steps": 9874, "loss": 4.612269192934036, "lr_semantic": 8.097165991902834e-07, "lr_talker": 1.6194331983805669e-06, "elapsed_s": 41.231300465995446, "job_id": "2703623"} +{"step": 40, "total_steps": 9874, "loss": 4.722411721944809, "lr_semantic": 1.6194331983805669e-06, "lr_talker": 3.2388663967611337e-06, "elapsed_s": 70.11841962696053, "job_id": "2703623"} +{"step": 60, "total_steps": 9874, "loss": 4.750606328248978, "lr_semantic": 2.42914979757085e-06, "lr_talker": 4.8582995951417e-06, "elapsed_s": 102.71490351198008, "job_id": "2703623"} +{"step": 80, "total_steps": 9874, "loss": 4.60187241435051, "lr_semantic": 3.2388663967611337e-06, "lr_talker": 6.4777327935222675e-06, "elapsed_s": 132.2153398449882, "job_id": "2703623"} +{"step": 100, "total_steps": 9874, "loss": 4.654187344014645, "lr_semantic": 4.048582995951417e-06, "lr_talker": 8.097165991902834e-06, "elapsed_s": 165.7110709399567, "job_id": "2703623"} +{"step": 120, "total_steps": 9874, "loss": 4.683139726519585, "lr_semantic": 4.8582995951417e-06, "lr_talker": 9.7165991902834e-06, "elapsed_s": 199.25959958095336, "job_id": "2703623"} +{"step": 140, "total_steps": 9874, "loss": 4.708404436707497, "lr_semantic": 5.668016194331984e-06, "lr_talker": 1.1336032388663969e-05, "elapsed_s": 232.5195925660082, "job_id": "2703623"} +{"step": 160, "total_steps": 9874, "loss": 4.723705090582371, "lr_semantic": 6.4777327935222675e-06, "lr_talker": 1.2955465587044535e-05, "elapsed_s": 264.32585651497357, "job_id": "2703623"} +{"step": 180, "total_steps": 9874, "loss": 4.682525932788849, "lr_semantic": 7.2874493927125516e-06, "lr_talker": 1.4574898785425103e-05, "elapsed_s": 299.8308655520086, "job_id": "2703623"} +{"step": 200, "total_steps": 9874, "loss": 4.625214673578739, "lr_semantic": 8.097165991902834e-06, "lr_talker": 1.6194331983805668e-05, "elapsed_s": 333.40224560396746, "job_id": "2703623"} +{"step": 220, "total_steps": 9874, "loss": 4.680717304348946, "lr_semantic": 8.906882591093118e-06, "lr_talker": 1.7813765182186236e-05, "elapsed_s": 367.02426492300583, "job_id": "2703623"} +{"step": 240, "total_steps": 9874, "loss": 4.63633531332016, "lr_semantic": 9.7165991902834e-06, "lr_talker": 1.94331983805668e-05, "elapsed_s": 397.2214243829949, "job_id": "2703623"} +{"step": 260, "total_steps": 9874, "loss": 4.596634417772293, "lr_semantic": 1.0526315789473684e-05, "lr_talker": 2.105263157894737e-05, "elapsed_s": 431.629915077996, "job_id": "2703623"} +{"step": 280, "total_steps": 9874, "loss": 4.631140813231468, "lr_semantic": 1.1336032388663969e-05, "lr_talker": 2.2672064777327937e-05, "elapsed_s": 463.8310482180095, "job_id": "2703623"} +{"step": 300, "total_steps": 9874, "loss": 4.537077076733112, "lr_semantic": 1.2145748987854251e-05, "lr_talker": 2.4291497975708502e-05, "elapsed_s": 497.36039124795934, "job_id": "2703623"} +{"step": 320, "total_steps": 9874, "loss": 4.650986447930336, "lr_semantic": 1.2955465587044535e-05, "lr_talker": 2.591093117408907e-05, "elapsed_s": 536.4286141319899, "job_id": "2703623"} +{"step": 340, "total_steps": 9874, "loss": 4.494241319596767, "lr_semantic": 1.3765182186234817e-05, "lr_talker": 2.7530364372469635e-05, "elapsed_s": 566.9477111629676, "job_id": "2703623"} +{"step": 360, "total_steps": 9874, "loss": 4.593197025358677, "lr_semantic": 1.4574898785425103e-05, "lr_talker": 2.9149797570850206e-05, "elapsed_s": 598.4602895389544, "job_id": "2703623"} +{"step": 380, "total_steps": 9874, "loss": 4.628236256539822, "lr_semantic": 1.5384615384615387e-05, "lr_talker": 3.0769230769230774e-05, "elapsed_s": 626.8596043270081, "job_id": "2703623"} +{"step": 400, "total_steps": 9874, "loss": 4.63645327091217, "lr_semantic": 1.6194331983805668e-05, "lr_talker": 3.2388663967611336e-05, "elapsed_s": 659.5248022360029, "job_id": "2703623"} +{"step": 420, "total_steps": 9874, "loss": 4.728723503649235, "lr_semantic": 1.7004048582995952e-05, "lr_talker": 3.4008097165991904e-05, "elapsed_s": 692.8404613059829, "job_id": "2703623"} +{"step": 440, "total_steps": 9874, "loss": 4.721110433340073, "lr_semantic": 1.7813765182186236e-05, "lr_talker": 3.562753036437247e-05, "elapsed_s": 729.2958492629696, "job_id": "2703623"} +{"step": 460, "total_steps": 9874, "loss": 4.652069307863712, "lr_semantic": 1.862348178137652e-05, "lr_talker": 3.724696356275304e-05, "elapsed_s": 763.2361228319933, "job_id": "2703623"} +{"step": 480, "total_steps": 9874, "loss": 4.678913086652756, "lr_semantic": 1.94331983805668e-05, "lr_talker": 3.88663967611336e-05, "elapsed_s": 796.9377230479731, "job_id": "2703623"} +{"step": 500, "total_steps": 9874, "loss": 4.640354201197624, "lr_semantic": 1.9999981827740206e-05, "lr_talker": 3.999996365548041e-05, "elapsed_s": 831.3199046759983, "job_id": "2703623"} +{"step": 520, "total_steps": 9874, "loss": 4.724844127893448, "lr_semantic": 1.9999658767385287e-05, "lr_talker": 3.999931753477057e-05, "elapsed_s": 862.7699777960079, "job_id": "2703623"} +{"step": 540, "total_steps": 9874, "loss": 4.726119093596935, "lr_semantic": 1.999893189571992e-05, "lr_talker": 3.999786379143984e-05, "elapsed_s": 897.2464209969621, "job_id": "2703623"} +{"step": 560, "total_steps": 9874, "loss": 4.6659481674432755, "lr_semantic": 1.9997801245358573e-05, "lr_talker": 3.9995602490717146e-05, "elapsed_s": 961.1210271749878, "job_id": "2703623"} +{"step": 580, "total_steps": 9874, "loss": 4.586918085813522, "lr_semantic": 1.9996266867033097e-05, "lr_talker": 3.999253373406619e-05, "elapsed_s": 993.0812453469844, "job_id": "2703623"} +{"step": 600, "total_steps": 9874, "loss": 4.697893425822258, "lr_semantic": 1.9994328829590468e-05, "lr_talker": 3.9988657659180936e-05, "elapsed_s": 1027.4421751259943, "job_id": "2703623"} +{"step": 620, "total_steps": 9874, "loss": 4.677660346031189, "lr_semantic": 1.999198721998971e-05, "lr_talker": 3.998397443997942e-05, "elapsed_s": 1064.7559638879611, "job_id": "2703623"} +{"step": 640, "total_steps": 9874, "loss": 4.6582257598638535, "lr_semantic": 1.998924214329795e-05, "lr_talker": 3.99784842865959e-05, "elapsed_s": 1098.1682618059567, "job_id": "2703623"} +{"step": 660, "total_steps": 9874, "loss": 4.666455216705799, "lr_semantic": 1.9986093722685765e-05, "lr_talker": 3.997218744537153e-05, "elapsed_s": 1131.664157998981, "job_id": "2703623"} +{"step": 680, "total_steps": 9874, "loss": 4.686228826642036, "lr_semantic": 1.9982542099421595e-05, "lr_talker": 3.996508419884319e-05, "elapsed_s": 1164.8840202270076, "job_id": "2703623"} +{"step": 700, "total_steps": 9874, "loss": 4.630891069769859, "lr_semantic": 1.997858743286545e-05, "lr_talker": 3.99571748657309e-05, "elapsed_s": 1204.2231436169823, "job_id": "2703623"} +{"step": 720, "total_steps": 9874, "loss": 4.650534555315971, "lr_semantic": 1.9974229900461728e-05, "lr_talker": 3.9948459800923455e-05, "elapsed_s": 1237.5967829260044, "job_id": "2703623"} +{"step": 740, "total_steps": 9874, "loss": 4.6933557614684105, "lr_semantic": 1.9969469697731275e-05, "lr_talker": 3.993893939546255e-05, "elapsed_s": 1268.2294622579939, "job_id": "2703623"} +{"step": 760, "total_steps": 9874, "loss": 4.687323436141014, "lr_semantic": 1.9964307038262603e-05, "lr_talker": 3.9928614076525206e-05, "elapsed_s": 1301.2740943249664, "job_id": "2703623"} +{"step": 780, "total_steps": 9874, "loss": 4.636560879647732, "lr_semantic": 1.99587421537023e-05, "lr_talker": 3.99174843074046e-05, "elapsed_s": 1337.213264882972, "job_id": "2703623"} +{"step": 800, "total_steps": 9874, "loss": 4.674236461520195, "lr_semantic": 1.9952775293744648e-05, "lr_talker": 3.9905550587489295e-05, "elapsed_s": 1372.2946591509972, "job_id": "2703623"} +{"step": 820, "total_steps": 9874, "loss": 4.656285144388676, "lr_semantic": 1.994640672612041e-05, "lr_talker": 3.989281345224082e-05, "elapsed_s": 1406.8063677969621, "job_id": "2703623"} +{"step": 840, "total_steps": 9874, "loss": 4.64863932877779, "lr_semantic": 1.9939636736584835e-05, "lr_talker": 3.987927347316967e-05, "elapsed_s": 1440.5124159840052, "job_id": "2703623"} +{"step": 860, "total_steps": 9874, "loss": 4.5924315974116325, "lr_semantic": 1.99324656289048e-05, "lr_talker": 3.98649312578096e-05, "elapsed_s": 1474.8326519959955, "job_id": "2703623"} +{"step": 880, "total_steps": 9874, "loss": 4.680112108588219, "lr_semantic": 1.9924893724845223e-05, "lr_talker": 3.9849787449690446e-05, "elapsed_s": 1504.754290502984, "job_id": "2703623"} +{"step": 900, "total_steps": 9874, "loss": 4.5247417986392975, "lr_semantic": 1.9916921364154592e-05, "lr_talker": 3.9833842728309184e-05, "elapsed_s": 1538.529344303999, "job_id": "2703623"} +{"step": 920, "total_steps": 9874, "loss": 4.710550904273987, "lr_semantic": 1.9908548904549746e-05, "lr_talker": 3.981709780909949e-05, "elapsed_s": 1573.7472421799903, "job_id": "2703623"} +{"step": 940, "total_steps": 9874, "loss": 4.696339398622513, "lr_semantic": 1.9899776721699793e-05, "lr_talker": 3.9799553443399585e-05, "elapsed_s": 1604.5140368829598, "job_id": "2703623"} +{"step": 960, "total_steps": 9874, "loss": 4.628872573375702, "lr_semantic": 1.9890605209209294e-05, "lr_talker": 3.978121041841859e-05, "elapsed_s": 1639.4206970669911, "job_id": "2703623"} +{"step": 980, "total_steps": 9874, "loss": 4.56194219738245, "lr_semantic": 1.9881034778600564e-05, "lr_talker": 3.976206955720113e-05, "elapsed_s": 1673.4787304629572, "job_id": "2703623"} +{"step": 1000, "total_steps": 9874, "loss": 4.6207903027534485, "lr_semantic": 1.9871065859295238e-05, "lr_talker": 3.9742131718590475e-05, "elapsed_s": 1711.4303824249655, "job_id": "2703623"} +{"step": 1020, "total_steps": 9874, "loss": 4.602132111787796, "lr_semantic": 1.9860698898594976e-05, "lr_talker": 3.972139779718995e-05, "elapsed_s": 1745.443590433977, "job_id": "2703623"} +{"step": 1040, "total_steps": 9874, "loss": 4.627413146197796, "lr_semantic": 1.9849934361661423e-05, "lr_talker": 3.9699868723322845e-05, "elapsed_s": 1779.8697168399813, "job_id": "2703623"} +{"step": 1060, "total_steps": 9874, "loss": 4.707439139485359, "lr_semantic": 1.98387727314953e-05, "lr_talker": 3.96775454629906e-05, "elapsed_s": 1815.3770752800046, "job_id": "2703623"} +{"step": 1080, "total_steps": 9874, "loss": 4.585161499679089, "lr_semantic": 1.9827214508914766e-05, "lr_talker": 3.965442901782953e-05, "elapsed_s": 1879.434450405999, "job_id": "2703623"} +{"step": 1100, "total_steps": 9874, "loss": 4.588900908827782, "lr_semantic": 1.981526021253293e-05, "lr_talker": 3.963052042506586e-05, "elapsed_s": 1914.827754693979, "job_id": "2703623"} +{"step": 1120, "total_steps": 9874, "loss": 4.644004084169865, "lr_semantic": 1.9802910378734588e-05, "lr_talker": 3.9605820757469175e-05, "elapsed_s": 1952.1145894369693, "job_id": "2703623"} +{"step": 1140, "total_steps": 9874, "loss": 4.603757858276367, "lr_semantic": 1.9790165561652138e-05, "lr_talker": 3.9580331123304276e-05, "elapsed_s": 1985.424611644994, "job_id": "2703623"} +{"step": 1160, "total_steps": 9874, "loss": 4.670185893774033, "lr_semantic": 1.9777026333140743e-05, "lr_talker": 3.9554052666281486e-05, "elapsed_s": 2016.8574008629657, "job_id": "2703623"} +{"step": 1180, "total_steps": 9874, "loss": 4.680990442633629, "lr_semantic": 1.976349328275265e-05, "lr_talker": 3.95269865655053e-05, "elapsed_s": 2054.0423532599816, "job_id": "2703623"} +{"step": 1200, "total_steps": 9874, "loss": 4.655897580087185, "lr_semantic": 1.9749567017710755e-05, "lr_talker": 3.949913403542151e-05, "elapsed_s": 2086.6770803299733, "job_id": "2703623"} +{"step": 1220, "total_steps": 9874, "loss": 4.581575192511082, "lr_semantic": 1.973524816288134e-05, "lr_talker": 3.947049632576268e-05, "elapsed_s": 2122.4614852119703, "job_id": "2703623"} +{"step": 1240, "total_steps": 9874, "loss": 4.633259259164333, "lr_semantic": 1.9720537360746043e-05, "lr_talker": 3.9441074721492086e-05, "elapsed_s": 2159.377158037969, "job_id": "2703623"} +{"step": 1260, "total_steps": 9874, "loss": 4.616271838545799, "lr_semantic": 1.9705435271373038e-05, "lr_talker": 3.9410870542746075e-05, "elapsed_s": 2192.4067458219943, "job_id": "2703623"} +{"step": 1280, "total_steps": 9874, "loss": 4.613331243395805, "lr_semantic": 1.9689942572387404e-05, "lr_talker": 3.937988514477481e-05, "elapsed_s": 2223.3821167969727, "job_id": "2703623"} +{"step": 1300, "total_steps": 9874, "loss": 4.640217989683151, "lr_semantic": 1.9674059958940728e-05, "lr_talker": 3.9348119917881455e-05, "elapsed_s": 2257.4393043099553, "job_id": "2703623"} +{"step": 1320, "total_steps": 9874, "loss": 4.574445024132729, "lr_semantic": 1.9657788143679916e-05, "lr_talker": 3.931557628735983e-05, "elapsed_s": 2292.308856552001, "job_id": "2703623"} +{"step": 1340, "total_steps": 9874, "loss": 4.7115767151117325, "lr_semantic": 1.9641127856715203e-05, "lr_talker": 3.9282255713430405e-05, "elapsed_s": 2323.6614244049997, "job_id": "2703623"} +{"step": 1360, "total_steps": 9874, "loss": 4.680550217628479, "lr_semantic": 1.9624079845587418e-05, "lr_talker": 3.9248159691174835e-05, "elapsed_s": 2359.8465354509535, "job_id": "2703623"} +{"step": 1380, "total_steps": 9874, "loss": 4.712331250309944, "lr_semantic": 1.9606644875234418e-05, "lr_talker": 3.9213289750468836e-05, "elapsed_s": 2394.166000119003, "job_id": "2703623"} +{"step": 1400, "total_steps": 9874, "loss": 4.709168627858162, "lr_semantic": 1.9588823727956782e-05, "lr_talker": 3.9177647455913564e-05, "elapsed_s": 2425.783549237007, "job_id": "2703623"} +{"step": 1420, "total_steps": 9874, "loss": 4.6608098447322845, "lr_semantic": 1.9570617203382692e-05, "lr_talker": 3.9141234406765384e-05, "elapsed_s": 2459.7830020959955, "job_id": "2703623"} +{"step": 1440, "total_steps": 9874, "loss": 4.618341468274593, "lr_semantic": 1.9552026118432072e-05, "lr_talker": 3.9104052236864144e-05, "elapsed_s": 2497.7894742490025, "job_id": "2703623"} +{"step": 1460, "total_steps": 9874, "loss": 4.593737810850143, "lr_semantic": 1.9533051307279928e-05, "lr_talker": 3.9066102614559856e-05, "elapsed_s": 2536.64707825199, "job_id": "2703623"} +{"step": 1480, "total_steps": 9874, "loss": 4.601008974015713, "lr_semantic": 1.951369362131891e-05, "lr_talker": 3.902738724263782e-05, "elapsed_s": 2574.6786624869565, "job_id": "2703623"} +{"step": 1500, "total_steps": 9874, "loss": 4.626422308385372, "lr_semantic": 1.949395392912112e-05, "lr_talker": 3.898790785824224e-05, "elapsed_s": 2611.0997053579777, "job_id": "2703623"} +{"step": 1520, "total_steps": 9874, "loss": 4.633528985083103, "lr_semantic": 1.9473833116399142e-05, "lr_talker": 3.8947666232798285e-05, "elapsed_s": 2650.864645772963, "job_id": "2703623"} +{"step": 1540, "total_steps": 9874, "loss": 4.653739169239998, "lr_semantic": 1.945333208596628e-05, "lr_talker": 3.890666417193256e-05, "elapsed_s": 2688.0077006799984, "job_id": "2703623"} +{"step": 1560, "total_steps": 9874, "loss": 4.598999157547951, "lr_semantic": 1.9432451757696084e-05, "lr_talker": 3.886490351539217e-05, "elapsed_s": 2718.9322352180025, "job_id": "2703623"} +{"step": 1580, "total_steps": 9874, "loss": 4.65453028678894, "lr_semantic": 1.9411193068481044e-05, "lr_talker": 3.882238613696209e-05, "elapsed_s": 2750.6966377389617, "job_id": "2703623"} +{"step": 1600, "total_steps": 9874, "loss": 4.6379027515649796, "lr_semantic": 1.9389556972190554e-05, "lr_talker": 3.877911394438111e-05, "elapsed_s": 2843.9825490789954, "job_id": "2703623"} +{"step": 1620, "total_steps": 9874, "loss": 4.698327541351318, "lr_semantic": 1.9367544439628142e-05, "lr_talker": 3.8735088879256285e-05, "elapsed_s": 2878.3405658039846, "job_id": "2703623"} +{"step": 1640, "total_steps": 9874, "loss": 4.684561550617218, "lr_semantic": 1.9345156458487878e-05, "lr_talker": 3.8690312916975755e-05, "elapsed_s": 2912.206448209996, "job_id": "2703623"} +{"step": 1660, "total_steps": 9874, "loss": 4.636703655123711, "lr_semantic": 1.932239403331007e-05, "lr_talker": 3.864478806662014e-05, "elapsed_s": 2943.9938811679604, "job_id": "2703623"} +{"step": 1680, "total_steps": 9874, "loss": 4.604673258960247, "lr_semantic": 1.9299258185436195e-05, "lr_talker": 3.859851637087239e-05, "elapsed_s": 2977.3121487559984, "job_id": "2703623"} +{"step": 1700, "total_steps": 9874, "loss": 4.66180419921875, "lr_semantic": 1.927574995296306e-05, "lr_talker": 3.855149990592612e-05, "elapsed_s": 3011.138044118008, "job_id": "2703623"} +{"step": 1720, "total_steps": 9874, "loss": 4.5415258184075356, "lr_semantic": 1.9251870390696223e-05, "lr_talker": 3.8503740781392446e-05, "elapsed_s": 3043.7067079689587, "job_id": "2703623"} +{"step": 1740, "total_steps": 9874, "loss": 4.619590759277344, "lr_semantic": 1.9227620570102694e-05, "lr_talker": 3.845524114020539e-05, "elapsed_s": 3077.6830051669967, "job_id": "2703623"} +{"step": 1760, "total_steps": 9874, "loss": 4.642887011170387, "lr_semantic": 1.920300157926281e-05, "lr_talker": 3.840600315852562e-05, "elapsed_s": 3114.7883723159903, "job_id": "2703623"} +{"step": 1780, "total_steps": 9874, "loss": 4.63786618411541, "lr_semantic": 1.9178014522821447e-05, "lr_talker": 3.8356029045642895e-05, "elapsed_s": 3145.4103881199844, "job_id": "2703623"} +{"step": 1800, "total_steps": 9874, "loss": 4.521639741957188, "lr_semantic": 1.915266052193845e-05, "lr_talker": 3.83053210438769e-05, "elapsed_s": 3177.9738651819644, "job_id": "2703623"} +{"step": 1820, "total_steps": 9874, "loss": 4.5624444261193275, "lr_semantic": 1.912694071423832e-05, "lr_talker": 3.825388142847664e-05, "elapsed_s": 3207.2301576749887, "job_id": "2703623"} +{"step": 1840, "total_steps": 9874, "loss": 4.596479579806328, "lr_semantic": 1.910085625375918e-05, "lr_talker": 3.820171250751836e-05, "elapsed_s": 3241.6085578089696, "job_id": "2703623"} +{"step": 1860, "total_steps": 9874, "loss": 4.56477190554142, "lr_semantic": 1.907440831090097e-05, "lr_talker": 3.814881662180194e-05, "elapsed_s": 3273.386632801965, "job_id": "2703623"} +{"step": 1880, "total_steps": 9874, "loss": 4.657206431031227, "lr_semantic": 1.9047598072372963e-05, "lr_talker": 3.8095196144745926e-05, "elapsed_s": 3302.300783601997, "job_id": "2703623"} +{"step": 1900, "total_steps": 9874, "loss": 4.626017093658447, "lr_semantic": 1.9020426741140493e-05, "lr_talker": 3.8040853482280985e-05, "elapsed_s": 3342.382210893964, "job_id": "2703623"} +{"step": 1920, "total_steps": 9874, "loss": 4.707943215966225, "lr_semantic": 1.8992895536371e-05, "lr_talker": 3.7985791072742e-05, "elapsed_s": 3374.484590973996, "job_id": "2703623"} +{"step": 1940, "total_steps": 9874, "loss": 4.564087554812431, "lr_semantic": 1.8965005693379296e-05, "lr_talker": 3.793001138675859e-05, "elapsed_s": 3406.416739239008, "job_id": "2703623"} +{"step": 1960, "total_steps": 9874, "loss": 4.602757573127747, "lr_semantic": 1.8936758463572177e-05, "lr_talker": 3.7873516927144354e-05, "elapsed_s": 3438.263595786004, "job_id": "2703623"} +{"step": 1980, "total_steps": 9874, "loss": 4.621573582291603, "lr_semantic": 1.8908155114392233e-05, "lr_talker": 3.7816310228784466e-05, "elapsed_s": 3474.392873799952, "job_id": "2703623"} +{"step": 2000, "total_steps": 9874, "loss": 4.60458505153656, "lr_semantic": 1.8879196929261008e-05, "lr_talker": 3.7758393858522016e-05, "elapsed_s": 3504.9422654759837, "job_id": "2703623"} +{"step": 2020, "total_steps": 9874, "loss": 4.643344067037106, "lr_semantic": 1.8849885207521398e-05, "lr_talker": 3.7699770415042796e-05, "elapsed_s": 3536.0302716299775, "job_id": "2703623"} +{"step": 2040, "total_steps": 9874, "loss": 4.659477606415749, "lr_semantic": 1.882022126437935e-05, "lr_talker": 3.76404425287587e-05, "elapsed_s": 3569.44078552298, "job_id": "2703623"} +{"step": 2060, "total_steps": 9874, "loss": 4.584246680140495, "lr_semantic": 1.879020643084486e-05, "lr_talker": 3.758041286168972e-05, "elapsed_s": 3601.0859317010036, "job_id": "2703623"} +{"step": 2080, "total_steps": 9874, "loss": 4.716500699520111, "lr_semantic": 1.8759842053672244e-05, "lr_talker": 3.751968410734449e-05, "elapsed_s": 3634.396766627964, "job_id": "2703623"} +{"step": 2100, "total_steps": 9874, "loss": 4.5963272005319595, "lr_semantic": 1.87291294952997e-05, "lr_talker": 3.74582589905994e-05, "elapsed_s": 3662.6592601859593, "job_id": "2703623"} +{"step": 2120, "total_steps": 9874, "loss": 4.697852343320847, "lr_semantic": 1.8698070133788198e-05, "lr_talker": 3.7396140267576396e-05, "elapsed_s": 3693.2063052249723, "job_id": "2703623"} +{"step": 2140, "total_steps": 9874, "loss": 4.573341712355614, "lr_semantic": 1.8666665362759633e-05, "lr_talker": 3.733333072551927e-05, "elapsed_s": 3756.6884010249632, "job_id": "2703623"} +{"step": 2160, "total_steps": 9874, "loss": 4.641077473759651, "lr_semantic": 1.8634916591334284e-05, "lr_talker": 3.726983318266857e-05, "elapsed_s": 3791.052339632006, "job_id": "2703623"} +{"step": 2180, "total_steps": 9874, "loss": 4.574329122900963, "lr_semantic": 1.8602825244067606e-05, "lr_talker": 3.720565048813521e-05, "elapsed_s": 3824.3927202009945, "job_id": "2703623"} +{"step": 2200, "total_steps": 9874, "loss": 4.621905103325844, "lr_semantic": 1.8570392760886307e-05, "lr_talker": 3.7140785521772615e-05, "elapsed_s": 3855.3681420659996, "job_id": "2703623"} +{"step": 2220, "total_steps": 9874, "loss": 4.678090661764145, "lr_semantic": 1.8537620597023738e-05, "lr_talker": 3.7075241194047475e-05, "elapsed_s": 3888.5004016789608, "job_id": "2703623"} +{"step": 2240, "total_steps": 9874, "loss": 4.506390787661076, "lr_semantic": 1.850451022295458e-05, "lr_talker": 3.700902044590916e-05, "elapsed_s": 3921.366394425975, "job_id": "2703623"} +{"step": 2260, "total_steps": 9874, "loss": 4.640214443206787, "lr_semantic": 1.847106312432889e-05, "lr_talker": 3.694212624865778e-05, "elapsed_s": 3952.394959541969, "job_id": "2703623"} +{"step": 2280, "total_steps": 9874, "loss": 4.664319396018982, "lr_semantic": 1.8437280801905433e-05, "lr_talker": 3.6874561603810866e-05, "elapsed_s": 3985.6750205609715, "job_id": "2703623"} +{"step": 2300, "total_steps": 9874, "loss": 4.621635265648365, "lr_semantic": 1.840316477148433e-05, "lr_talker": 3.680632954296866e-05, "elapsed_s": 4019.1768160719657, "job_id": "2703623"} +{"step": 2320, "total_steps": 9874, "loss": 4.596308037638664, "lr_semantic": 1.8368716563839055e-05, "lr_talker": 3.673743312767811e-05, "elapsed_s": 4049.8945428789593, "job_id": "2703623"} +{"step": 2340, "total_steps": 9874, "loss": 4.63790038973093, "lr_semantic": 1.8333937724647757e-05, "lr_talker": 3.6667875449295515e-05, "elapsed_s": 4082.8135516119655, "job_id": "2703623"} +{"step": 2360, "total_steps": 9874, "loss": 4.450038217008114, "lr_semantic": 1.82988298144239e-05, "lr_talker": 3.65976596288478e-05, "elapsed_s": 4114.082336052961, "job_id": "2703623"} +{"step": 2380, "total_steps": 9874, "loss": 4.593905374407768, "lr_semantic": 1.826339440844623e-05, "lr_talker": 3.652678881689246e-05, "elapsed_s": 4147.844299991964, "job_id": "2703623"} +{"step": 2400, "total_steps": 9874, "loss": 4.644741542637348, "lr_semantic": 1.822763309668811e-05, "lr_talker": 3.645526619337622e-05, "elapsed_s": 4180.506507419981, "job_id": "2703623"} +{"step": 2420, "total_steps": 9874, "loss": 4.650562115013599, "lr_semantic": 1.8191547483746177e-05, "lr_talker": 3.638309496749235e-05, "elapsed_s": 4213.4953149159555, "job_id": "2703623"} +{"step": 2440, "total_steps": 9874, "loss": 4.687308609485626, "lr_semantic": 1.8155139188768335e-05, "lr_talker": 3.631027837753667e-05, "elapsed_s": 4245.660480352992, "job_id": "2703623"} +{"step": 2460, "total_steps": 9874, "loss": 4.571246393024921, "lr_semantic": 1.8118409845381115e-05, "lr_talker": 3.623681969076223e-05, "elapsed_s": 4281.524508632952, "job_id": "2703623"} +{"step": 2480, "total_steps": 9874, "loss": 4.627372696995735, "lr_semantic": 1.8081361101616367e-05, "lr_talker": 3.6162722203232734e-05, "elapsed_s": 4312.378073047963, "job_id": "2703623"} +{"step": 2500, "total_steps": 9874, "loss": 4.656003355979919, "lr_semantic": 1.804399461983731e-05, "lr_talker": 3.608798923967462e-05, "elapsed_s": 4346.054955662985, "job_id": "2703623"} +{"step": 2520, "total_steps": 9874, "loss": 4.669977560639381, "lr_semantic": 1.800631207666396e-05, "lr_talker": 3.601262415332792e-05, "elapsed_s": 4377.5651359919575, "job_id": "2703623"} +{"step": 2540, "total_steps": 9874, "loss": 4.654866591095924, "lr_semantic": 1.7968315162897883e-05, "lr_talker": 3.5936630325795766e-05, "elapsed_s": 4416.601515095972, "job_id": "2703623"} +{"step": 2560, "total_steps": 9874, "loss": 4.554052211344242, "lr_semantic": 1.793000558344633e-05, "lr_talker": 3.586001116689266e-05, "elapsed_s": 4456.477809453965, "job_id": "2703623"} +{"step": 2580, "total_steps": 9874, "loss": 4.662417858839035, "lr_semantic": 1.7891385057245755e-05, "lr_talker": 3.578277011449151e-05, "elapsed_s": 4491.7779500049655, "job_id": "2703623"} +{"step": 2600, "total_steps": 9874, "loss": 4.64414881169796, "lr_semantic": 1.785245531718467e-05, "lr_talker": 3.570491063436934e-05, "elapsed_s": 4522.939580330974, "job_id": "2703623"} +{"step": 2620, "total_steps": 9874, "loss": 4.671129554510117, "lr_semantic": 1.7813218110025894e-05, "lr_talker": 3.562643622005179e-05, "elapsed_s": 4553.596325774968, "job_id": "2703623"} +{"step": 2640, "total_steps": 9874, "loss": 4.606680192053318, "lr_semantic": 1.7773675196328187e-05, "lr_talker": 3.5547350392656374e-05, "elapsed_s": 4583.5498594439705, "job_id": "2703623"} +{"step": 2660, "total_steps": 9874, "loss": 4.674878507852554, "lr_semantic": 1.7733828350367243e-05, "lr_talker": 3.5467656700734486e-05, "elapsed_s": 4618.241127121961, "job_id": "2703623"} +{"step": 2680, "total_steps": 9874, "loss": 4.680110841989517, "lr_semantic": 1.7693679360056076e-05, "lr_talker": 3.538735872011215e-05, "elapsed_s": 4681.458827021008, "job_id": "2703623"} +{"step": 2700, "total_steps": 9874, "loss": 4.583877503871918, "lr_semantic": 1.7653230026864817e-05, "lr_talker": 3.530646005372963e-05, "elapsed_s": 4715.500514676969, "job_id": "2703623"} +{"step": 2720, "total_steps": 9874, "loss": 4.601848378777504, "lr_semantic": 1.7612482165739854e-05, "lr_talker": 3.522496433147971e-05, "elapsed_s": 4748.390113630972, "job_id": "2703623"} +{"step": 2740, "total_steps": 9874, "loss": 4.656194441020489, "lr_semantic": 1.7571437605022424e-05, "lr_talker": 3.514287521004485e-05, "elapsed_s": 4779.820376946009, "job_id": "2703623"} +{"step": 2760, "total_steps": 9874, "loss": 4.634560756385326, "lr_semantic": 1.7530098186366555e-05, "lr_talker": 3.506019637273311e-05, "elapsed_s": 4810.22703701799, "job_id": "2703623"} +{"step": 2780, "total_steps": 9874, "loss": 4.540877766907215, "lr_semantic": 1.7488465764656447e-05, "lr_talker": 3.497693152931289e-05, "elapsed_s": 4847.334994670993, "job_id": "2703623"} +{"step": 2800, "total_steps": 9874, "loss": 4.547664605081081, "lr_semantic": 1.7446542207923232e-05, "lr_talker": 3.4893084415846464e-05, "elapsed_s": 4877.901728610974, "job_id": "2703623"} +{"step": 2820, "total_steps": 9874, "loss": 4.501658491790295, "lr_semantic": 1.7404329397261164e-05, "lr_talker": 3.480865879452233e-05, "elapsed_s": 4911.432676833007, "job_id": "2703623"} +{"step": 2840, "total_steps": 9874, "loss": 4.64779219776392, "lr_semantic": 1.7361829226743205e-05, "lr_talker": 3.472365845348641e-05, "elapsed_s": 4943.221190705954, "job_id": "2703623"} +{"step": 2860, "total_steps": 9874, "loss": 4.578378036618233, "lr_semantic": 1.731904360333606e-05, "lr_talker": 3.463808720667212e-05, "elapsed_s": 4978.170791032957, "job_id": "2703623"} +{"step": 2880, "total_steps": 9874, "loss": 4.597419887781143, "lr_semantic": 1.7275974446814587e-05, "lr_talker": 3.455194889362917e-05, "elapsed_s": 5009.128303657984, "job_id": "2703623"} +{"step": 2900, "total_steps": 9874, "loss": 4.671663329005241, "lr_semantic": 1.7232623689675667e-05, "lr_talker": 3.4465247379351334e-05, "elapsed_s": 5041.449480573006, "job_id": "2703623"} +{"step": 2920, "total_steps": 9874, "loss": 4.656583055853844, "lr_semantic": 1.7188993277051502e-05, "lr_talker": 3.4377986554103005e-05, "elapsed_s": 5071.9826117180055, "job_id": "2703623"} +{"step": 2940, "total_steps": 9874, "loss": 4.588220551609993, "lr_semantic": 1.7145085166622326e-05, "lr_talker": 3.429017033324465e-05, "elapsed_s": 5109.504097787954, "job_id": "2703623"} +{"step": 2960, "total_steps": 9874, "loss": 4.643932014703751, "lr_semantic": 1.7100901328528573e-05, "lr_talker": 3.4201802657057146e-05, "elapsed_s": 5147.940228051972, "job_id": "2703623"} +{"step": 2980, "total_steps": 9874, "loss": 4.705392464995384, "lr_semantic": 1.705644374528247e-05, "lr_talker": 3.411288749056494e-05, "elapsed_s": 5181.620894691965, "job_id": "2703623"} +{"step": 3000, "total_steps": 9874, "loss": 4.576063945889473, "lr_semantic": 1.7011714411679093e-05, "lr_talker": 3.402342882335819e-05, "elapsed_s": 5215.683930862986, "job_id": "2703623"} +{"step": 3020, "total_steps": 9874, "loss": 4.637887805700302, "lr_semantic": 1.6966715334706844e-05, "lr_talker": 3.393343066941369e-05, "elapsed_s": 5248.4266191449715, "job_id": "2703623"} +{"step": 3040, "total_steps": 9874, "loss": 4.574286058545113, "lr_semantic": 1.6921448533457415e-05, "lr_talker": 3.384289706691483e-05, "elapsed_s": 5284.8361964389915, "job_id": "2703623"} +{"step": 3060, "total_steps": 9874, "loss": 4.506727993488312, "lr_semantic": 1.6875916039035187e-05, "lr_talker": 3.3751832078070375e-05, "elapsed_s": 5318.370958013984, "job_id": "2703623"} +{"step": 3080, "total_steps": 9874, "loss": 4.732377514243126, "lr_semantic": 1.6830119894466093e-05, "lr_talker": 3.3660239788932186e-05, "elapsed_s": 5348.964154143003, "job_id": "2703623"} +{"step": 3100, "total_steps": 9874, "loss": 4.661500699818134, "lr_semantic": 1.6784062154605942e-05, "lr_talker": 3.3568124309211885e-05, "elapsed_s": 5383.06321743899, "job_id": "2703623"} +{"step": 3120, "total_steps": 9874, "loss": 4.689307168126106, "lr_semantic": 1.6737744886048238e-05, "lr_talker": 3.3475489772096476e-05, "elapsed_s": 5418.052124724956, "job_id": "2703623"} +{"step": 3140, "total_steps": 9874, "loss": 4.704151824116707, "lr_semantic": 1.6691170167031426e-05, "lr_talker": 3.338234033406285e-05, "elapsed_s": 5451.385879435984, "job_id": "2703623"} +{"step": 3160, "total_steps": 9874, "loss": 4.633083313703537, "lr_semantic": 1.6644340087345677e-05, "lr_talker": 3.3288680174691354e-05, "elapsed_s": 5483.834111534001, "job_id": "2703623"} +{"step": 3180, "total_steps": 9874, "loss": 4.645531311631203, "lr_semantic": 1.6597256748239074e-05, "lr_talker": 3.319451349647815e-05, "elapsed_s": 5520.693425745005, "job_id": "2703623"} +{"step": 3200, "total_steps": 9874, "loss": 4.597260035574436, "lr_semantic": 1.6549922262323375e-05, "lr_talker": 3.309984452464675e-05, "elapsed_s": 5553.425512825954, "job_id": "2703623"} +{"step": 3220, "total_steps": 9874, "loss": 4.637601405382156, "lr_semantic": 1.6502338753479195e-05, "lr_talker": 3.300467750695839e-05, "elapsed_s": 5619.884637534968, "job_id": "2703623"} +{"step": 3240, "total_steps": 9874, "loss": 4.607885807752609, "lr_semantic": 1.6454508356760708e-05, "lr_talker": 3.2909016713521415e-05, "elapsed_s": 5656.970476308954, "job_id": "2703623"} +{"step": 3260, "total_steps": 9874, "loss": 4.614548087120056, "lr_semantic": 1.6406433218299858e-05, "lr_talker": 3.2812866436599717e-05, "elapsed_s": 5689.854673657974, "job_id": "2703623"} +{"step": 3280, "total_steps": 9874, "loss": 4.597330786287785, "lr_semantic": 1.6358115495210067e-05, "lr_talker": 3.2716230990420134e-05, "elapsed_s": 5725.095579204964, "job_id": "2703623"} +{"step": 3300, "total_steps": 9874, "loss": 4.659695997834206, "lr_semantic": 1.6309557355489428e-05, "lr_talker": 3.2619114710978855e-05, "elapsed_s": 5757.7286833939725, "job_id": "2703623"} +{"step": 3320, "total_steps": 9874, "loss": 4.62954194098711, "lr_semantic": 1.626076097792344e-05, "lr_talker": 3.252152195584688e-05, "elapsed_s": 5788.774381321971, "job_id": "2703623"} +{"step": 3340, "total_steps": 9874, "loss": 4.607960939407349, "lr_semantic": 1.621172855198725e-05, "lr_talker": 3.24234571039745e-05, "elapsed_s": 5819.746956994, "job_id": "2703623"} +{"step": 3360, "total_steps": 9874, "loss": 4.64745531976223, "lr_semantic": 1.61624622777474e-05, "lr_talker": 3.23249245554948e-05, "elapsed_s": 5852.217870084976, "job_id": "2703623"} +{"step": 3380, "total_steps": 9874, "loss": 4.684551581740379, "lr_semantic": 1.6112964365763122e-05, "lr_talker": 3.2225928731526245e-05, "elapsed_s": 5884.83330203197, "job_id": "2703623"} +{"step": 3400, "total_steps": 9874, "loss": 4.518119111657143, "lr_semantic": 1.606323703698715e-05, "lr_talker": 3.21264740739743e-05, "elapsed_s": 5922.668664922006, "job_id": "2703623"} +{"step": 3420, "total_steps": 9874, "loss": 4.682022660970688, "lr_semantic": 1.6013282522666053e-05, "lr_talker": 3.2026565045332106e-05, "elapsed_s": 5961.853050766978, "job_id": "2703623"} +{"step": 3440, "total_steps": 9874, "loss": 4.589757949113846, "lr_semantic": 1.5963103064240132e-05, "lr_talker": 3.1926206128480264e-05, "elapsed_s": 5997.886443463969, "job_id": "2703623"} +{"step": 3460, "total_steps": 9874, "loss": 4.539127603173256, "lr_semantic": 1.5912700913242857e-05, "lr_talker": 3.1825401826485715e-05, "elapsed_s": 6031.062995727989, "job_id": "2703623"} +{"step": 3480, "total_steps": 9874, "loss": 4.583381190896034, "lr_semantic": 1.586207833119982e-05, "lr_talker": 3.172415666239964e-05, "elapsed_s": 6064.4523142799735, "job_id": "2703623"} +{"step": 3500, "total_steps": 9874, "loss": 4.50726293027401, "lr_semantic": 1.5811237589527277e-05, "lr_talker": 3.1622475179054555e-05, "elapsed_s": 6096.766415920982, "job_id": "2703623"} +{"step": 3520, "total_steps": 9874, "loss": 4.573361277580261, "lr_semantic": 1.576018096943021e-05, "lr_talker": 3.152036193886042e-05, "elapsed_s": 6128.603661723959, "job_id": "2703623"} +{"step": 3540, "total_steps": 9874, "loss": 4.554789073765278, "lr_semantic": 1.5708910761800015e-05, "lr_talker": 3.141782152360003e-05, "elapsed_s": 6162.52437923901, "job_id": "2703623"} +{"step": 3560, "total_steps": 9874, "loss": 4.619796901941299, "lr_semantic": 1.5657429267111643e-05, "lr_talker": 3.1314858534223286e-05, "elapsed_s": 6197.563070238975, "job_id": "2703623"} +{"step": 3580, "total_steps": 9874, "loss": 4.642984874546528, "lr_semantic": 1.5605738795320443e-05, "lr_talker": 3.121147759064089e-05, "elapsed_s": 6231.806120506953, "job_id": "2703623"} +{"step": 3600, "total_steps": 9874, "loss": 4.535115629434586, "lr_semantic": 1.555384166575848e-05, "lr_talker": 3.110768333151696e-05, "elapsed_s": 6266.142911391973, "job_id": "2703623"} +{"step": 3620, "total_steps": 9874, "loss": 4.676593914628029, "lr_semantic": 1.5501740207030475e-05, "lr_talker": 3.100348041406095e-05, "elapsed_s": 6298.312616874988, "job_id": "2703623"} +{"step": 3640, "total_steps": 9874, "loss": 4.631720148026943, "lr_semantic": 1.5449436756909323e-05, "lr_talker": 3.0898873513818645e-05, "elapsed_s": 6331.4979823289905, "job_id": "2703623"} +{"step": 3660, "total_steps": 9874, "loss": 4.600471384823322, "lr_semantic": 1.5396933662231194e-05, "lr_talker": 3.079386732446239e-05, "elapsed_s": 6364.52792993898, "job_id": "2703623"} +{"step": 3680, "total_steps": 9874, "loss": 4.646907150745392, "lr_semantic": 1.5344233278790234e-05, "lr_talker": 3.068846655758047e-05, "elapsed_s": 6402.124378181004, "job_id": "2703623"} +{"step": 3700, "total_steps": 9874, "loss": 4.645232856273651, "lr_semantic": 1.5291337971232875e-05, "lr_talker": 3.058267594246575e-05, "elapsed_s": 6436.840454677993, "job_id": "2703623"} +{"step": 3720, "total_steps": 9874, "loss": 4.567731969058514, "lr_semantic": 1.52382501129517e-05, "lr_talker": 3.04765002259034e-05, "elapsed_s": 6472.21277808497, "job_id": "2703623"} +{"step": 3740, "total_steps": 9874, "loss": 4.568835154175758, "lr_semantic": 1.5184972085978987e-05, "lr_talker": 3.0369944171957974e-05, "elapsed_s": 6537.722707927984, "job_id": "2703623"} +{"step": 3760, "total_steps": 9874, "loss": 4.621561639010906, "lr_semantic": 1.5131506280879804e-05, "lr_talker": 3.0263012561759607e-05, "elapsed_s": 6573.516389548953, "job_id": "2703623"} +{"step": 3780, "total_steps": 9874, "loss": 4.58844531327486, "lr_semantic": 1.5077855096644752e-05, "lr_talker": 3.0155710193289504e-05, "elapsed_s": 6607.298815474962, "job_id": "2703623"} +{"step": 3800, "total_steps": 9874, "loss": 4.564365707337856, "lr_semantic": 1.502402094058233e-05, "lr_talker": 3.004804188116466e-05, "elapsed_s": 6637.4843477789545, "job_id": "2703623"} +{"step": 3820, "total_steps": 9874, "loss": 4.685849830508232, "lr_semantic": 1.4970006228210912e-05, "lr_talker": 2.9940012456421824e-05, "elapsed_s": 6672.608736541995, "job_id": "2703623"} +{"step": 3840, "total_steps": 9874, "loss": 4.56471910327673, "lr_semantic": 1.4915813383150364e-05, "lr_talker": 2.9831626766300728e-05, "elapsed_s": 6708.043868994981, "job_id": "2703623"} +{"step": 3860, "total_steps": 9874, "loss": 4.533642739057541, "lr_semantic": 1.4861444837013301e-05, "lr_talker": 2.9722889674026603e-05, "elapsed_s": 6743.869239476975, "job_id": "2703623"} +{"step": 3880, "total_steps": 9874, "loss": 4.545456096529961, "lr_semantic": 1.4806903029295977e-05, "lr_talker": 2.9613806058591953e-05, "elapsed_s": 6776.206817044993, "job_id": "2703623"} +{"step": 3900, "total_steps": 9874, "loss": 4.521497339010239, "lr_semantic": 1.4752190407268827e-05, "lr_talker": 2.9504380814537653e-05, "elapsed_s": 6809.689510555996, "job_id": "2703623"} +{"step": 3920, "total_steps": 9874, "loss": 4.639331087470055, "lr_semantic": 1.469730942586667e-05, "lr_talker": 2.939461885173334e-05, "elapsed_s": 6845.707355550956, "job_id": "2703623"} +{"step": 3940, "total_steps": 9874, "loss": 4.6123568415641785, "lr_semantic": 1.464226254757853e-05, "lr_talker": 2.928452509515706e-05, "elapsed_s": 6880.372433536977, "job_id": "2703623"} +{"step": 3960, "total_steps": 9874, "loss": 4.5665595680475235, "lr_semantic": 1.4587052242337177e-05, "lr_talker": 2.9174104484674353e-05, "elapsed_s": 6915.257009684981, "job_id": "2703623"} +{"step": 3980, "total_steps": 9874, "loss": 4.569710627198219, "lr_semantic": 1.453168098740828e-05, "lr_talker": 2.906336197481656e-05, "elapsed_s": 6948.918763667985, "job_id": "2703623"} +{"step": 4000, "total_steps": 9874, "loss": 4.594285786151886, "lr_semantic": 1.4476151267279266e-05, "lr_talker": 2.895230253455853e-05, "elapsed_s": 6980.324573088961, "job_id": "2703623"} +{"step": 4020, "total_steps": 9874, "loss": 4.55719917267561, "lr_semantic": 1.4420465573547821e-05, "lr_talker": 2.8840931147095642e-05, "elapsed_s": 7013.847914190963, "job_id": "2703623"} +{"step": 4040, "total_steps": 9874, "loss": 4.5941417664289474, "lr_semantic": 1.436462640481013e-05, "lr_talker": 2.872925280962026e-05, "elapsed_s": 7047.295714395994, "job_id": "2703623"} +{"step": 4060, "total_steps": 9874, "loss": 4.5967254638671875, "lr_semantic": 1.4308636266548723e-05, "lr_talker": 2.8617272533097446e-05, "elapsed_s": 7081.361744381953, "job_id": "2703623"} +{"step": 4080, "total_steps": 9874, "loss": 4.534822352230549, "lr_semantic": 1.4252497671020093e-05, "lr_talker": 2.8504995342040187e-05, "elapsed_s": 7110.369924180966, "job_id": "2703623"} +{"step": 4100, "total_steps": 9874, "loss": 4.624625243246555, "lr_semantic": 1.4196213137141943e-05, "lr_talker": 2.8392426274283885e-05, "elapsed_s": 7142.868092785997, "job_id": "2703623"} +{"step": 4120, "total_steps": 9874, "loss": 4.620576471090317, "lr_semantic": 1.4139785190380178e-05, "lr_talker": 2.8279570380760355e-05, "elapsed_s": 7175.475975634006, "job_id": "2703623"} +{"step": 4140, "total_steps": 9874, "loss": 4.573024965822697, "lr_semantic": 1.4083216362635586e-05, "lr_talker": 2.816643272527117e-05, "elapsed_s": 7206.86700970598, "job_id": "2703623"} +{"step": 4160, "total_steps": 9874, "loss": 4.6584117859601974, "lr_semantic": 1.4026509192130237e-05, "lr_talker": 2.8053018384260474e-05, "elapsed_s": 7239.127082297986, "job_id": "2703623"} +{"step": 4180, "total_steps": 9874, "loss": 4.6659547090530396, "lr_semantic": 1.396966622329358e-05, "lr_talker": 2.793933244658716e-05, "elapsed_s": 7270.946137166, "job_id": "2703623"} +{"step": 4200, "total_steps": 9874, "loss": 4.5472676157951355, "lr_semantic": 1.3912690006648288e-05, "lr_talker": 2.7825380013296576e-05, "elapsed_s": 7305.024276818964, "job_id": "2703623"} +{"step": 4220, "total_steps": 9874, "loss": 4.539058491587639, "lr_semantic": 1.3855583098695813e-05, "lr_talker": 2.7711166197391627e-05, "elapsed_s": 7341.220491885964, "job_id": "2703623"} +{"step": 4240, "total_steps": 9874, "loss": 4.55503772944212, "lr_semantic": 1.3798348061801681e-05, "lr_talker": 2.7596696123603363e-05, "elapsed_s": 7373.320434225956, "job_id": "2703623"} +{"step": 4260, "total_steps": 9874, "loss": 4.556104816496372, "lr_semantic": 1.3740987464080506e-05, "lr_talker": 2.7481974928161012e-05, "elapsed_s": 7403.802853152971, "job_id": "2703623"} +{"step": 4280, "total_steps": 9874, "loss": 4.588320538401604, "lr_semantic": 1.3683503879280776e-05, "lr_talker": 2.7367007758561552e-05, "elapsed_s": 7467.1362099199905, "job_id": "2703623"} +{"step": 4300, "total_steps": 9874, "loss": 4.583535730838776, "lr_semantic": 1.3625899886669364e-05, "lr_talker": 2.725179977333873e-05, "elapsed_s": 7507.598974577966, "job_id": "2703623"} +{"step": 4320, "total_steps": 9874, "loss": 4.5588643699884415, "lr_semantic": 1.3568178070915794e-05, "lr_talker": 2.7136356141831587e-05, "elapsed_s": 7540.029681661981, "job_id": "2703623"} +{"step": 4340, "total_steps": 9874, "loss": 4.514898627996445, "lr_semantic": 1.351034102197627e-05, "lr_talker": 2.702068204395254e-05, "elapsed_s": 7579.867820493004, "job_id": "2703623"} +{"step": 4360, "total_steps": 9874, "loss": 4.569690890610218, "lr_semantic": 1.3452391334977462e-05, "lr_talker": 2.6904782669954924e-05, "elapsed_s": 7614.010517793999, "job_id": "2703623"} +{"step": 4380, "total_steps": 9874, "loss": 4.492667160928249, "lr_semantic": 1.3394331610100078e-05, "lr_talker": 2.6788663220200155e-05, "elapsed_s": 7649.026303088991, "job_id": "2703623"} +{"step": 4400, "total_steps": 9874, "loss": 4.675622910261154, "lr_semantic": 1.3336164452462172e-05, "lr_talker": 2.6672328904924344e-05, "elapsed_s": 7687.027865180979, "job_id": "2703623"} +{"step": 4420, "total_steps": 9874, "loss": 4.510286942124367, "lr_semantic": 1.3277892472002274e-05, "lr_talker": 2.655578494400455e-05, "elapsed_s": 7721.578833370993, "job_id": "2703623"} +{"step": 4440, "total_steps": 9874, "loss": 4.623933970928192, "lr_semantic": 1.3219518283362276e-05, "lr_talker": 2.643903656672455e-05, "elapsed_s": 7752.942460877006, "job_id": "2703623"} +{"step": 4460, "total_steps": 9874, "loss": 4.624278321862221, "lr_semantic": 1.3161044505770102e-05, "lr_talker": 2.6322089011540204e-05, "elapsed_s": 7784.497932134953, "job_id": "2703623"} +{"step": 4480, "total_steps": 9874, "loss": 4.570351757109165, "lr_semantic": 1.3102473762922206e-05, "lr_talker": 2.6204947525844412e-05, "elapsed_s": 7816.646777257964, "job_id": "2703623"} +{"step": 4500, "total_steps": 9874, "loss": 4.5900596752762794, "lr_semantic": 1.3043808682865828e-05, "lr_talker": 2.6087617365731656e-05, "elapsed_s": 7849.750162525976, "job_id": "2703623"} +{"step": 4520, "total_steps": 9874, "loss": 4.674789667129517, "lr_semantic": 1.2985051897881092e-05, "lr_talker": 2.5970103795762184e-05, "elapsed_s": 7881.9143714949605, "job_id": "2703623"} +{"step": 4540, "total_steps": 9874, "loss": 4.575960412621498, "lr_semantic": 1.2926206044362883e-05, "lr_talker": 2.5852412088725766e-05, "elapsed_s": 7920.902078559971, "job_id": "2703623"} +{"step": 4560, "total_steps": 9874, "loss": 4.592196926474571, "lr_semantic": 1.2867273762702553e-05, "lr_talker": 2.5734547525405106e-05, "elapsed_s": 7950.944510959962, "job_id": "2703623"} +{"step": 4580, "total_steps": 9874, "loss": 4.588491626083851, "lr_semantic": 1.2808257697169463e-05, "lr_talker": 2.5616515394338925e-05, "elapsed_s": 7981.628618174, "job_id": "2703623"} +{"step": 4600, "total_steps": 9874, "loss": 4.597743287682533, "lr_semantic": 1.2749160495792315e-05, "lr_talker": 2.549832099158463e-05, "elapsed_s": 8016.28401063499, "job_id": "2703623"} +{"step": 4620, "total_steps": 9874, "loss": 4.569499589502811, "lr_semantic": 1.2689984810240352e-05, "lr_talker": 2.5379969620480703e-05, "elapsed_s": 8053.50580561196, "job_id": "2703623"} +{"step": 4640, "total_steps": 9874, "loss": 4.596047505736351, "lr_semantic": 1.2630733295704367e-05, "lr_talker": 2.5261466591408733e-05, "elapsed_s": 8088.09196433099, "job_id": "2703623"} +{"step": 4660, "total_steps": 9874, "loss": 4.623857505619526, "lr_semantic": 1.2571408610777576e-05, "lr_talker": 2.514281722155515e-05, "elapsed_s": 8120.058820856968, "job_id": "2703623"} +{"step": 4680, "total_steps": 9874, "loss": 4.575288586318493, "lr_semantic": 1.2512013417336323e-05, "lr_talker": 2.5024026834672647e-05, "elapsed_s": 8153.537496085977, "job_id": "2703623"} +{"step": 4700, "total_steps": 9874, "loss": 4.526017315685749, "lr_semantic": 1.2452550380420645e-05, "lr_talker": 2.490510076084129e-05, "elapsed_s": 8188.153203037975, "job_id": "2703623"} +{"step": 4720, "total_steps": 9874, "loss": 4.526529759168625, "lr_semantic": 1.2393022168114676e-05, "lr_talker": 2.4786044336229352e-05, "elapsed_s": 8224.173721430008, "job_id": "2703623"} +{"step": 4740, "total_steps": 9874, "loss": 4.531868159770966, "lr_semantic": 1.2333431451426962e-05, "lr_talker": 2.4666862902853925e-05, "elapsed_s": 8257.651615076, "job_id": "2703623"} +{"step": 4760, "total_steps": 9874, "loss": 4.608190640807152, "lr_semantic": 1.227378090417059e-05, "lr_talker": 2.454756180834118e-05, "elapsed_s": 8288.317526470986, "job_id": "2703623"} +{"step": 4780, "total_steps": 9874, "loss": 4.590130552649498, "lr_semantic": 1.221407320284322e-05, "lr_talker": 2.442814640568644e-05, "elapsed_s": 8324.798558798968, "job_id": "2703623"} +{"step": 4800, "total_steps": 9874, "loss": 4.661594599485397, "lr_semantic": 1.2154311026506998e-05, "lr_talker": 2.4308622053013996e-05, "elapsed_s": 8387.92243215401, "job_id": "2703623"} +{"step": 4820, "total_steps": 9874, "loss": 4.646523863077164, "lr_semantic": 1.2094497056668342e-05, "lr_talker": 2.4188994113336683e-05, "elapsed_s": 8423.726720676, "job_id": "2703623"} +{"step": 4840, "total_steps": 9874, "loss": 4.536067798733711, "lr_semantic": 1.2034633977157627e-05, "lr_talker": 2.4069267954315253e-05, "elapsed_s": 8455.858145579987, "job_id": "2703623"} +{"step": 4860, "total_steps": 9874, "loss": 4.610396824777126, "lr_semantic": 1.1974724474008756e-05, "lr_talker": 2.3949448948017512e-05, "elapsed_s": 8487.17736175697, "job_id": "2703623"} +{"step": 4880, "total_steps": 9874, "loss": 4.536619134247303, "lr_semantic": 1.1914771235338642e-05, "lr_talker": 2.3829542470677284e-05, "elapsed_s": 8520.967447334959, "job_id": "2703623"} +{"step": 4900, "total_steps": 9874, "loss": 4.585189178586006, "lr_semantic": 1.1854776951226604e-05, "lr_talker": 2.3709553902453207e-05, "elapsed_s": 8551.850569476956, "job_id": "2703623"} +{"step": 4920, "total_steps": 9874, "loss": 4.578746013343334, "lr_semantic": 1.1794744313593643e-05, "lr_talker": 2.3589488627187286e-05, "elapsed_s": 8581.878124105977, "job_id": "2703623"} +{"step": 4940, "total_steps": 9874, "loss": 4.501989476382732, "lr_semantic": 1.1734676016081678e-05, "lr_talker": 2.3469352032163357e-05, "elapsed_s": 8640.581212789984, "job_id": "2703623"} +{"step": 4960, "total_steps": 9874, "loss": 4.569875121116638, "lr_semantic": 1.1674574753932666e-05, "lr_talker": 2.3349149507865333e-05, "elapsed_s": 8674.477184179006, "job_id": "2703623"} +{"step": 4980, "total_steps": 9874, "loss": 4.549982942640781, "lr_semantic": 1.161444322386768e-05, "lr_talker": 2.322888644773536e-05, "elapsed_s": 8708.058143034985, "job_id": "2703623"} +{"step": 5000, "total_steps": 9874, "loss": 4.586710669100285, "lr_semantic": 1.1554284123965896e-05, "lr_talker": 2.3108568247931792e-05, "elapsed_s": 8741.39090526296, "job_id": "2703623"} +{"step": 5020, "total_steps": 9874, "loss": 4.5936915427446365, "lr_semantic": 1.1494100153543548e-05, "lr_talker": 2.2988200307087097e-05, "elapsed_s": 8776.840072063962, "job_id": "2703623"} +{"step": 5040, "total_steps": 9874, "loss": 4.48408005386591, "lr_semantic": 1.1433894013032794e-05, "lr_talker": 2.2867788026065588e-05, "elapsed_s": 8808.308528660971, "job_id": "2703623"} +{"step": 5060, "total_steps": 9874, "loss": 4.588514447212219, "lr_semantic": 1.1373668403860559e-05, "lr_talker": 2.2747336807721118e-05, "elapsed_s": 8839.95794826001, "job_id": "2703623"} +{"step": 5080, "total_steps": 9874, "loss": 4.512915827333927, "lr_semantic": 1.1313426028327316e-05, "lr_talker": 2.2626852056654633e-05, "elapsed_s": 8873.73715382698, "job_id": "2703623"} +{"step": 5100, "total_steps": 9874, "loss": 4.605562791228294, "lr_semantic": 1.1253169589485842e-05, "lr_talker": 2.2506339178971684e-05, "elapsed_s": 8903.25081981899, "job_id": "2703623"} +{"step": 5120, "total_steps": 9874, "loss": 4.514265954494476, "lr_semantic": 1.1192901791019928e-05, "lr_talker": 2.2385803582039855e-05, "elapsed_s": 8935.510529952997, "job_id": "2703623"} +{"step": 5140, "total_steps": 9874, "loss": 4.552976369857788, "lr_semantic": 1.1132625337123064e-05, "lr_talker": 2.226525067424613e-05, "elapsed_s": 8970.461669678974, "job_id": "2703623"} +{"step": 5160, "total_steps": 9874, "loss": 4.570864714682102, "lr_semantic": 1.1072342932377114e-05, "lr_talker": 2.214468586475423e-05, "elapsed_s": 9004.360820542963, "job_id": "2703623"} +{"step": 5180, "total_steps": 9874, "loss": 4.657226547598839, "lr_semantic": 1.1012057281630942e-05, "lr_talker": 2.2024114563261883e-05, "elapsed_s": 9039.516258472984, "job_id": "2703623"} +{"step": 5200, "total_steps": 9874, "loss": 4.546940669417381, "lr_semantic": 1.095177108987907e-05, "lr_talker": 2.190354217975814e-05, "elapsed_s": 9073.857705250965, "job_id": "2703623"} +{"step": 5220, "total_steps": 9874, "loss": 4.5332964062690735, "lr_semantic": 1.0891487062140289e-05, "lr_talker": 2.1782974124280577e-05, "elapsed_s": 9107.832531863998, "job_id": "2703623"} +{"step": 5240, "total_steps": 9874, "loss": 4.537421636283398, "lr_semantic": 1.0831207903336296e-05, "lr_talker": 2.1662415806672592e-05, "elapsed_s": 9140.141561277967, "job_id": "2703623"} +{"step": 5260, "total_steps": 9874, "loss": 4.449685901403427, "lr_semantic": 1.0770936318170316e-05, "lr_talker": 2.154187263634063e-05, "elapsed_s": 9172.094223928987, "job_id": "2703623"} +{"step": 5280, "total_steps": 9874, "loss": 4.601679779589176, "lr_semantic": 1.071067501100575e-05, "lr_talker": 2.14213500220115e-05, "elapsed_s": 9203.246039129968, "job_id": "2703623"} +{"step": 5300, "total_steps": 9874, "loss": 4.613285094499588, "lr_semantic": 1.0650426685744828e-05, "lr_talker": 2.1300853371489656e-05, "elapsed_s": 9237.31257305498, "job_id": "2703623"} +{"step": 5320, "total_steps": 9874, "loss": 4.552124530076981, "lr_semantic": 1.0590194045707288e-05, "lr_talker": 2.1180388091414576e-05, "elapsed_s": 9270.677270487009, "job_id": "2703623"} +{"step": 5340, "total_steps": 9874, "loss": 4.53470005095005, "lr_semantic": 1.0529979793509076e-05, "lr_talker": 2.1059959587018152e-05, "elapsed_s": 9302.425831765984, "job_id": "2703623"} +{"step": 5360, "total_steps": 9874, "loss": 4.538596004247665, "lr_semantic": 1.0469786630941084e-05, "lr_talker": 2.093957326188217e-05, "elapsed_s": 9337.016647510987, "job_id": "2703623"} +{"step": 5380, "total_steps": 9874, "loss": 4.561832554638386, "lr_semantic": 1.0409617258847923e-05, "lr_talker": 2.0819234517695846e-05, "elapsed_s": 9368.959768631961, "job_id": "2703623"} +{"step": 5400, "total_steps": 9874, "loss": 4.541879273951054, "lr_semantic": 1.034947437700673e-05, "lr_talker": 2.069894875401346e-05, "elapsed_s": 9403.10085653601, "job_id": "2703623"} +{"step": 5420, "total_steps": 9874, "loss": 4.587428420782089, "lr_semantic": 1.0289360684006036e-05, "lr_talker": 2.0578721368012072e-05, "elapsed_s": 9438.23649059399, "job_id": "2703623"} +{"step": 5440, "total_steps": 9874, "loss": 4.55381303280592, "lr_semantic": 1.0229278877124674e-05, "lr_talker": 2.0458557754249348e-05, "elapsed_s": 9474.011518215004, "job_id": "2703623"} +{"step": 5460, "total_steps": 9874, "loss": 4.524394288659096, "lr_semantic": 1.0169231652210772e-05, "lr_talker": 2.0338463304421545e-05, "elapsed_s": 9506.445833591977, "job_id": "2703623"} +{"step": 5480, "total_steps": 9874, "loss": 4.5937536880373955, "lr_semantic": 1.0109221703560766e-05, "lr_talker": 2.021844340712153e-05, "elapsed_s": 9573.256850601989, "job_id": "2703623"} +{"step": 5500, "total_steps": 9874, "loss": 4.503552861511707, "lr_semantic": 1.0049251723798528e-05, "lr_talker": 2.0098503447597057e-05, "elapsed_s": 9610.550406922994, "job_id": "2703623"} +{"step": 5520, "total_steps": 9874, "loss": 4.446819826960564, "lr_semantic": 9.98932440375453e-06, "lr_talker": 1.997864880750906e-05, "elapsed_s": 9646.205314220977, "job_id": "2703623"} +{"step": 5540, "total_steps": 9874, "loss": 4.520036458969116, "lr_semantic": 9.929442432345134e-06, "lr_talker": 1.9858884864690267e-05, "elapsed_s": 9679.842682301009, "job_id": "2703623"} +{"step": 5560, "total_steps": 9874, "loss": 4.5309848934412, "lr_semantic": 9.869608496451912e-06, "lr_talker": 1.9739216992903824e-05, "elapsed_s": 9714.487161019002, "job_id": "2703623"} +{"step": 5580, "total_steps": 9874, "loss": 4.487326741218567, "lr_semantic": 9.809825280801113e-06, "lr_talker": 1.9619650561602225e-05, "elapsed_s": 9748.638625758991, "job_id": "2703623"} +{"step": 5600, "total_steps": 9874, "loss": 4.471426971256733, "lr_semantic": 9.750095467843171e-06, "lr_talker": 1.9500190935686342e-05, "elapsed_s": 9777.422404770972, "job_id": "2703623"} +{"step": 5620, "total_steps": 9874, "loss": 4.502988189458847, "lr_semantic": 9.690421737632376e-06, "lr_talker": 1.9380843475264752e-05, "elapsed_s": 9807.696044006967, "job_id": "2703623"} +{"step": 5640, "total_steps": 9874, "loss": 4.570829518139362, "lr_semantic": 9.630806767706605e-06, "lr_talker": 1.926161353541321e-05, "elapsed_s": 9840.993219473981, "job_id": "2703623"} +{"step": 5660, "total_steps": 9874, "loss": 4.49623803794384, "lr_semantic": 9.571253232967172e-06, "lr_talker": 1.9142506465934344e-05, "elapsed_s": 9872.705042078975, "job_id": "2703623"} +{"step": 5680, "total_steps": 9874, "loss": 4.550879471004009, "lr_semantic": 9.511763805558827e-06, "lr_talker": 1.9023527611117655e-05, "elapsed_s": 9908.479526187992, "job_id": "2703623"} +{"step": 5700, "total_steps": 9874, "loss": 4.545819282531738, "lr_semantic": 9.452341154749851e-06, "lr_talker": 1.8904682309499703e-05, "elapsed_s": 9944.385056052997, "job_id": "2703623"} +{"step": 5720, "total_steps": 9874, "loss": 4.531097933650017, "lr_semantic": 9.39298794681227e-06, "lr_talker": 1.878597589362454e-05, "elapsed_s": 9977.341863078007, "job_id": "2703623"} +{"step": 5740, "total_steps": 9874, "loss": 4.548263713717461, "lr_semantic": 9.333706844902253e-06, "lr_talker": 1.8667413689804505e-05, "elapsed_s": 10008.189725528006, "job_id": "2703623"} +{"step": 5760, "total_steps": 9874, "loss": 4.470205336809158, "lr_semantic": 9.274500508940579e-06, "lr_talker": 1.8549001017881158e-05, "elapsed_s": 10039.61603169801, "job_id": "2703623"} +{"step": 5780, "total_steps": 9874, "loss": 4.559821285307407, "lr_semantic": 9.21537159549332e-06, "lr_talker": 1.843074319098664e-05, "elapsed_s": 10072.393503323954, "job_id": "2703623"} +{"step": 5800, "total_steps": 9874, "loss": 4.521087281405926, "lr_semantic": 9.156322757652629e-06, "lr_talker": 1.8312645515305258e-05, "elapsed_s": 10104.605391867983, "job_id": "2703623"} +{"step": 5820, "total_steps": 9874, "loss": 4.560447037220001, "lr_semantic": 9.09735664491769e-06, "lr_talker": 1.819471328983538e-05, "elapsed_s": 10142.417894682963, "job_id": "2703623"} +{"step": 5840, "total_steps": 9874, "loss": 4.478300824761391, "lr_semantic": 9.038475903075845e-06, "lr_talker": 1.807695180615169e-05, "elapsed_s": 10187.994073492999, "job_id": "2703623"} +{"step": 5860, "total_steps": 9874, "loss": 4.555930711328983, "lr_semantic": 8.97968317408388e-06, "lr_talker": 1.795936634816776e-05, "elapsed_s": 10224.072437085968, "job_id": "2703623"} +{"step": 5880, "total_steps": 9874, "loss": 4.512886121869087, "lr_semantic": 8.920981095949471e-06, "lr_talker": 1.7841962191898942e-05, "elapsed_s": 10256.357358129986, "job_id": "2703623"} +{"step": 5900, "total_steps": 9874, "loss": 4.4638000056147575, "lr_semantic": 8.862372302612829e-06, "lr_talker": 1.7724744605225658e-05, "elapsed_s": 10293.399191946955, "job_id": "2703623"} +{"step": 5920, "total_steps": 9874, "loss": 4.629472181200981, "lr_semantic": 8.803859423828507e-06, "lr_talker": 1.7607718847657014e-05, "elapsed_s": 10324.496708316961, "job_id": "2703623"} +{"step": 5940, "total_steps": 9874, "loss": 4.5117717906832695, "lr_semantic": 8.745445085047413e-06, "lr_talker": 1.7490890170094826e-05, "elapsed_s": 10354.772859009972, "job_id": "2703623"} +{"step": 5960, "total_steps": 9874, "loss": 4.500295571982861, "lr_semantic": 8.687131907299003e-06, "lr_talker": 1.7374263814598005e-05, "elapsed_s": 10386.918211674958, "job_id": "2703623"} +{"step": 5980, "total_steps": 9874, "loss": 4.508347511291504, "lr_semantic": 8.62892250707366e-06, "lr_talker": 1.725784501414732e-05, "elapsed_s": 10422.459717619, "job_id": "2703623"} +{"step": 6000, "total_steps": 9874, "loss": 4.479345865547657, "lr_semantic": 8.570819496205336e-06, "lr_talker": 1.714163899241067e-05, "elapsed_s": 10457.681610850967, "job_id": "2703623"} +{"step": 6020, "total_steps": 9874, "loss": 4.542340844869614, "lr_semantic": 8.512825481754306e-06, "lr_talker": 1.7025650963508612e-05, "elapsed_s": 10520.659334876982, "job_id": "2703623"} +{"step": 6040, "total_steps": 9874, "loss": 4.460962042212486, "lr_semantic": 8.454943065890232e-06, "lr_talker": 1.6909886131780465e-05, "elapsed_s": 10560.34664487798, "job_id": "2703623"} +{"step": 6060, "total_steps": 9874, "loss": 4.552079290151596, "lr_semantic": 8.39717484577538e-06, "lr_talker": 1.679434969155076e-05, "elapsed_s": 10599.38277624501, "job_id": "2703623"} +{"step": 6080, "total_steps": 9874, "loss": 4.435541249811649, "lr_semantic": 8.33952341344811e-06, "lr_talker": 1.667904682689622e-05, "elapsed_s": 10631.955878397974, "job_id": "2703623"} +{"step": 6100, "total_steps": 9874, "loss": 4.48236521333456, "lr_semantic": 8.28199135570654e-06, "lr_talker": 1.656398271141308e-05, "elapsed_s": 10664.161139998003, "job_id": "2703623"} +{"step": 6120, "total_steps": 9874, "loss": 4.54045807570219, "lr_semantic": 8.224581253992508e-06, "lr_talker": 1.6449162507985016e-05, "elapsed_s": 10696.649736468971, "job_id": "2703623"} +{"step": 6140, "total_steps": 9874, "loss": 4.569217652082443, "lr_semantic": 8.16729568427572e-06, "lr_talker": 1.633459136855144e-05, "elapsed_s": 10729.356953907001, "job_id": "2703623"} +{"step": 6160, "total_steps": 9874, "loss": 4.55715249478817, "lr_semantic": 8.110137216938192e-06, "lr_talker": 1.6220274433876385e-05, "elapsed_s": 10760.528262876964, "job_id": "2703623"} +{"step": 6180, "total_steps": 9874, "loss": 4.62988655269146, "lr_semantic": 8.053108416658894e-06, "lr_talker": 1.610621683331779e-05, "elapsed_s": 10794.384866762965, "job_id": "2703623"} +{"step": 6200, "total_steps": 9874, "loss": 4.5640386044979095, "lr_semantic": 7.996211842298685e-06, "lr_talker": 1.599242368459737e-05, "elapsed_s": 10831.263385183993, "job_id": "2703623"} +{"step": 6220, "total_steps": 9874, "loss": 4.574753060936928, "lr_semantic": 7.939450046785495e-06, "lr_talker": 1.587890009357099e-05, "elapsed_s": 10861.162445493974, "job_id": "2703623"} +{"step": 6240, "total_steps": 9874, "loss": 4.56343375146389, "lr_semantic": 7.882825576999786e-06, "lr_talker": 1.576565115399957e-05, "elapsed_s": 10896.744188556971, "job_id": "2703623"} +{"step": 6260, "total_steps": 9874, "loss": 4.589503511786461, "lr_semantic": 7.826340973660256e-06, "lr_talker": 1.565268194732051e-05, "elapsed_s": 10929.60201248998, "job_id": "2703623"} +{"step": 6280, "total_steps": 9874, "loss": 4.476758971810341, "lr_semantic": 7.769998771209858e-06, "lr_talker": 1.5539997542419715e-05, "elapsed_s": 10962.618615773972, "job_id": "2703623"} +{"step": 6300, "total_steps": 9874, "loss": 4.558613523840904, "lr_semantic": 7.713801497702055e-06, "lr_talker": 1.542760299540411e-05, "elapsed_s": 10995.142189026985, "job_id": "2703623"} +{"step": 6320, "total_steps": 9874, "loss": 4.579753555357456, "lr_semantic": 7.657751674687429e-06, "lr_talker": 1.5315503349374857e-05, "elapsed_s": 11030.29910008097, "job_id": "2703623"} +{"step": 6340, "total_steps": 9874, "loss": 4.486940152943134, "lr_semantic": 7.601851817100481e-06, "lr_talker": 1.5203703634200962e-05, "elapsed_s": 11061.383779880998, "job_id": "2703623"} +{"step": 6360, "total_steps": 9874, "loss": 4.618709519505501, "lr_semantic": 7.54610443314685e-06, "lr_talker": 1.50922088662937e-05, "elapsed_s": 11093.73595568497, "job_id": "2703623"} +{"step": 6380, "total_steps": 9874, "loss": 4.485341742634773, "lr_semantic": 7.490512024190715e-06, "lr_talker": 1.498102404838143e-05, "elapsed_s": 11128.814398915973, "job_id": "2703623"} +{"step": 6400, "total_steps": 9874, "loss": 4.472186349332333, "lr_semantic": 7.435077084642604e-06, "lr_talker": 1.4870154169285207e-05, "elapsed_s": 11162.134269383969, "job_id": "2703623"} +{"step": 6420, "total_steps": 9874, "loss": 4.532634392380714, "lr_semantic": 7.379802101847442e-06, "lr_talker": 1.4759604203694884e-05, "elapsed_s": 11197.19492415199, "job_id": "2703623"} +{"step": 6440, "total_steps": 9874, "loss": 4.551671326160431, "lr_semantic": 7.3246895559729595e-06, "lr_talker": 1.4649379111945919e-05, "elapsed_s": 11233.138114476984, "job_id": "2703623"} +{"step": 6460, "total_steps": 9874, "loss": 4.566439136862755, "lr_semantic": 7.269741919898395e-06, "lr_talker": 1.453948383979679e-05, "elapsed_s": 11269.681269631954, "job_id": "2703623"} +{"step": 6480, "total_steps": 9874, "loss": 4.432240933179855, "lr_semantic": 7.214961659103561e-06, "lr_talker": 1.4429923318207122e-05, "elapsed_s": 11303.237911248987, "job_id": "2703623"} +{"step": 6500, "total_steps": 9874, "loss": 4.47530085593462, "lr_semantic": 7.1603512315581844e-06, "lr_talker": 1.4320702463116369e-05, "elapsed_s": 11335.981398099975, "job_id": "2703623"} +{"step": 6520, "total_steps": 9874, "loss": 4.567957229912281, "lr_semantic": 7.105913087611656e-06, "lr_talker": 1.4211826175223312e-05, "elapsed_s": 11372.85762399598, "job_id": "2703623"} +{"step": 6540, "total_steps": 9874, "loss": 4.519612841308117, "lr_semantic": 7.051649669883054e-06, "lr_talker": 1.4103299339766108e-05, "elapsed_s": 11437.56364807696, "job_id": "2703623"} +{"step": 6560, "total_steps": 9874, "loss": 4.509062275290489, "lr_semantic": 6.9975634131515646e-06, "lr_talker": 1.3995126826303129e-05, "elapsed_s": 11473.59450982901, "job_id": "2703623"} +{"step": 6580, "total_steps": 9874, "loss": 4.4368698969483376, "lr_semantic": 6.943656744247225e-06, "lr_talker": 1.388731348849445e-05, "elapsed_s": 11508.65474452899, "job_id": "2703623"} +{"step": 6600, "total_steps": 9874, "loss": 4.436457574367523, "lr_semantic": 6.889932081942032e-06, "lr_talker": 1.3779864163884063e-05, "elapsed_s": 11540.450473751, "job_id": "2703623"} +{"step": 6620, "total_steps": 9874, "loss": 4.485523544251919, "lr_semantic": 6.836391836841412e-06, "lr_talker": 1.3672783673682824e-05, "elapsed_s": 11570.876349543978, "job_id": "2703623"} +{"step": 6640, "total_steps": 9874, "loss": 4.506456159055233, "lr_semantic": 6.783038411276061e-06, "lr_talker": 1.3566076822552123e-05, "elapsed_s": 11607.71258113999, "job_id": "2703623"} +{"step": 6660, "total_steps": 9874, "loss": 4.588578328490257, "lr_semantic": 6.729874199194166e-06, "lr_talker": 1.3459748398388332e-05, "elapsed_s": 11640.242370794003, "job_id": "2703623"} +{"step": 6680, "total_steps": 9874, "loss": 4.505273647606373, "lr_semantic": 6.676901586053954e-06, "lr_talker": 1.3353803172107909e-05, "elapsed_s": 11676.79360417201, "job_id": "2703623"} +{"step": 6700, "total_steps": 9874, "loss": 4.536252357065678, "lr_semantic": 6.624122948716701e-06, "lr_talker": 1.3248245897433403e-05, "elapsed_s": 11711.545480347006, "job_id": "2703623"} +{"step": 6720, "total_steps": 9874, "loss": 4.524777993559837, "lr_semantic": 6.571540655340042e-06, "lr_talker": 1.3143081310680083e-05, "elapsed_s": 11745.562030857953, "job_id": "2703623"} +{"step": 6740, "total_steps": 9874, "loss": 4.5549346804618835, "lr_semantic": 6.519157065271751e-06, "lr_talker": 1.3038314130543502e-05, "elapsed_s": 11777.51056609297, "job_id": "2703623"} +{"step": 6760, "total_steps": 9874, "loss": 4.614897668361664, "lr_semantic": 6.466974528943841e-06, "lr_talker": 1.2933949057887682e-05, "elapsed_s": 11813.575809817994, "job_id": "2703623"} +{"step": 6780, "total_steps": 9874, "loss": 4.459725685417652, "lr_semantic": 6.414995387767133e-06, "lr_talker": 1.2829990775534266e-05, "elapsed_s": 11844.791226225963, "job_id": "2703623"} +{"step": 6800, "total_steps": 9874, "loss": 4.544268019497395, "lr_semantic": 6.363221974026175e-06, "lr_talker": 1.272644394805235e-05, "elapsed_s": 11879.378144518007, "job_id": "2703623"} +{"step": 6820, "total_steps": 9874, "loss": 4.5527941435575485, "lr_semantic": 6.31165661077461e-06, "lr_talker": 1.262331322154922e-05, "elapsed_s": 11909.395226566994, "job_id": "2703623"} +{"step": 6840, "total_steps": 9874, "loss": 4.570085749030113, "lr_semantic": 6.260301611730926e-06, "lr_talker": 1.2520603223461852e-05, "elapsed_s": 11944.32104593498, "job_id": "2703623"} +{"step": 6860, "total_steps": 9874, "loss": 4.546229004859924, "lr_semantic": 6.2091592811746546e-06, "lr_talker": 1.2418318562349309e-05, "elapsed_s": 11976.414875063987, "job_id": "2703623"} +{"step": 6880, "total_steps": 9874, "loss": 4.545850574970245, "lr_semantic": 6.158231913842967e-06, "lr_talker": 1.2316463827685934e-05, "elapsed_s": 12009.709889955004, "job_id": "2703623"} +{"step": 6900, "total_steps": 9874, "loss": 4.513355366885662, "lr_semantic": 6.10752179482772e-06, "lr_talker": 1.221504358965544e-05, "elapsed_s": 12041.323197899968, "job_id": "2703623"} +{"step": 6920, "total_steps": 9874, "loss": 4.581077814102173, "lr_semantic": 6.057031199472916e-06, "lr_talker": 1.2114062398945833e-05, "elapsed_s": 12072.34285738197, "job_id": "2703623"} +{"step": 6940, "total_steps": 9874, "loss": 4.494363039731979, "lr_semantic": 6.006762393272615e-06, "lr_talker": 1.201352478654523e-05, "elapsed_s": 12105.97729859798, "job_id": "2703623"} +{"step": 6960, "total_steps": 9874, "loss": 4.57546741515398, "lr_semantic": 5.9567176317692755e-06, "lr_talker": 1.1913435263538551e-05, "elapsed_s": 12139.20015862101, "job_id": "2703623"} +{"step": 6980, "total_steps": 9874, "loss": 4.458116002380848, "lr_semantic": 5.906899160452566e-06, "lr_talker": 1.1813798320905132e-05, "elapsed_s": 12173.277234685957, "job_id": "2703623"} +{"step": 7000, "total_steps": 9874, "loss": 4.492303274571896, "lr_semantic": 5.857309214658589e-06, "lr_talker": 1.1714618429317178e-05, "elapsed_s": 12206.451768948988, "job_id": "2703623"} +{"step": 7020, "total_steps": 9874, "loss": 4.522898435592651, "lr_semantic": 5.8079500194695995e-06, "lr_talker": 1.1615900038939199e-05, "elapsed_s": 12237.894701537967, "job_id": "2703623"} +{"step": 7040, "total_steps": 9874, "loss": 4.553001917898655, "lr_semantic": 5.758823789614152e-06, "lr_talker": 1.1517647579228304e-05, "elapsed_s": 12271.085048948997, "job_id": "2703623"} +{"step": 7060, "total_steps": 9874, "loss": 4.609748288989067, "lr_semantic": 5.709932729367744e-06, "lr_talker": 1.1419865458735488e-05, "elapsed_s": 12306.145041135955, "job_id": "2703623"} +{"step": 7080, "total_steps": 9874, "loss": 4.497936956584454, "lr_semantic": 5.66127903245389e-06, "lr_talker": 1.132255806490778e-05, "elapsed_s": 12369.542201354983, "job_id": "2703623"} +{"step": 7100, "total_steps": 9874, "loss": 4.568242460489273, "lr_semantic": 5.61286488194571e-06, "lr_talker": 1.122572976389142e-05, "elapsed_s": 12404.196848016989, "job_id": "2703623"} +{"step": 7120, "total_steps": 9874, "loss": 4.544745370745659, "lr_semantic": 5.564692450167958e-06, "lr_talker": 1.1129384900335916e-05, "elapsed_s": 12438.257855461969, "job_id": "2703623"} +{"step": 7140, "total_steps": 9874, "loss": 4.583464451134205, "lr_semantic": 5.5167638985995684e-06, "lr_talker": 1.1033527797199137e-05, "elapsed_s": 12469.13985338196, "job_id": "2703623"} +{"step": 7160, "total_steps": 9874, "loss": 4.506859876215458, "lr_semantic": 5.469081377776655e-06, "lr_talker": 1.093816275555331e-05, "elapsed_s": 12505.804391138954, "job_id": "2703623"} +{"step": 7180, "total_steps": 9874, "loss": 4.427923858165741, "lr_semantic": 5.42164702719603e-06, "lr_talker": 1.084329405439206e-05, "elapsed_s": 12536.70391967299, "job_id": "2703623"} +{"step": 7200, "total_steps": 9874, "loss": 4.47814979404211, "lr_semantic": 5.374462975219193e-06, "lr_talker": 1.0748925950438385e-05, "elapsed_s": 12563.260768896958, "job_id": "2703623"} +{"step": 7220, "total_steps": 9874, "loss": 4.578732870519161, "lr_semantic": 5.327531338976849e-06, "lr_talker": 1.0655062677953699e-05, "elapsed_s": 12599.846039189957, "job_id": "2703623"} +{"step": 7240, "total_steps": 9874, "loss": 4.537147909402847, "lr_semantic": 5.2808542242738945e-06, "lr_talker": 1.0561708448547789e-05, "elapsed_s": 12638.989007162978, "job_id": "2703623"} +{"step": 7260, "total_steps": 9874, "loss": 4.5610832795500755, "lr_semantic": 5.234433725494943e-06, "lr_talker": 1.0468867450989886e-05, "elapsed_s": 12671.270111883001, "job_id": "2703623"} +{"step": 7280, "total_steps": 9874, "loss": 4.526825703680515, "lr_semantic": 5.188271925510353e-06, "lr_talker": 1.0376543851020706e-05, "elapsed_s": 12703.854733298009, "job_id": "2703623"} +{"step": 7300, "total_steps": 9874, "loss": 4.523981973528862, "lr_semantic": 5.1423708955827545e-06, "lr_talker": 1.0284741791165509e-05, "elapsed_s": 12734.535114336002, "job_id": "2703623"} +{"step": 7320, "total_steps": 9874, "loss": 4.495600022375584, "lr_semantic": 5.096732695274136e-06, "lr_talker": 1.0193465390548272e-05, "elapsed_s": 12765.138779308007, "job_id": "2703623"} +{"step": 7340, "total_steps": 9874, "loss": 4.600359119474888, "lr_semantic": 5.051359372353406e-06, "lr_talker": 1.0102718744706812e-05, "elapsed_s": 12794.961481874983, "job_id": "2703623"} +{"step": 7360, "total_steps": 9874, "loss": 4.525373049080372, "lr_semantic": 5.0062529627045375e-06, "lr_talker": 1.0012505925409075e-05, "elapsed_s": 12826.358052086958, "job_id": "2703623"} +{"step": 7380, "total_steps": 9874, "loss": 4.482936963438988, "lr_semantic": 4.961415490235196e-06, "lr_talker": 9.922830980470392e-06, "elapsed_s": 12862.819861346972, "job_id": "2703623"} +{"step": 7400, "total_steps": 9874, "loss": 4.470216199755669, "lr_semantic": 4.916848966785939e-06, "lr_talker": 9.833697933571878e-06, "elapsed_s": 12895.468221424962, "job_id": "2703623"} +{"step": 7420, "total_steps": 9874, "loss": 4.49941086769104, "lr_semantic": 4.87255539203994e-06, "lr_talker": 9.74511078407988e-06, "elapsed_s": 12926.867889067973, "job_id": "2703623"} +{"step": 7440, "total_steps": 9874, "loss": 4.538976348936558, "lr_semantic": 4.828536753433277e-06, "lr_talker": 9.657073506866554e-06, "elapsed_s": 12958.585283682973, "job_id": "2703623"} +{"step": 7460, "total_steps": 9874, "loss": 4.54203287512064, "lr_semantic": 4.784795026065733e-06, "lr_talker": 9.569590052131466e-06, "elapsed_s": 12989.532427450991, "job_id": "2703623"} +{"step": 7480, "total_steps": 9874, "loss": 4.587422490119934, "lr_semantic": 4.741332172612202e-06, "lr_talker": 9.482664345224403e-06, "elapsed_s": 13018.731802891009, "job_id": "2703623"} +{"step": 7500, "total_steps": 9874, "loss": 4.540486395359039, "lr_semantic": 4.698150143234594e-06, "lr_talker": 9.396300286469187e-06, "elapsed_s": 13050.114765597973, "job_id": "2703623"} +{"step": 7520, "total_steps": 9874, "loss": 4.516219832003117, "lr_semantic": 4.655250875494365e-06, "lr_talker": 9.31050175098873e-06, "elapsed_s": 13089.82852820697, "job_id": "2703623"} +{"step": 7540, "total_steps": 9874, "loss": 4.522661201655865, "lr_semantic": 4.612636294265549e-06, "lr_talker": 9.225272588531099e-06, "elapsed_s": 13127.686855243985, "job_id": "2703623"} +{"step": 7560, "total_steps": 9874, "loss": 4.529911324381828, "lr_semantic": 4.570308311648411e-06, "lr_talker": 9.140616623296822e-06, "elapsed_s": 13163.825111568964, "job_id": "2703623"} +{"step": 7580, "total_steps": 9874, "loss": 4.447403997182846, "lr_semantic": 4.528268826883637e-06, "lr_talker": 9.056537653767274e-06, "elapsed_s": 13195.565631542006, "job_id": "2703623"} +{"step": 7600, "total_steps": 9874, "loss": 4.532619081437588, "lr_semantic": 4.486519726267133e-06, "lr_talker": 8.973039452534266e-06, "elapsed_s": 13229.27909361798, "job_id": "2703623"} +{"step": 7620, "total_steps": 9874, "loss": 4.565950401127338, "lr_semantic": 4.445062883065365e-06, "lr_talker": 8.89012576613073e-06, "elapsed_s": 13290.439419535978, "job_id": "2703623"} +{"step": 7640, "total_steps": 9874, "loss": 4.57135009765625, "lr_semantic": 4.40390015743133e-06, "lr_talker": 8.80780031486266e-06, "elapsed_s": 13323.265118851967, "job_id": "2703623"} +{"step": 7660, "total_steps": 9874, "loss": 4.525451220571995, "lr_semantic": 4.363033396321071e-06, "lr_talker": 8.726066792642142e-06, "elapsed_s": 13356.62311778299, "job_id": "2703623"} +{"step": 7680, "total_steps": 9874, "loss": 4.518702827394009, "lr_semantic": 4.322464433410821e-06, "lr_talker": 8.644928866821642e-06, "elapsed_s": 13392.003001933976, "job_id": "2703623"} +{"step": 7700, "total_steps": 9874, "loss": 4.529746413230896, "lr_semantic": 4.282195089014715e-06, "lr_talker": 8.56439017802943e-06, "elapsed_s": 13428.18441777298, "job_id": "2703623"} +{"step": 7720, "total_steps": 9874, "loss": 4.4203363955020905, "lr_semantic": 4.242227170003118e-06, "lr_talker": 8.484454340006236e-06, "elapsed_s": 13462.88391735201, "job_id": "2703623"} +{"step": 7740, "total_steps": 9874, "loss": 4.513318240642548, "lr_semantic": 4.2025624697215504e-06, "lr_talker": 8.405124939443101e-06, "elapsed_s": 13498.361246599, "job_id": "2703623"} +{"step": 7760, "total_steps": 9874, "loss": 4.498107828199863, "lr_semantic": 4.163202767910229e-06, "lr_talker": 8.326405535820458e-06, "elapsed_s": 13532.053873116965, "job_id": "2703623"} +{"step": 7780, "total_steps": 9874, "loss": 4.434320919215679, "lr_semantic": 4.1241498306241936e-06, "lr_talker": 8.248299661248387e-06, "elapsed_s": 13570.252825679956, "job_id": "2703623"} +{"step": 7800, "total_steps": 9874, "loss": 4.528625324368477, "lr_semantic": 4.0854054101540844e-06, "lr_talker": 8.170810820308169e-06, "elapsed_s": 13602.73211789399, "job_id": "2703623"} +{"step": 7820, "total_steps": 9874, "loss": 4.521978996694088, "lr_semantic": 4.0469712449474985e-06, "lr_talker": 8.093942489894997e-06, "elapsed_s": 13635.613571429974, "job_id": "2703623"} +{"step": 7840, "total_steps": 9874, "loss": 4.5520519614219666, "lr_semantic": 4.008849059531002e-06, "lr_talker": 8.017698119062004e-06, "elapsed_s": 13667.807696101954, "job_id": "2703623"} +{"step": 7860, "total_steps": 9874, "loss": 4.570232763886452, "lr_semantic": 3.971040564432751e-06, "lr_talker": 7.942081128865502e-06, "elapsed_s": 13698.41899335396, "job_id": "2703623"} +{"step": 7880, "total_steps": 9874, "loss": 4.494897469878197, "lr_semantic": 3.933547456105716e-06, "lr_talker": 7.867094912211433e-06, "elapsed_s": 13729.59901981696, "job_id": "2703623"} +{"step": 7900, "total_steps": 9874, "loss": 4.585391521453857, "lr_semantic": 3.8963714168515995e-06, "lr_talker": 7.792742833703199e-06, "elapsed_s": 13763.806877658993, "job_id": "2703623"} +{"step": 7920, "total_steps": 9874, "loss": 4.500751651823521, "lr_semantic": 3.859514114745324e-06, "lr_talker": 7.719028229490648e-06, "elapsed_s": 13797.825898011972, "job_id": "2703623"} +{"step": 7940, "total_steps": 9874, "loss": 4.529611684381962, "lr_semantic": 3.822977203560202e-06, "lr_talker": 7.645954407120404e-06, "elapsed_s": 13830.325321531971, "job_id": "2703623"} +{"step": 7960, "total_steps": 9874, "loss": 4.552826717495918, "lr_semantic": 3.786762322693719e-06, "lr_talker": 7.573524645387438e-06, "elapsed_s": 13866.809210346953, "job_id": "2703623"} +{"step": 7980, "total_steps": 9874, "loss": 4.529464475810528, "lr_semantic": 3.7508710970939877e-06, "lr_talker": 7.501742194187975e-06, "elapsed_s": 13901.162691446953, "job_id": "2703623"} +{"step": 8000, "total_steps": 9874, "loss": 4.5376316010952, "lr_semantic": 3.7153051371868243e-06, "lr_talker": 7.4306102743736485e-06, "elapsed_s": 13944.332991684962, "job_id": "2703623"} +{"step": 8020, "total_steps": 9874, "loss": 4.462117932736874, "lr_semantic": 3.6800660388035047e-06, "lr_talker": 7.3601320776070095e-06, "elapsed_s": 13979.726065105991, "job_id": "2703623"} +{"step": 8040, "total_steps": 9874, "loss": 4.463959664106369, "lr_semantic": 3.645155383109135e-06, "lr_talker": 7.29031076621827e-06, "elapsed_s": 14011.470495985006, "job_id": "2703623"} +{"step": 8060, "total_steps": 9874, "loss": 4.465560793876648, "lr_semantic": 3.6105747365317377e-06, "lr_talker": 7.221149473063475e-06, "elapsed_s": 14045.446076197957, "job_id": "2703623"} +{"step": 8080, "total_steps": 9874, "loss": 4.56742138415575, "lr_semantic": 3.5763256506919396e-06, "lr_talker": 7.152651301383879e-06, "elapsed_s": 14075.397293142974, "job_id": "2703623"} +{"step": 8100, "total_steps": 9874, "loss": 4.518531173467636, "lr_semantic": 3.5424096623333704e-06, "lr_talker": 7.084819324666741e-06, "elapsed_s": 14118.208870990959, "job_id": "2703623"} +{"step": 8120, "total_steps": 9874, "loss": 4.5665911585092545, "lr_semantic": 3.50882829325369e-06, "lr_talker": 7.01765658650738e-06, "elapsed_s": 14151.814458256005, "job_id": "2703623"} +{"step": 8140, "total_steps": 9874, "loss": 4.489422924816608, "lr_semantic": 3.4755830502363264e-06, "lr_talker": 6.951166100472653e-06, "elapsed_s": 14208.919505613972, "job_id": "2703623"} +{"step": 8160, "total_steps": 9874, "loss": 4.4851968958973885, "lr_semantic": 3.44267542498285e-06, "lr_talker": 6.8853508499657e-06, "elapsed_s": 14244.621985200967, "job_id": "2703623"} +{"step": 8180, "total_steps": 9874, "loss": 4.510252356529236, "lr_semantic": 3.410106894046061e-06, "lr_talker": 6.820213788092122e-06, "elapsed_s": 14277.687046029954, "job_id": "2703623"} +{"step": 8200, "total_steps": 9874, "loss": 4.575431205332279, "lr_semantic": 3.377878918763704e-06, "lr_talker": 6.755757837527408e-06, "elapsed_s": 14311.137270957988, "job_id": "2703623"} +{"step": 8220, "total_steps": 9874, "loss": 4.54214321821928, "lr_semantic": 3.3459929451929405e-06, "lr_talker": 6.691985890385881e-06, "elapsed_s": 14344.605843884987, "job_id": "2703623"} +{"step": 8240, "total_steps": 9874, "loss": 4.52134995162487, "lr_semantic": 3.3144504040454305e-06, "lr_talker": 6.628900808090861e-06, "elapsed_s": 14380.820716432994, "job_id": "2703623"} +{"step": 8260, "total_steps": 9874, "loss": 4.491525426506996, "lr_semantic": 3.283252710623158e-06, "lr_talker": 6.566505421246316e-06, "elapsed_s": 14415.45915382501, "job_id": "2703623"} +{"step": 8280, "total_steps": 9874, "loss": 4.5118516981601715, "lr_semantic": 3.252401264754911e-06, "lr_talker": 6.504802529509822e-06, "elapsed_s": 14450.972129801987, "job_id": "2703623"} +{"step": 8300, "total_steps": 9874, "loss": 4.588952496647835, "lr_semantic": 3.2218974507334876e-06, "lr_talker": 6.443794901466975e-06, "elapsed_s": 14482.779463160958, "job_id": "2703623"} +{"step": 8320, "total_steps": 9874, "loss": 4.457293875515461, "lr_semantic": 3.1917426372535697e-06, "lr_talker": 6.3834852745071395e-06, "elapsed_s": 14516.928433605004, "job_id": "2703623"} +{"step": 8340, "total_steps": 9874, "loss": 4.529279626905918, "lr_semantic": 3.1619381773503206e-06, "lr_talker": 6.323876354700641e-06, "elapsed_s": 14549.262550298008, "job_id": "2703623"} +{"step": 8360, "total_steps": 9874, "loss": 4.509732864797115, "lr_semantic": 3.132485408338665e-06, "lr_talker": 6.26497081667733e-06, "elapsed_s": 14583.375381462974, "job_id": "2703623"} +{"step": 8380, "total_steps": 9874, "loss": 4.504118770360947, "lr_semantic": 3.103385651753294e-06, "lr_talker": 6.206771303506588e-06, "elapsed_s": 14616.991526024009, "job_id": "2703623"} +{"step": 8400, "total_steps": 9874, "loss": 4.603205308318138, "lr_semantic": 3.074640213289358e-06, "lr_talker": 6.149280426578716e-06, "elapsed_s": 14646.852613847004, "job_id": "2703623"} +{"step": 8420, "total_steps": 9874, "loss": 4.522870913147926, "lr_semantic": 3.0462503827438954e-06, "lr_talker": 6.092500765487791e-06, "elapsed_s": 14678.26301262097, "job_id": "2703623"} +{"step": 8440, "total_steps": 9874, "loss": 4.492100074887276, "lr_semantic": 3.0182174339579407e-06, "lr_talker": 6.036434867915881e-06, "elapsed_s": 14712.760868543002, "job_id": "2703623"} +{"step": 8460, "total_steps": 9874, "loss": 4.488504283130169, "lr_semantic": 2.9905426247593837e-06, "lr_talker": 5.981085249518767e-06, "elapsed_s": 14748.370112192002, "job_id": "2703623"} +{"step": 8480, "total_steps": 9874, "loss": 4.502635575830936, "lr_semantic": 2.963227196906525e-06, "lr_talker": 5.92645439381305e-06, "elapsed_s": 14779.54057829798, "job_id": "2703623"} +{"step": 8500, "total_steps": 9874, "loss": 4.4893273785710335, "lr_semantic": 2.9362723760323595e-06, "lr_talker": 5.872544752064719e-06, "elapsed_s": 14812.69860622898, "job_id": "2703623"} +{"step": 8520, "total_steps": 9874, "loss": 4.536678202450275, "lr_semantic": 2.9096793715895786e-06, "lr_talker": 5.819358743179157e-06, "elapsed_s": 14845.609284603968, "job_id": "2703623"} +{"step": 8540, "total_steps": 9874, "loss": 4.477013513445854, "lr_semantic": 2.8834493767963077e-06, "lr_talker": 5.766898753592615e-06, "elapsed_s": 14878.2781388, "job_id": "2703623"} +{"step": 8560, "total_steps": 9874, "loss": 4.483303435146809, "lr_semantic": 2.8575835685825703e-06, "lr_talker": 5.7151671371651406e-06, "elapsed_s": 14911.376808709, "job_id": "2703623"} +{"step": 8580, "total_steps": 9874, "loss": 4.556936398148537, "lr_semantic": 2.832083107537466e-06, "lr_talker": 5.664166215074932e-06, "elapsed_s": 14944.176419747993, "job_id": "2703623"} +{"step": 8600, "total_steps": 9874, "loss": 4.52258612960577, "lr_semantic": 2.806949137857115e-06, "lr_talker": 5.61389827571423e-06, "elapsed_s": 14976.291702188959, "job_id": "2703623"} +{"step": 8620, "total_steps": 9874, "loss": 4.455592826008797, "lr_semantic": 2.782182787293297e-06, "lr_talker": 5.564365574586594e-06, "elapsed_s": 15005.794097773964, "job_id": "2703623"} +{"step": 8640, "total_steps": 9874, "loss": 4.560708500444889, "lr_semantic": 2.7577851671028672e-06, "lr_talker": 5.5155703342057345e-06, "elapsed_s": 15036.828757053008, "job_id": "2703623"} +{"step": 8660, "total_steps": 9874, "loss": 4.596014402806759, "lr_semantic": 2.733757371997883e-06, "lr_talker": 5.467514743995766e-06, "elapsed_s": 15067.873156688001, "job_id": "2703623"} +{"step": 8680, "total_steps": 9874, "loss": 4.47866627573967, "lr_semantic": 2.7101004800964925e-06, "lr_talker": 5.420200960192985e-06, "elapsed_s": 15096.609950557002, "job_id": "2703623"} +{"step": 8700, "total_steps": 9874, "loss": 4.429302409291267, "lr_semantic": 2.6868155528745526e-06, "lr_talker": 5.373631105749105e-06, "elapsed_s": 15157.76312936499, "job_id": "2703623"} +{"step": 8720, "total_steps": 9874, "loss": 4.585752338171005, "lr_semantic": 2.663903635118009e-06, "lr_talker": 5.327807270236018e-06, "elapsed_s": 15188.428392909991, "job_id": "2703623"} +{"step": 8740, "total_steps": 9874, "loss": 4.577820248901844, "lr_semantic": 2.6413657548760064e-06, "lr_talker": 5.282731509752013e-06, "elapsed_s": 15224.789917054994, "job_id": "2703623"} +{"step": 8760, "total_steps": 9874, "loss": 4.5182793363928795, "lr_semantic": 2.6192029234147755e-06, "lr_talker": 5.238405846829551e-06, "elapsed_s": 15258.49839236599, "job_id": "2703623"} +{"step": 8780, "total_steps": 9874, "loss": 4.52050307393074, "lr_semantic": 2.5974161351722404e-06, "lr_talker": 5.194832270344481e-06, "elapsed_s": 15290.747554856003, "job_id": "2703623"} +{"step": 8800, "total_steps": 9874, "loss": 4.441662758588791, "lr_semantic": 2.5760063677134134e-06, "lr_talker": 5.152012735426827e-06, "elapsed_s": 15322.186533964996, "job_id": "2703623"} +{"step": 8820, "total_steps": 9874, "loss": 4.516283571720123, "lr_semantic": 2.5549745816865224e-06, "lr_talker": 5.109949163373045e-06, "elapsed_s": 15353.953403448977, "job_id": "2703623"} +{"step": 8840, "total_steps": 9874, "loss": 4.485696963965893, "lr_semantic": 2.5343217207799103e-06, "lr_talker": 5.068643441559821e-06, "elapsed_s": 15387.389037162007, "job_id": "2703623"} +{"step": 8860, "total_steps": 9874, "loss": 4.546103723347187, "lr_semantic": 2.5140487116796925e-06, "lr_talker": 5.028097423359385e-06, "elapsed_s": 15420.297840407991, "job_id": "2703623"} +{"step": 8880, "total_steps": 9874, "loss": 4.584399312734604, "lr_semantic": 2.494156464028179e-06, "lr_talker": 4.988312928056358e-06, "elapsed_s": 15456.275438935962, "job_id": "2703623"} +{"step": 8900, "total_steps": 9874, "loss": 4.538691580295563, "lr_semantic": 2.474645870383052e-06, "lr_talker": 4.949291740766104e-06, "elapsed_s": 15490.667217471986, "job_id": "2703623"} +{"step": 8920, "total_steps": 9874, "loss": 4.545777395367622, "lr_semantic": 2.4555178061773264e-06, "lr_talker": 4.911035612354653e-06, "elapsed_s": 15522.670931804983, "job_id": "2703623"} +{"step": 8940, "total_steps": 9874, "loss": 4.434058375656605, "lr_semantic": 2.4367731296800603e-06, "lr_talker": 4.8735462593601205e-06, "elapsed_s": 15553.119010697992, "job_id": "2703623"} +{"step": 8960, "total_steps": 9874, "loss": 4.543536618351936, "lr_semantic": 2.4184126819578542e-06, "lr_talker": 4.8368253639157085e-06, "elapsed_s": 15588.631871931953, "job_id": "2703623"} +{"step": 8980, "total_steps": 9874, "loss": 4.504559025168419, "lr_semantic": 2.4004372868371035e-06, "lr_talker": 4.800874573674207e-06, "elapsed_s": 15624.482332932006, "job_id": "2703623"} +{"step": 9000, "total_steps": 9874, "loss": 4.49115189909935, "lr_semantic": 2.3828477508670387e-06, "lr_talker": 4.765695501734077e-06, "elapsed_s": 15656.821687139978, "job_id": "2703623"} +{"step": 9020, "total_steps": 9874, "loss": 4.523553982377052, "lr_semantic": 2.3656448632835354e-06, "lr_talker": 4.731289726567071e-06, "elapsed_s": 15689.925169920956, "job_id": "2703623"} +{"step": 9040, "total_steps": 9874, "loss": 4.51315825432539, "lr_semantic": 2.3488293959737036e-06, "lr_talker": 4.697658791947407e-06, "elapsed_s": 15725.18686522299, "job_id": "2703623"} +{"step": 9060, "total_steps": 9874, "loss": 4.510613173246384, "lr_semantic": 2.3324021034412457e-06, "lr_talker": 4.6648042068824915e-06, "elapsed_s": 15761.047555189987, "job_id": "2703623"} +{"step": 9080, "total_steps": 9874, "loss": 4.463653564453125, "lr_semantic": 2.3163637227726146e-06, "lr_talker": 4.632727445545229e-06, "elapsed_s": 15794.497611736995, "job_id": "2703623"} +{"step": 9100, "total_steps": 9874, "loss": 4.610269144177437, "lr_semantic": 2.3007149736039284e-06, "lr_talker": 4.601429947207857e-06, "elapsed_s": 15831.02346745797, "job_id": "2703623"} +{"step": 9120, "total_steps": 9874, "loss": 4.54105906188488, "lr_semantic": 2.285456558088688e-06, "lr_talker": 4.570913116177376e-06, "elapsed_s": 15864.527305705997, "job_id": "2703623"} +{"step": 9140, "total_steps": 9874, "loss": 4.567582339048386, "lr_semantic": 2.27058916086627e-06, "lr_talker": 4.54117832173254e-06, "elapsed_s": 15899.714821907983, "job_id": "2703623"} +{"step": 9160, "total_steps": 9874, "loss": 4.549469627439976, "lr_semantic": 2.256113449031205e-06, "lr_talker": 4.51222689806241e-06, "elapsed_s": 15930.319989567972, "job_id": "2703623"} +{"step": 9180, "total_steps": 9874, "loss": 4.598721578717232, "lr_semantic": 2.2420300721032505e-06, "lr_talker": 4.484060144206501e-06, "elapsed_s": 15963.475418991991, "job_id": "2703623"} +{"step": 9200, "total_steps": 9874, "loss": 4.564673639833927, "lr_semantic": 2.2283396619982407e-06, "lr_talker": 4.456679323996481e-06, "elapsed_s": 15997.226609550009, "job_id": "2703623"} +{"step": 9220, "total_steps": 9874, "loss": 4.492254808545113, "lr_semantic": 2.215042832999741e-06, "lr_talker": 4.430085665999482e-06, "elapsed_s": 16059.245334306965, "job_id": "2703623"} +{"step": 9240, "total_steps": 9874, "loss": 4.495618209242821, "lr_semantic": 2.2021401817314727e-06, "lr_talker": 4.404280363462945e-06, "elapsed_s": 16094.256167515996, "job_id": "2703623"} +{"step": 9260, "total_steps": 9874, "loss": 4.499917723238468, "lr_semantic": 2.1896322871305588e-06, "lr_talker": 4.3792645742611176e-06, "elapsed_s": 16127.271471102955, "job_id": "2703623"} +{"step": 9280, "total_steps": 9874, "loss": 4.457299061119556, "lr_semantic": 2.177519710421531e-06, "lr_talker": 4.355039420843062e-06, "elapsed_s": 16159.156053671963, "job_id": "2703623"} +{"step": 9300, "total_steps": 9874, "loss": 4.455955170094967, "lr_semantic": 2.165802995091161e-06, "lr_talker": 4.331605990182322e-06, "elapsed_s": 16192.21832253196, "job_id": "2703623"} +{"step": 9320, "total_steps": 9874, "loss": 4.488907136023045, "lr_semantic": 2.1544826668640667e-06, "lr_talker": 4.308965333728133e-06, "elapsed_s": 16222.724887799995, "job_id": "2703623"} +{"step": 9340, "total_steps": 9874, "loss": 4.548022724688053, "lr_semantic": 2.143559233679127e-06, "lr_talker": 4.287118467358254e-06, "elapsed_s": 16254.684207654966, "job_id": "2703623"} +{"step": 9360, "total_steps": 9874, "loss": 4.499589636921883, "lr_semantic": 2.133033185666687e-06, "lr_talker": 4.266066371333374e-06, "elapsed_s": 16289.308819128957, "job_id": "2703623"} +{"step": 9380, "total_steps": 9874, "loss": 4.468261286616325, "lr_semantic": 2.1229049951265705e-06, "lr_talker": 4.245809990253141e-06, "elapsed_s": 16322.550758046971, "job_id": "2703623"} +{"step": 9400, "total_steps": 9874, "loss": 4.486991614103317, "lr_semantic": 2.1131751165068835e-06, "lr_talker": 4.226350233013767e-06, "elapsed_s": 16358.877900788968, "job_id": "2703623"} +{"step": 9420, "total_steps": 9874, "loss": 4.499807879328728, "lr_semantic": 2.1038439863836295e-06, "lr_talker": 4.207687972767259e-06, "elapsed_s": 16389.49961049296, "job_id": "2703623"} +{"step": 9440, "total_steps": 9874, "loss": 4.51286855340004, "lr_semantic": 2.0949120234411133e-06, "lr_talker": 4.189824046882227e-06, "elapsed_s": 16424.976301774965, "job_id": "2703623"} +{"step": 9460, "total_steps": 9874, "loss": 4.473292410373688, "lr_semantic": 2.0863796284531574e-06, "lr_talker": 4.172759256906315e-06, "elapsed_s": 16467.03570223099, "job_id": "2703623"} +{"step": 9480, "total_steps": 9874, "loss": 4.506333887577057, "lr_semantic": 2.078247184265123e-06, "lr_talker": 4.156494368530246e-06, "elapsed_s": 16498.01697090501, "job_id": "2703623"} +{"step": 9500, "total_steps": 9874, "loss": 4.537896536290646, "lr_semantic": 2.0705150557767296e-06, "lr_talker": 4.141030111553459e-06, "elapsed_s": 16532.808489143965, "job_id": "2703623"} +{"step": 9520, "total_steps": 9874, "loss": 4.5036904364824295, "lr_semantic": 2.063183589925677e-06, "lr_talker": 4.126367179851354e-06, "elapsed_s": 16571.320514652005, "job_id": "2703623"} +{"step": 9540, "total_steps": 9874, "loss": 4.489691235125065, "lr_semantic": 2.0562531156720876e-06, "lr_talker": 4.112506231344175e-06, "elapsed_s": 16609.179590566957, "job_id": "2703623"} +{"step": 9560, "total_steps": 9874, "loss": 4.558713003993034, "lr_semantic": 2.0497239439837387e-06, "lr_talker": 4.0994478879674775e-06, "elapsed_s": 16645.961823649006, "job_id": "2703623"} +{"step": 9580, "total_steps": 9874, "loss": 4.496314354240894, "lr_semantic": 2.043596367822114e-06, "lr_talker": 4.087192735644228e-06, "elapsed_s": 16681.873650367954, "job_id": "2703623"} +{"step": 9600, "total_steps": 9874, "loss": 4.542782753705978, "lr_semantic": 2.037870662129254e-06, "lr_talker": 4.075741324258508e-06, "elapsed_s": 16716.345859601977, "job_id": "2703623"} +{"step": 9620, "total_steps": 9874, "loss": 4.537307992577553, "lr_semantic": 2.032547083815425e-06, "lr_talker": 4.06509416763085e-06, "elapsed_s": 16751.604614843964, "job_id": "2703623"} +{"step": 9640, "total_steps": 9874, "loss": 4.522862426936626, "lr_semantic": 2.0276258717475864e-06, "lr_talker": 4.055251743495173e-06, "elapsed_s": 16786.03747781698, "job_id": "2703623"} +{"step": 9660, "total_steps": 9874, "loss": 4.573877900838852, "lr_semantic": 2.023107246738677e-06, "lr_talker": 4.046214493477354e-06, "elapsed_s": 16818.70723086997, "job_id": "2703623"} +{"step": 9680, "total_steps": 9874, "loss": 4.440236069262028, "lr_semantic": 2.0189914115377045e-06, "lr_talker": 4.037982823075409e-06, "elapsed_s": 16852.664388242003, "job_id": "2703623"} +{"step": 9700, "total_steps": 9874, "loss": 4.488757848739624, "lr_semantic": 2.015278550820649e-06, "lr_talker": 4.030557101641298e-06, "elapsed_s": 16887.82490045397, "job_id": "2703623"} +{"step": 9720, "total_steps": 9874, "loss": 4.5881467163562775, "lr_semantic": 2.0119688311821782e-06, "lr_talker": 4.0239376623643565e-06, "elapsed_s": 16924.12795116997, "job_id": "2703623"} +{"step": 9740, "total_steps": 9874, "loss": 4.541604205965996, "lr_semantic": 2.009062401128169e-06, "lr_talker": 4.018124802256338e-06, "elapsed_s": 16984.64820935001, "job_id": "2703623"} +{"step": 9760, "total_steps": 9874, "loss": 4.570071205496788, "lr_semantic": 2.0065593910690456e-06, "lr_talker": 4.013118782138091e-06, "elapsed_s": 17025.151237008977, "job_id": "2703623"} +{"step": 9780, "total_steps": 9874, "loss": 4.476109750568867, "lr_semantic": 2.0044599133139322e-06, "lr_talker": 4.0089198266278644e-06, "elapsed_s": 17060.682778491, "job_id": "2703623"} +{"step": 9800, "total_steps": 9874, "loss": 4.441690035164356, "lr_semantic": 2.0027640620656065e-06, "lr_talker": 4.005528124131213e-06, "elapsed_s": 17096.21630242397, "job_id": "2703623"} +{"step": 9820, "total_steps": 9874, "loss": 4.558247834444046, "lr_semantic": 2.0014719134162763e-06, "lr_talker": 4.002943826832553e-06, "elapsed_s": 17127.70886742696, "job_id": "2703623"} +{"step": 9840, "total_steps": 9874, "loss": 4.54509861767292, "lr_semantic": 2.000583525344168e-06, "lr_talker": 4.001167050688336e-06, "elapsed_s": 17161.297054647992, "job_id": "2703623"} +{"step": 9860, "total_steps": 9874, "loss": 4.518145240843296, "lr_semantic": 2.0000989377109202e-06, "lr_talker": 4.0001978754218405e-06, "elapsed_s": 17194.02487629099, "job_id": "2703623"} +{"step": 9874, "total_steps": 9874, "loss": 4.589438199996948, "lr_semantic": 2.0000000000000003e-06, "lr_talker": 4.000000000000001e-06, "elapsed_s": 17215.719475851976, "job_id": "2703623"} diff --git a/stats/training_summary.json b/stats/training_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..591e2b1bbd981063be73b3c9d87528be21356440 --- /dev/null +++ b/stats/training_summary.json @@ -0,0 +1,163 @@ +{ + "world": 32, + "effective_batch": 32, + "seed": 20261104, + "peak_semantic": 2e-05, + "peak_talker": 4e-05, + "warmup_fraction": 0.05, + "cosine_floor": 0.1, + "total_steps": 9874, + "distribution": "FSDP1 root FULL_SHARD, original FP32 optimizer parameters, BF16 compute, FP32 reduction, full CPU checkpoint", + "optimizer_rng_scheduler_sampler_saved": true, + "parent": "laion/Humaneness-Voice-Large-1.7", + "epochs": 2, + "podcast_fraction_by_presentations": 0.8, + "acting_replay_fraction_by_presentations": 0.2, + "actual_presentations": 315932, + "target_vq_channels": 12, + "target_frame_seconds": 0.08, + "context_max_seconds": 60, + "model_selection": "Final development loss was the lowest observed; not a test-set listening optimum", + "training_data_by_language_and_family": [ + { + "family": "acting", + "language": "de", + "split": "train", + "examples": 6319, + "token_audio_hours": 43.52608888888889 + }, + { + "family": "acting", + "language": "de", + "split": "validation", + "examples": 10, + "token_audio_hours": 0.07624444444444445 + }, + { + "family": "acting", + "language": "en", + "split": "train", + "examples": 6319, + "token_audio_hours": 58.49395555555555 + }, + { + "family": "acting", + "language": "en", + "split": "validation", + "examples": 10, + "token_audio_hours": 0.0839111111111111 + }, + { + "family": "acting", + "language": "es", + "split": "train", + "examples": 6318, + "token_audio_hours": 45.68806666666667 + }, + { + "family": "acting", + "language": "es", + "split": "validation", + "examples": 10, + "token_audio_hours": 0.0684 + }, + { + "family": "acting", + "language": "fr", + "split": "train", + "examples": 6319, + "token_audio_hours": 40.54782222222222 + }, + { + "family": "acting", + "language": "fr", + "split": "validation", + "examples": 10, + "token_audio_hours": 0.05217777777777778 + }, + { + "family": "acting", + "language": "nl", + "split": "train", + "examples": 6318, + "token_audio_hours": 41.62968888888889 + }, + { + "family": "acting", + "language": "nl", + "split": "validation", + "examples": 10, + "token_audio_hours": 0.07068888888888888 + }, + { + "family": "podcast", + "language": "de", + "split": "train", + "examples": 27796, + "token_audio_hours": 393.7887333333333 + }, + { + "family": "podcast", + "language": "de", + "split": "validation", + "examples": 250, + "token_audio_hours": 3.5477777777777777 + }, + { + "family": "podcast", + "language": "en", + "split": "train", + "examples": 24048, + "token_audio_hours": 328.7555777777778 + }, + { + "family": "podcast", + "language": "en", + "split": "validation", + "examples": 234, + "token_audio_hours": 3.225222222222222 + }, + { + "family": "podcast", + "language": "es", + "split": "train", + "examples": 20550, + "token_audio_hours": 292.01882222222224 + }, + { + "family": "podcast", + "language": "es", + "split": "validation", + "examples": 270, + "token_audio_hours": 3.835711111111111 + }, + { + "family": "podcast", + "language": "fr", + "split": "train", + "examples": 26313, + "token_audio_hours": 366.3128666666667 + }, + { + "family": "podcast", + "language": "fr", + "split": "validation", + "examples": 383, + "token_audio_hours": 5.3415333333333335 + }, + { + "family": "podcast", + "language": "nl", + "split": "train", + "examples": 27666, + "token_audio_hours": 392.8012 + }, + { + "family": "podcast", + "language": "nl", + "split": "validation", + "examples": 270, + "token_audio_hours": 3.846311111111111 + } + ] +} \ No newline at end of file diff --git a/stats/validation.jsonl b/stats/validation.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..2807ba15b9bda2ca74abdf4bfdcd0e648fbd7b72 --- /dev/null +++ b/stats/validation.jsonl @@ -0,0 +1,21 @@ +{"step": 0, "mean_loss": 4.574524743556976, "cases": 100, "time": 1794004857.5824149} +{"step": 542, "mean_loss": 4.5363764309883114, "cases": 100, "time": 1794005755.4551055} +{"step": 1066, "mean_loss": 4.538257956504822, "cases": 100, "time": 1794006682.3393204} +{"step": 1582, "mean_loss": 4.534448547363281, "cases": 100, "time": 1794007609.2825744} +{"step": 2124, "mean_loss": 4.5311745524406435, "cases": 100, "time": 1794008556.7442017} +{"step": 2666, "mean_loss": 4.524555835723877, "cases": 100, "time": 1794009482.8472135} +{"step": 3201, "mean_loss": 4.519700508117676, "cases": 100, "time": 1794010409.9429889} +{"step": 3725, "mean_loss": 4.512256886959076, "cases": 100, "time": 1794011337.6237242} +{"step": 4264, "mean_loss": 4.507813637256622, "cases": 100, "time": 1794012264.4164124} +{"step": 4787, "mean_loss": 4.501246919631958, "cases": 100, "time": 1794013191.2884393} +{"step": 4937, "mean_loss": 4.499847033023834, "cases": 100, "time": 1794013464.406191} +{"step": 5477, "mean_loss": 4.496968615055084, "cases": 100, "time": 1794014391.7967277} +{"step": 6005, "mean_loss": 4.4916208195686345, "cases": 100, "time": 1794015319.9797502} +{"step": 6530, "mean_loss": 4.485584745407104, "cases": 100, "time": 1794016246.7834506} +{"step": 7067, "mean_loss": 4.481103963851929, "cases": 100, "time": 1794017174.083834} +{"step": 7609, "mean_loss": 4.475455455780029, "cases": 100, "time": 1794018100.9076042} +{"step": 8134, "mean_loss": 4.472370355129242, "cases": 100, "time": 1794019027.5362873} +{"step": 8681, "mean_loss": 4.4697715234756465, "cases": 100, "time": 1794019954.2473042} +{"step": 9217, "mean_loss": 4.466816163063049, "cases": 100, "time": 1794020881.7597194} +{"step": 9738, "mean_loss": 4.465842065811157, "cases": 100, "time": 1794021809.3897882} +{"step": 9874, "mean_loss": 4.465300669670105, "cases": 100, "time": 1794022070.7289238} diff --git a/tests/test_model_contracts.py b/tests/test_model_contracts.py new file mode 100644 index 0000000000000000000000000000000000000000..26e08497150b12ce4743195073272c948c47b8e7 --- /dev/null +++ b/tests/test_model_contracts.py @@ -0,0 +1,81 @@ +"""Tiny CPU-only fakes exercise routing/packing without any large-model forward.""" +import unittest,sys,types,warnings +from pathlib import Path +from unittest.mock import patch +sys.path.insert(0,str(Path(__file__).resolve().parents[1]));sys.path.insert(0,str(Path(__file__).resolve().parents[1]/'training')) +import torch,numpy as np +from torch import nn +from podcast.engine import native_batch +from training.train import pack,single_example +class Proc: + def __init__(self):self.tokens=None + def build_user_message(self,**kw): + self.tokens=kw['tokens'] + return {'role':'user','content':'- Reference(s):\nNone\n'+kw['instruction'],'text':kw['text'],'audio_codes_list':[]} + def __call__(self,messages,mode,**kwargs): + B=len(messages);ids=torch.zeros(B,8,13,dtype=torch.long) + for i,m in enumerate(messages):ids[i,-1,0]=m[0].get('number',9) + mask=torch.ones(B,8,dtype=torch.long) + if B>1:mask[1,:3]=0 + return {'input_ids':ids,'attention_mask':mask} +class Head(nn.Module): + def forward(self,h): + index=(h[:,0].abs().long()%1000)+1;logits=torch.full((len(h),1024),-1000.) + logits[torch.arange(len(h)),index]=1000.;return logits +class Stop(nn.Module): + def forward(self,h):return torch.tensor([[1000.,-1000.]]).repeat(len(h),1) +class Echo(nn.Module): + def forward(self,**kwargs):return types.SimpleNamespace(last_hidden_state=kwargs['inputs_embeds'],past_key_values=None) +class Fake(nn.Module): + def __init__(self): + super().__init__();self.dummy=nn.Parameter(torch.ones(1),requires_grad=False) + self.config=types.SimpleNamespace(n_vq=12,audio_assistant_slot_token_id=11,audio_end_token_id=12,audio_pad_token_id=1024,pad_token_id=0) + self.local_transformer=types.SimpleNamespace(ln_f=types.SimpleNamespace(weight=torch.ones(1))) + self.transformer=Echo();self.local_text_lm_head=Stop();self.audio_lm_heads=nn.ModuleList([Head() for _ in range(12)]);self.audio_embeddings=nn.ModuleList([nn.Embedding(1024,1) for _ in range(12)]) + def _filter_logits(self,x,**kw):return x + def _build_inputs_embeds(self,x):return x[:,:,:1].float() + def _global_hidden_to_local(self,h):return h + def _decode_local_hidden_states_with_cache(self,x,**kw):return x,None + def _use_binary_local_text_head(self):return True + def _local_text_candidate_ids(self,dev):return torch.tensor([11,12],device=dev) + def _build_generation_row(self,batch_size,device,audio_token_ids): + row=torch.zeros(batch_size,1,13,dtype=torch.long,device=device);row[:,0,0]=11;row[:,0,1:]=audio_token_ids;return row +class ModelContracts(unittest.TestCase): + def test_different_prompts_not_repeated_first_prompt(self): + model=Fake();p=Proc();cond=[{'number':100},{'number':200}] + with patch('torch.cuda.synchronize'),warnings.catch_warnings(): + warnings.simplefilter('ignore');codes,proof=native_batch(model,p,cond,cond,[1,2],2.5,2) + self.assertEqual([c.shape for c in codes],[torch.Size([2,12])]*2) + self.assertNotEqual(int(codes[0][0,0]),int(codes[1][0,0]));self.assertEqual(proof['frame_caps'],[True,True]) + def test_cfg_one_uses_conditional_only(self): + model=Fake();p=Proc() + with patch('torch.cuda.synchronize'),warnings.catch_warnings(): + warnings.simplefilter('ignore');codes,_=native_batch(model,p,[{'number':99}],[{'number':20}],[1],1.,1) + self.assertEqual(int(codes[0][0,0]),100) + def test_target_only_twelve_book_mask_and_actual_frame_request(self): + p=Proc();config=Fake().config + target=np.arange(60,dtype=np.uint16).reshape(5,12) + record={'language':'en','mode':'pairs','turns':[{'speaker':'S1','text':'Hello world.','seconds':2},{'speaker':'S2','text':'Good day.','seconds':2}]} + out=pack(p,config,record,{'target':target,'S1':np.zeros((63,12),np.uint16),'S2':np.ones((63,12),np.uint16)}) + labels=out['labels'][0] + self.assertEqual(p.tokens,5);self.assertEqual(int((labels[:,1:]>=0).sum()),60) + self.assertTrue(bool((labels[:7]==-100).all()));self.assertEqual(int(labels[:,0].eq(12).sum()),1) + def test_float_codec_values_rejected(self): + with self.assertRaises(ValueError):pack(Proc(),Fake().config,{'turns':[]}, {'target':np.ones((5,12),np.float32)}) + + def test_training_loader_shards_without_an_extra_tensor_dimension(self): + from torch.utils.data import DataLoader + from accelerate.data_loader import BatchSamplerShard + data=[{'input_ids':torch.full((1,3,13),i,dtype=torch.long)} for i in range(8)] + original=DataLoader(data,batch_size=1,collate_fn=single_example,shuffle=False) + parts=[] + for rank in range(2): + sampler=BatchSamplerShard(original.batch_sampler,num_processes=2,process_index=rank,split_batches=False) + loader=DataLoader(data,batch_sampler=sampler,collate_fn=single_example) + values=[] + for item in loader: + self.assertEqual(item['input_ids'].shape,(1,3,13));values.append(int(item['input_ids'][0,0,0])) + parts.append(values) + self.assertEqual(set(parts[0])|set(parts[1]),set(range(8)));self.assertFalse(set(parts[0])&set(parts[1])) + +if __name__=='__main__':unittest.main() diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..9cbc063c742b2f46365118080b9b5feff88b9105 --- /dev/null +++ b/tests/test_pipeline.py @@ -0,0 +1,64 @@ +import unittest,sys,types,io +from pathlib import Path +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +import numpy as np +from podcast.audio import crop,assemble,compact_pauses,crossfade,SR +from podcast.alignment import check,words_from_asr +from podcast.ranking import identity_reward +from podcast.prompting import prompt +class PipelineTests(unittest.TestCase): + def test_tail_does_not_follow_unrequested_asr_words(self): + words=[{'text':'Hello','start_s':1.,'end_s':1.4},{'text':'world','start_s':1.5,'end_s':2.},{'text':'Thanks for watching','start_s':9.,'end_s':10.}] + aligned,kept,error=check([{'speaker':'S1','text':'Hello world'}],words) + self.assertEqual(error,0);self.assertEqual(aligned[-1]['end_s'],2) + w=np.ones(12*SR,np.float32)*.2;out,m=crop(w,aligned[0]['start_s'],aligned[-1]['end_s']) + self.assertAlmostEqual(len(out)/SR,1.23);self.assertTrue(np.array_equal(w[SR:2*SR],out[round(m['first_word_s']*SR):round(m['last_word_s']*SR)])) + def test_internal_hallucination_rejected(self): + words=[{'text':'Hello','start_s':0.,'end_s':.3},{'text':'surprise','start_s':.4,'end_s':.6},{'text':'world','start_s':.7,'end_s':1.}] + with self.assertRaises(ValueError):check([{'speaker':'S1','text':'Hello world'}],words) + def test_compaction_retains_180_ms_and_preserves_words(self): + w=np.zeros(4*SR,np.float32);w[:SR]=.2;w[3*SR:]=-.2 + words=[{'text':'one','start_s':0,'end_s':1},{'text':'two','start_s':3,'end_s':4}] + out,updated,proof=compact_pauses(w,words,enabled=True) + self.assertEqual(len(proof['cuts']),1);self.assertAlmostEqual(updated[1]['start_s']-updated[0]['end_s'],.18,places=6) + self.assertTrue(np.array_equal(out[:SR],w[:SR]));self.assertTrue(np.array_equal(out[-SR:],w[-SR:])) + def test_audible_gap_is_not_compressed(self): + w=np.ones(4*SR,np.float32)*.2;words=[{'text':'one','start_s':0,'end_s':1},{'text':'two','start_s':3,'end_s':4}] + out,_,proof=compact_pauses(w,words,enabled=True) + self.assertEqual(len(proof['cuts']),0);self.assertTrue(np.array_equal(w,out)) + def test_crossfade_no_correlated_noise_bump(self): + out=crossfade(np.ones(100,np.float32),np.ones(100,np.float32),20) + self.assertTrue(np.allclose(out,1));self.assertEqual(len(out),180) + def test_gap_is_word_clock_not_extra_padding(self): + w=np.ones(3*SR,np.float32)*.1;chunk,edge=crop(w,1,2);out,maps=assemble([('a',chunk,edge),('b',chunk,edge)],400) + self.assertAlmostEqual(maps[1]['first_word_s']-maps[0]['last_word_s'],.4) + with self.assertRaises(ValueError):assemble([('a',chunk,edge),('b',chunk,edge)],100) + def test_global_asr_timestamps_are_not_offset_twice(self): + raw={'segments':[{'start':10,'words':[{'word':'hello','start':10.2,'end':10.5}]}]} + self.assertEqual(words_from_asr(raw,12)[0]['start_s'],10.2) + def test_collapse_is_penalized_without_relabelling(self): + refs={'S1':[1.,0.],'S2':[0.,1.]};turns=[{'speaker':'S1'},{'speaker':'S2'}] + good=[{'own_cosine':1,'other_cosine':0}]*2;bad=[good[0],{'own_cosine':0,'other_cosine':1}] + self.assertGreater(identity_reward(turns,good,refs,0)['reward'],identity_reward(turns,bad,refs,0)['reward']) + def test_prompt_timing_is_actually_absent_in_free_arm(self): + turns=[{'speaker':'S1','text':'Hello world.','seconds':2,'direction':'warm'}] + self.assertNotIn('duration]',prompt(turns,'turns',False));self.assertNotIn('speaker=',prompt(turns,'turns',False)) + self.assertIn('speaker=S1',prompt(turns,'pairs',False));self.assertIn('duration]',prompt(turns,'pairs',True)) + + def test_empty_progress_journal_renders(self): + from podcast.pipeline import journal,progress + import tempfile + with tempfile.TemporaryDirectory() as tmp: + root=Path(tmp);db=journal(root);progress(root,db,{'state':'Testing'}) + self.assertTrue((root/'listening.html').exists());db.close() + def test_raw_candidate_progress_preview_renders(self): + from podcast.pipeline import journal,progress,blob + import tempfile,json + with tempfile.TemporaryDirectory() as tmp: + root=Path(tmp);db=journal(root);m={'id':'u00000-c00','accepted':True} + db.execute('INSERT INTO candidates VALUES(?,?,?)',(m['id'],json.dumps(m),blob(np.ones(SR//5,np.float32)*.1)));db.commit() + progress(root,db,{'state':'Testing'}) + self.assertTrue((root/'previews/preview-0.wav').exists()) + self.assertIn('Provisional raw candidate', (root/'listening.html').read_text());db.close() + +if __name__=='__main__':unittest.main() diff --git a/tokenizer.json b/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..8da72c77edd838e0a08d37d2b3005f25b9e9b60c --- /dev/null +++ b/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06902d1fb775216338802205886a24bc715ccc606bd872a892e3d3c83ca1b9e2 +size 11423220 diff --git a/tokenizer_config.json b/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5426bc4f185cb5a3f45b0c7db3d3379eb6019fed --- /dev/null +++ b/tokenizer_config.json @@ -0,0 +1,253 @@ +{ + "add_bos_token": false, + "add_prefix_space": false, + "added_tokens_decoder": { + "151643": { + "content": "<|endoftext|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151644": { + "content": "<|im_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151645": { + "content": "<|im_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151646": { + "content": "<|object_ref_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151647": { + "content": "<|object_ref_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151648": { + "content": "<|box_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151649": { + "content": "<|box_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151650": { + "content": "<|quad_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151651": { + "content": "<|quad_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151652": { + "content": "<|vision_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151653": { + "content": "<|vision_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151654": { + "content": "<|vision_pad|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151655": { + "content": "<|image_pad|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151656": { + "content": "<|video_pad|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151657": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151658": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151659": { + "content": "<|fim_prefix|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151660": { + "content": "<|fim_middle|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151661": { + "content": "<|fim_suffix|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151662": { + "content": "<|fim_pad|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151663": { + "content": "<|repo_name|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151664": { + "content": "<|file_sep|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151665": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151666": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151667": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151668": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151669": { + "content": "<|audio_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151670": { + "content": "<|audio_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151671": { + "content": "<|audio_pad|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + } + }, + "additional_special_tokens": [ + "<|audio_start|>", + "<|audio_end|>", + "<|audio_pad|>" + ], + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": {}, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/training/historical/frozen_fullft_source.tar.gz b/training/historical/frozen_fullft_source.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8ce5d1065c6beb3dad6f235ea8f89c416cc5dffe --- /dev/null +++ b/training/historical/frozen_fullft_source.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a232f7f6b5f7ecd7e2def77a4c7e6ec37d8471c73ff3d8caaf9ea1229f93c89a +size 39749 diff --git a/training/tokenize_manifest.py b/training/tokenize_manifest.py new file mode 100644 index 0000000000000000000000000000000000000000..61ec6b6170dbb1124b41de651507aa9dde07f669 --- /dev/null +++ b/training/tokenize_manifest.py @@ -0,0 +1,48 @@ +"""Prepare YOUR authorized audio+script records as packed MOSS-v2 TAR/NPZ tokens.""" +from pathlib import Path +import sys,json,io,tarfile,argparse +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +def main(): + p=argparse.ArgumentParser(description=__doc__);p.add_argument('--input',type=Path,required=True);p.add_argument('--output',type=Path,required=True);p.add_argument('--model',default='laion/Humanness-Voice-Podcast');p.add_argument('--codec',default='OpenMOSS-Team/MOSS-Audio-Tokenizer-v2');p.add_argument('--device',default='cuda:0');p.add_argument('--shard-size',type=int,default=512);a=p.parse_args() + import torch,numpy as np + from transformers import AutoModel,AutoConfig,AutoTokenizer + from transformers.dynamic_module_utils import get_class_from_dynamic_module + from huggingface_hub import snapshot_download + from podcast.audio import read,SR + modeldir=Path(a.model) if Path(a.model).is_dir() else Path(snapshot_download(a.model,allow_patterns=['*.py','*.json'])) + cls=get_class_from_dynamic_module('processing_moss_tts.MossTTSLocalProcessor',str(modeldir));config=AutoConfig.from_pretrained(modeldir,trust_remote_code=True) + codec=AutoModel.from_pretrained(a.codec,trust_remote_code=True,codec_weight_dtype='fp32') + if hasattr(codec,'set_compute_dtype'):codec.set_compute_dtype('bf16') + proc=cls(tokenizer=AutoTokenizer.from_pretrained(modeldir),audio_tokenizer=codec.to(a.device).eval(),model_config=config) + def encode(path,reference=False): + wave=read(path) + if reference: + if len(wave)<5.04*SR:raise ValueError('Reference too short') + wave=wave[:round(14.96*SR)] + with torch.inference_mode():code=proc.encode_audios_from_wav([torch.from_numpy(wave[None,:].copy())],SR,n_vq=12)[0].cpu().numpy().astype('750:raise ValueError('Anchors+history exceed60 seconds; rebuild a shorter matching history') + if i%a.shard_size==0: + if archive:archive.close() + name=f'tokens-{i//a.shard_size:05d}.tar';archive=tarfile.open(a.output/name,'w') + member=f'{i:09d}.npz';buf=io.BytesIO();np.savez_compressed(buf,**arrays);data=buf.getvalue() + info=tarfile.TarInfo(member);info.size=len(data);archive.addfile(info,io.BytesIO(data)) + r['codes']=name+'::'+member;out.write(json.dumps(r,ensure_ascii=False)+'\n');out.flush() + finally: + if archive:archive.close() + (a.output/'READY.json').write_text(json.dumps({'passed':True,'records':i+1,'manifest':manifest.name,'codebooks':12,'codec':a.codec},indent=2)) +if __name__=='__main__':main() diff --git a/training/train.py b/training/train.py new file mode 100644 index 0000000000000000000000000000000000000000..06e5ac853828c9643d8e52babee649250ba749bf --- /dev/null +++ b/training/train.py @@ -0,0 +1,116 @@ +"""Portable continued full SFT. Historical exact launch source is separate.""" +from pathlib import Path +import argparse,json,math,os,sys,hashlib,io,tarfile +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +import numpy as np +import torch +from torch import nn +from torch.utils.data import DataLoader,Dataset +from podcast.prompting import build_user,Processor +import va_loss +def pack(proc,config,record,arrays): + turns=record['turns'];mode=record.get('mode','pairs');target=arrays['target'];refs={s:arrays[s] for s in ['S1','S2'] if s in arrays} + if target.ndim!=2 or target.shape[1]!=12 or not np.issubdtype(target.dtype,np.integer) or not 2<=len(target)<=2250:raise ValueError('Invalid target frames') + history=(arrays['context'],record['context_description']) if 'context' in arrays and len(arrays['context']) else None + u=build_user(proc,turns,mode,record['language'],refs,timed=record.get('timed',True),general=record.get('general','A genuine, realistic, pleasant conversation.'),history=history,training_frames=len(target)) + if record.get('instruction'): + # Optional authoritative original GENERAL/SCRIPT text; rebuild cleanly rather + # than silently substituting an automatic caption for an original direction. + text=record['instruction'];automatic=__import__('podcast.prompting',fromlist=['prompt']).prompt(turns,mode,record.get('timed',True),False,record.get('general','A genuine, realistic, pleasant conversation.')) + if automatic not in u['content']:raise RuntimeError('Instruction replacement contract mismatch') + u['content']=u['content'].replace(automatic,text,1) + prefix=Processor(proc,mode)([[u]],mode='generation')['input_ids'][0].long() + t=torch.full((len(target),13),int(config.audio_pad_token_id),dtype=torch.long);t[:,0]=int(config.audio_assistant_slot_token_id);t[:,1:]=torch.as_tensor(target.astype('int64')) + end=torch.full((1,13),int(config.audio_pad_token_id),dtype=torch.long);end[:,0]=int(config.audio_end_token_id) + ids=torch.cat([prefix,t,end]);labels=torch.full_like(ids,-100);labels[len(prefix)-1:-1]=ids[len(prefix):] + labels[:,1:][labels[:,1:]>=int(config.audio_pad_token_id)]=-100 + if len(ids)>32768 or (labels[:,1:]>=0).sum()!=len(target)*12:raise ValueError('Target supervision or context budget mismatch') + return {'input_ids':ids[None],'labels':labels[None],'attention_mask':torch.ones((1,len(ids)),dtype=torch.long)} +class Records(Dataset): + def __init__(self,path,proc,config): + self.root=path.resolve().parent;self.records=[json.loads(s) for s in path.read_text().splitlines() if s.strip()];self.proc=proc;self.config=config + if not self.records:raise ValueError('No training rows') + def __len__(self):return len(self.records) + def __getitem__(self,i): + r=self.records[i];location=r['codes'] + if '::' in location: + archive,member=location.split('::',1) + with tarfile.open(self.root/archive) as t: + f=t.extractfile(member) + if f is None:raise ValueError('Missing TAR token member') + data=io.BytesIO(f.read()) + else:data=self.root/location + with np.load(data,allow_pickle=False) as a:arrays={k:a[k].copy() for k in a.files} + return pack(self.proc,self.config,r,arrays) +def single_example(batch): + if len(batch)!=1:raise ValueError('This memory-bounded trainer expects one packed example per rank') + return batch[0] +class TrainStep(nn.Module): + def __init__(self,base):super().__init__();self.base=base + def forward(self,**batch): + out=self.base(input_ids=batch['input_ids'],attention_mask=batch['attention_mask'],use_cache=False) + return va_loss.compute_supervised_loss_from_hidden(self.base,global_hidden_states=out.last_hidden_state,labels=batch['labels'],channelwise_loss_weight=[1.]+[32./12]*12,chunk_size=256) +def factor(step,total,warm=.05,floor=.1): + n=max(1,round(warm*total)) + if step<=n:return step/n + return floor+(1-floor)*.5*(1+math.cos(math.pi*min(1,(step-n)/max(1,total-n)))) +def main(): + p=argparse.ArgumentParser(description=__doc__);p.add_argument('--model',default='laion/Humanness-Voice-Podcast');p.add_argument('--data',type=Path,required=True);p.add_argument('--output',type=Path,required=True) + p.add_argument('--epochs',type=int,default=2);p.add_argument('--accumulation',type=int,default=1);p.add_argument('--semantic-lr',type=float,default=2e-5);p.add_argument('--local-lr',type=float,default=4e-5);p.add_argument('--warmup',type=float,default=.05);p.add_argument('--save-every',type=int,default=200);p.add_argument('--seed',type=int,default=20261104);p.add_argument('--resume',type=Path) + a=p.parse_args() + if int(os.environ.get('WORLD_SIZE','1'))>1:os.environ['ACCELERATE_USE_FSDP']='true' + from accelerate import Accelerator,FullyShardedDataParallelPlugin,skip_first_batches + from accelerate.utils import set_seed + from torch.distributed.fsdp import MixedPrecision,ShardingStrategy,StateDictType,FullStateDictConfig,FullOptimStateDictConfig + fsdp=FullyShardedDataParallelPlugin(fsdp_version=1,reshard_after_forward=ShardingStrategy.FULL_SHARD,auto_wrap_policy='NO_WRAP',use_orig_params=True,sync_module_states=True,cpu_ram_efficient_loading=False,state_dict_type=StateDictType.FULL_STATE_DICT,state_dict_config=FullStateDictConfig(offload_to_cpu=True,rank0_only=True),optim_state_dict_config=FullOptimStateDictConfig(offload_to_cpu=True,rank0_only=True),mixed_precision_policy=MixedPrecision(param_dtype=torch.bfloat16,reduce_dtype=torch.float32,buffer_dtype=torch.bfloat16),limit_all_gathers=True) + acc=Accelerator(gradient_accumulation_steps=a.accumulation,mixed_precision='bf16',fsdp_plugin=fsdp) + set_seed(a.seed,device_specific=True);torch.set_num_threads(4);a.output.mkdir(parents=True,exist_ok=True) + from transformers import AutoModel,AutoTokenizer + from transformers.dynamic_module_utils import get_class_from_dynamic_module + from huggingface_hub import snapshot_download + modeldir=Path(a.model) if Path(a.model).is_dir() else Path(snapshot_download(a.model)) + model=AutoModel.from_pretrained(modeldir,trust_remote_code=True,dtype=torch.float32,attn_implementation='sdpa') + proc_cls=get_class_from_dynamic_module('processing_moss_tts.MossTTSLocalProcessor',str(modeldir));proc=proc_cls(tokenizer=AutoTokenizer.from_pretrained(modeldir),audio_tokenizer=None,model_config=model.config) + from torch.distributed.algorithms._checkpoint.checkpoint_wrapper import apply_activation_checkpointing,checkpoint_wrapper,CheckpointImpl + from functools import partial + for module in model.modules(): + if hasattr(module,'gradient_checkpointing'):module.gradient_checkpointing=False + apply_activation_checkpointing(model,check_fn=lambda m:type(m).__name__=='MossQwen3DecoderLayer',checkpoint_wrapper_fn=partial(checkpoint_wrapper,checkpoint_impl=CheckpointImpl.NO_REENTRANT)) + data=Records(a.data,proc,model.config);world=acc.num_processes;steps_per_epoch=math.ceil(math.ceil(len(data)/world)/a.accumulation);total=a.epochs*steps_per_epoch + groups=[[],[]] + for name,param in model.named_parameters(): + param.requires_grad_(not name.startswith('score_conditioner.')) + if param.requires_grad:groups[0 if name.startswith(('transformer.','text_lm_head.')) else 1].append(param) + opt=torch.optim.AdamW([{'params':groups[0],'lr':a.semantic_lr},{'params':groups[1],'lr':a.local_lr}],betas=(.9,.95),eps=1e-8,weight_decay=.01,foreach=False) + wrapper,opt=acc.prepare(TrainStep(model),opt) + contract={'base_model':a.model,'data_sha256':hashlib.sha256(a.data.read_bytes()).hexdigest(),'world':world,'epochs':a.epochs,'accumulation':a.accumulation,'seed':a.seed,'semantic_lr':a.semantic_lr,'local_lr':a.local_lr,'warmup':a.warmup,'total_updates':total,'loss_weights':[1.]+[32./12]*12,'recipe':'portable-v1; separate from exact historical launch'} + step=0;start_epoch=0;offset=0 + if a.resume: + saved=json.loads((a.resume/'READY.json').read_text()) + if saved['contract']!=contract:raise RuntimeError('Resume recipe/data/world differs') + acc.load_state(str(a.resume));step=saved['step'];start_epoch=saved['next_epoch'];offset=saved['next_local_batch'] + def checkpoint(epoch,next_batch): + dest=a.output/'checkpoints'/f'step-{step:08d}';acc.save_state(str(dest)) + if acc.is_main_process:(dest/'READY.json').write_text(json.dumps({'contract':contract,'step':step,'next_epoch':epoch,'next_local_batch':next_batch},indent=2)) + acc.wait_for_everyone() + if acc.is_main_process:(a.output/'RUN.json').write_text(json.dumps(contract,indent=2)) + for epoch in range(start_epoch,a.epochs): + gen=torch.Generator().manual_seed(a.seed+epoch);dl=DataLoader(data,batch_size=1,collate_fn=single_example,shuffle=True,generator=gen,num_workers=0);dl=acc.prepare_data_loader(dl) + skip=offset if epoch==start_epoch else 0 + for batch_no,batch in enumerate(skip_first_batches(dl,skip),skip): + with acc.accumulate(wrapper): + with acc.autocast():loss=wrapper(**batch) + if not torch.isfinite(loss):raise RuntimeError('Nonfinite supervised loss') + acc.backward(loss) + if acc.sync_gradients: + for g,peak in zip(opt.param_groups,[a.semantic_lr,a.local_lr]):g['lr']=peak*factor(step+1,total,a.warmup) + acc.clip_grad_norm_(wrapper.parameters(),1.) + opt.step();opt.zero_grad(set_to_none=True) + if acc.sync_gradients: + step+=1 + if acc.is_main_process: + with (a.output/'steps.jsonl').open('a') as f:f.write(json.dumps({'step':step,'epoch':epoch+1,'loss':float(loss.detach()),'learning_rates':[g['lr'] for g in opt.param_groups]})+'\n') + if step%a.save_every==0:checkpoint(epoch,batch_no+1) + offset=0;checkpoint(epoch+1,0) + if acc.is_main_process:(a.output/'COMPLETE.json').write_text(json.dumps({'step':step,'passed':True,'contract':contract},indent=2)) +if __name__=='__main__':main() diff --git a/training/va_loss.py b/training/va_loss.py new file mode 100644 index 0000000000000000000000000000000000000000..b516a4ee115e509955ab11fc3eeb5e7f8338eb31 --- /dev/null +++ b/training/va_loss.py @@ -0,0 +1,102 @@ +"""Channel-wise supervised loss for MOSS-TTS-Local-Transformer. + +ADOPTED VERBATIM from the reference implementation +`ref/code/lora-self-distillation/training/va_train.py` (which in turn copies +`moss_tts_local_v1.5/finetuning/sft.py`). The previous agent had derived the same structure +independently; per the brief, where the two differ this one wins. Only the module docstring and +the import of `torch.utils.checkpoint` are new. + +Structure (matches PROTOCOL 0.a): the global Qwen3 emits h_t; frame t+1 is decoded by the 1-layer +local GPT-2 over a 12-step sequence whose inputs are [proj(h_t), emb_0(c_0), ..., emb_10(c_10)], +with head k applied to local output k. Fully teacher-forceable in a single causal pass. +""" +import torch +import torch.nn.functional as F +import torch.utils.checkpoint + + +def unwrap_training_model(model): + unwrapped = model + while hasattr(unwrapped, "module"): + unwrapped = unwrapped.module + return unwrapped + + +def _local_chunk_sums(base_model, h, lab, n_vq, use_binary, local_dtype): + """Per-channel SUM of cross-entropy over a chunk of positions (text at index 0).""" + M = h.shape[0] + local_prefix = base_model._global_hidden_to_local(h).to(dtype=local_dtype) + local_inputs = torch.zeros((M, n_vq, int(local_prefix.shape[-1])), dtype=local_dtype, device=h.device) + local_inputs[:, 0, :] = local_prefix + audio_t = lab[:, 1:] + for ci in range(n_vq - 1): + tid = audio_t[:, ci]; emb = base_model.audio_embeddings[ci] + vm = (tid >= 0) & (tid < emb.num_embeddings) + local_inputs[:, ci + 1, :] = emb(tid.masked_fill(~vm, 0)).to(dtype=local_dtype) * vm.unsqueeze(-1) + lh = base_model.local_transformer( + input_ids=None, attention_mask=None, position_ids=None, inputs_embeds=local_inputs, + use_cache=False, output_attentions=False, output_hidden_states=False, return_dict=True, + cu_seqlens=None, num_sequences=None).last_hidden_state + sums = [] + tt = lab[:, 0] + if use_binary: + bt = torch.full_like(tt, -100) + bt = bt.masked_fill(tt.eq(int(base_model.config.audio_assistant_slot_token_id)), 0) + bt = bt.masked_fill(tt.eq(int(base_model.config.audio_end_token_id)), 1) + sums.append(F.cross_entropy(base_model.local_text_lm_head(lh[:, 0, :]).float(), bt, + ignore_index=-100, reduction="sum")) + else: + sums.append(F.cross_entropy(base_model.text_lm_head(lh[:, 0, :]).float(), tt, + ignore_index=-100, reduction="sum")) + for ci in range(n_vq): + sums.append(F.cross_entropy(base_model.audio_lm_heads[ci](lh[:, ci, :]).float(), audio_t[:, ci], + ignore_index=-100, reduction="sum")) + return torch.stack(sums) # (n_vq+1,) + + +def compute_supervised_loss_from_hidden(base_model, *, global_hidden_states, labels, + channelwise_loss_weight, chunk_size=1024, + use_checkpoint=True, return_per_channel=False): + """Chunked over positions so peak memory is independent of sequence length.""" + batch_size, seq_len, hidden_size = global_hidden_states.shape + n_vq = int(base_model.config.n_vq) + if labels.shape[-1] != n_vq + 1: + raise ValueError(f"Expected labels with {n_vq + 1} channels, got {labels.shape[-1]}.") + weights = channelwise_loss_weight or [1.0] * (n_vq + 1) + if len(weights) != n_vq + 1: + raise ValueError(f"`channelwise_loss_weight` length {len(weights)} != {n_vq + 1}.") + dev = global_hidden_states.device + flat_hidden = global_hidden_states.reshape(batch_size * seq_len, hidden_size) + flat_labels = labels.reshape(batch_size * seq_len, n_vq + 1) + local_dtype = base_model.local_transformer.ln_f.weight.dtype + use_binary = (hasattr(base_model, "_use_binary_local_text_head") + and base_model._use_binary_local_text_head() + and getattr(base_model, "local_text_lm_head", None) is not None) + N = batch_size * seq_len + sums_total = torch.zeros(n_vq + 1, device=dev, dtype=torch.float32) + cnts = torch.zeros(n_vq + 1, device=dev) + for s in range(0, N, chunk_size): + h = flat_hidden[s:s + chunk_size]; lab = flat_labels[s:s + chunk_size] + with torch.no_grad(): + tt = lab[:, 0]; at = lab[:, 1:] + cnts[0] += ((tt.eq(int(base_model.config.audio_assistant_slot_token_id)) | + tt.eq(int(base_model.config.audio_end_token_id))).sum() if use_binary + else (tt != -100).sum()) + for ci in range(n_vq): + cnts[ci + 1] += (at[:, ci] != -100).sum() + cs = (torch.utils.checkpoint.checkpoint(_local_chunk_sums, base_model, h, lab, n_vq, + use_binary, local_dtype, use_reentrant=False) + if use_checkpoint else _local_chunk_sums(base_model, h, lab, n_vq, use_binary, local_dtype)) + sums_total = sums_total + cs + total_loss = torch.zeros((), device=dev, dtype=torch.float32); total_weight = 0.0 + for k in range(n_vq + 1): + if cnts[k] > 0: + total_loss = total_loss + float(weights[k]) * (sums_total[k] / cnts[k]) + total_weight += float(weights[k]) + if total_weight <= 0: + raise RuntimeError("All labels are ignored; check dataset packing.") + loss = total_loss / total_weight + if return_per_channel: + per = (sums_total / cnts.clamp(min=1)).detach() + return loss, per + return loss diff --git a/validation/gpu-smoke/de-pairs/STATUS.json b/validation/gpu-smoke/de-pairs/STATUS.json new file mode 100644 index 0000000000000000000000000000000000000000..941be8bbe7ae065477e3007c75e40321560e730c --- /dev/null +++ b/validation/gpu-smoke/de-pairs/STATUS.json @@ -0,0 +1,6 @@ +{ + "state": "Complete", + "duration_s": 20.07, + "units": 2, + "time": 1794079766.291094 +} \ No newline at end of file diff --git a/validation/gpu-smoke/de-pairs/episode.wav b/validation/gpu-smoke/de-pairs/episode.wav new file mode 100644 index 0000000000000000000000000000000000000000..6e69cd3cfe283948c3f6160856521ac931dfca2a --- /dev/null +++ b/validation/gpu-smoke/de-pairs/episode.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5061cdada7a57cfe4ea95730d0aff0bd62d639f9789107b5687922bb428e0fb3 +size 2890124 diff --git a/validation/gpu-smoke/de-pairs/episode_timeline.json b/validation/gpu-smoke/de-pairs/episode_timeline.json new file mode 100644 index 0000000000000000000000000000000000000000..3d9bfd8218671ec5e6e1e4c9736e038c5ce7525e --- /dev/null +++ b/validation/gpu-smoke/de-pairs/episode_timeline.json @@ -0,0 +1,14 @@ +[ + { + "unit": "u00000-c00", + "start_s": 0.0, + "first_word_s": 0.0, + "last_word_s": 10.16 + }, + { + "unit": "u00001-c01", + "start_s": 10.56, + "first_word_s": 10.56, + "last_word_s": 19.92 + } +] \ No newline at end of file diff --git a/validation/gpu-smoke/de-turns/STATUS.json b/validation/gpu-smoke/de-turns/STATUS.json new file mode 100644 index 0000000000000000000000000000000000000000..a0102b7a489c3fa4dba7300ef753c06897e6b08d --- /dev/null +++ b/validation/gpu-smoke/de-turns/STATUS.json @@ -0,0 +1,6 @@ +{ + "state": "Complete", + "duration_s": 11.99, + "units": 2, + "time": 1794079715.4062335 +} \ No newline at end of file diff --git a/validation/gpu-smoke/de-turns/episode.wav b/validation/gpu-smoke/de-turns/episode.wav new file mode 100644 index 0000000000000000000000000000000000000000..023b0c659a1219b17e8e012e55c21cdb3187f3f8 --- /dev/null +++ b/validation/gpu-smoke/de-turns/episode.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec15965f059af08b805984295ffb08cc85b9d54b5b71172f0a8aa75a198e67cc +size 1726604 diff --git a/validation/gpu-smoke/de-turns/episode_timeline.json b/validation/gpu-smoke/de-turns/episode_timeline.json new file mode 100644 index 0000000000000000000000000000000000000000..59781431ffe6d7473500de4042b1e1319c7b9c46 --- /dev/null +++ b/validation/gpu-smoke/de-turns/episode_timeline.json @@ -0,0 +1,14 @@ +[ + { + "unit": "u00000-c01", + "start_s": 0.0, + "first_word_s": 0.0, + "last_word_s": 6.0 + }, + { + "unit": "u00001-c00", + "start_s": 6.32, + "first_word_s": 6.4, + "last_word_s": 11.84 + } +] \ No newline at end of file diff --git a/validation/gpu-smoke/en-pairs/STATUS.json b/validation/gpu-smoke/en-pairs/STATUS.json new file mode 100644 index 0000000000000000000000000000000000000000..e79c542b2c8ab6473dff03cfe5c65c7cd881ceff --- /dev/null +++ b/validation/gpu-smoke/en-pairs/STATUS.json @@ -0,0 +1,6 @@ +{ + "state": "Complete", + "duration_s": 19.51, + "units": 2, + "time": 1794079760.8018413 +} \ No newline at end of file diff --git a/validation/gpu-smoke/en-pairs/episode.wav b/validation/gpu-smoke/en-pairs/episode.wav new file mode 100644 index 0000000000000000000000000000000000000000..5622e6b602c83389e347cc2fd837a4489de1648b --- /dev/null +++ b/validation/gpu-smoke/en-pairs/episode.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd95dbfbc64225044092ac43fd951458a74687011a5e948eb8aa3cadbcd5a4b8 +size 2809484 diff --git a/validation/gpu-smoke/en-pairs/episode_timeline.json b/validation/gpu-smoke/en-pairs/episode_timeline.json new file mode 100644 index 0000000000000000000000000000000000000000..b0f93479a3d89c1927351c0e62156819992760de --- /dev/null +++ b/validation/gpu-smoke/en-pairs/episode_timeline.json @@ -0,0 +1,14 @@ +[ + { + "unit": "u00000-c00", + "start_s": 0.0, + "first_word_s": 0.0, + "last_word_s": 9.6 + }, + { + "unit": "u00001-c01", + "start_s": 9.92, + "first_word_s": 10.0, + "last_word_s": 19.36 + } +] \ No newline at end of file diff --git a/validation/gpu-smoke/en-turns/STATUS.json b/validation/gpu-smoke/en-turns/STATUS.json new file mode 100644 index 0000000000000000000000000000000000000000..cfbafae7959b9be612a5daf56998cd5339de2377 --- /dev/null +++ b/validation/gpu-smoke/en-turns/STATUS.json @@ -0,0 +1,6 @@ +{ + "state": "Complete", + "duration_s": 11.35, + "units": 2, + "time": 1794079718.306381 +} \ No newline at end of file diff --git a/validation/gpu-smoke/en-turns/episode.wav b/validation/gpu-smoke/en-turns/episode.wav new file mode 100644 index 0000000000000000000000000000000000000000..59f8363eafe0b0903353e02bc3b4f8e842d76b83 --- /dev/null +++ b/validation/gpu-smoke/en-turns/episode.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f31f92585479deba672ecdad4521b385f9d12bbe94ad39e58899e3caf846aa4 +size 1634444 diff --git a/validation/gpu-smoke/en-turns/episode_timeline.json b/validation/gpu-smoke/en-turns/episode_timeline.json new file mode 100644 index 0000000000000000000000000000000000000000..a366d6c47130141ed3764e82cfc8c66b7cdf7447 --- /dev/null +++ b/validation/gpu-smoke/en-turns/episode_timeline.json @@ -0,0 +1,14 @@ +[ + { + "unit": "u00000-c00", + "start_s": 0.0, + "first_word_s": 0.08, + "last_word_s": 5.76 + }, + { + "unit": "u00001-c01", + "start_s": 6.08, + "first_word_s": 6.16, + "last_word_s": 11.2 + } +] \ No newline at end of file diff --git a/voices.json b/voices.json new file mode 100644 index 0000000000000000000000000000000000000000..62c4b4ad5674fe789240341e2502142120b4eb71 --- /dev/null +++ b/voices.json @@ -0,0 +1 @@ +{"schema":"acting-speaker-aliases-v3","voices":[{"speaker_alias":"Aurora","speaker_id":"spk_aurora","voice_group":"standard_30","perceived_gender":"female","register":"high","catalog_age":"not specified","catalog_accent":"General American","description":"Sunny, optimistic presence with a forward-moving delivery."},{"speaker_alias":"Killian","speaker_id":"spk_killian","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Cheerful, energetic and approachable, with a substantial vocal body."},{"speaker_alias":"Ezra","speaker_id":"spk_ezra","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Grounded, consistent delivery suited to factual explanation."},{"speaker_alias":"Liora","speaker_id":"spk_liora","voice_group":"standard_30","perceived_gender":"female","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Decisive and assured, with a direct presentation."},{"speaker_alias":"Jasper","speaker_id":"spk_jasper","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Passionate, animated delivery with considerable energy."},{"speaker_alias":"Seraphina","speaker_id":"spk_seraphina","voice_group":"standard_30","perceived_gender":"female","register":"high","catalog_age":"not specified","catalog_accent":"General American","description":"Youthful-sounding, lively presence with an energetic delivery."},{"speaker_alias":"Kael","speaker_id":"spk_kael","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Sober and resolute, with a practical, matter-of-fact delivery."},{"speaker_alias":"Esme","speaker_id":"spk_esme","voice_group":"standard_30","perceived_gender":"female","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Airy, light delivery with an unhurried conversational feel."},{"speaker_alias":"Genevieve","speaker_id":"spk_genevieve","voice_group":"standard_30","perceived_gender":"female","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Informal and at ease, with a relaxed conversational manner."},{"speaker_alias":"Freya","speaker_id":"spk_freya","voice_group":"standard_30","perceived_gender":"female","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Enthusiastic and positive, with an animated promotional presence."},{"speaker_alias":"Gideon","speaker_id":"spk_gideon","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Quiet and intimate, with an airy, softly produced tone."},{"speaker_alias":"Jensen","speaker_id":"spk_jensen","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Cleanly enunciated, with precise and distinct articulation."},{"speaker_alias":"Soren","speaker_id":"spk_soren","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Unforced, informal delivery with an easy conversational pace."},{"speaker_alias":"Declan","speaker_id":"spk_declan","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Refined and flowing, with a composed professional finish."},{"speaker_alias":"Isolde","speaker_id":"spk_isolde","voice_group":"standard_30","perceived_gender":"female","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Rounded, gentle delivery with a polished professional character."},{"speaker_alias":"Jocelyn","speaker_id":"spk_jocelyn","voice_group":"standard_30","perceived_gender":"female","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Precisely articulated, intelligible delivery with a clear instructional feel."},{"speaker_alias":"Darius","speaker_id":"spk_darius","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Low, textured delivery with a rugged and weighty dramatic presence."},{"speaker_alias":"Maddox","speaker_id":"spk_maddox","voice_group":"standard_30","perceived_gender":"male","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Measured, explanatory delivery suited to longer narration."},{"speaker_alias":"Persephone","speaker_id":"spk_persephone","voice_group":"standard_30","perceived_gender":"female","register":"high","catalog_age":"not specified","catalog_accent":"General American","description":"Buoyant and energetic, with an optimistic, outgoing presence."},{"speaker_alias":"Elara","speaker_id":"spk_elara","voice_group":"standard_30","perceived_gender":"female","register":"high","catalog_age":"not specified","catalog_accent":"General American","description":"Delicate, restful delivery with a reassuring, soothing quality."},{"speaker_alias":"Elias","speaker_id":"spk_elias","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Resolute and commanding, with a clear sense of authority."},{"speaker_alias":"Silas","speaker_id":"spk_silas","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Level and dependable, with an even, balanced delivery."},{"speaker_alias":"Kaia","speaker_id":"spk_kaia","voice_group":"standard_30","perceived_gender":"female","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Mature-sounding, assured delivery with a formal professional presence."},{"speaker_alias":"Sloane","speaker_id":"spk_sloane","voice_group":"standard_30","perceived_gender":"neutral","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Assertive and self-possessed, with a direct forward presentation."},{"speaker_alias":"Caspian","speaker_id":"spk_caspian","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Welcoming and personable, with an informal, warm conversational tone."},{"speaker_alias":"Thorne","speaker_id":"spk_thorne","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Relaxed and informal, with an easy, conversational delivery."},{"speaker_alias":"Celeste","speaker_id":"spk_celeste","voice_group":"standard_30","perceived_gender":"female","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Softly reassuring, with a mild, composed and soothing delivery."},{"speaker_alias":"Rowan","speaker_id":"spk_rowan","voice_group":"standard_30","perceived_gender":"male","register":"low","catalog_age":"not specified","catalog_accent":"General American","description":"Expressive and lively, with an engaging spoken presentation."},{"speaker_alias":"Ryder","speaker_id":"spk_ryder","voice_group":"standard_30","perceived_gender":"male","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Assured and explanatory, with an even, knowledgeable presence."},{"speaker_alias":"Ursula","speaker_id":"spk_ursula","voice_group":"standard_30","perceived_gender":"female","register":"medium","catalog_age":"not specified","catalog_accent":"General American","description":"Reassuring and welcoming, with an inviting, warm delivery."},{"speaker_alias":"Adrian","speaker_id":"spk_adrian","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"middle aged","catalog_accent":"american","description":"Dominant, resolute delivery with a firm presence."},{"speaker_alias":"Alina","speaker_id":"spk_alina","voice_group":"add_on_24","perceived_gender":"female","register":"unspecified","catalog_age":"middle aged","catalog_accent":"british","description":"Precise, engaging instructional delivery with a professional finish."},{"speaker_alias":"Bianca","speaker_id":"spk_bianca","voice_group":"add_on_24","perceived_gender":"female","register":"unspecified","catalog_age":"middle aged","catalog_accent":"american","description":"Luminous, welcoming delivery with a polished professional manner."},{"speaker_alias":"Bastian","speaker_id":"spk_bastian","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"old","catalog_accent":"american","description":"Seasoned-sounding and considered, with balanced, distinct articulation."},{"speaker_alias":"Bennett","speaker_id":"spk_bennett","voice_group":"add_on_24","perceived_gender":"male","register":"low","catalog_age":"middle aged","catalog_accent":"american","description":"Low, full-bodied resonance with a soothing, reassuring presence."},{"speaker_alias":"Caius","speaker_id":"spk_caius","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"middle aged","catalog_accent":"american","description":"Textured, husky character delivery with a mischievous edge."},{"speaker_alias":"Calvin","speaker_id":"spk_calvin","voice_group":"add_on_24","perceived_gender":"male","register":"low","catalog_age":"young","catalog_accent":"australian","description":"Low, self-assured delivery with an animated, energetic character."},{"speaker_alias":"Cedric","speaker_id":"spk_cedric","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"middle aged","catalog_accent":"american","description":"Personable and unpretentious, with a relaxed conversational presence."},{"speaker_alias":"Dorian","speaker_id":"spk_dorian","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"middle aged","catalog_accent":"british","description":"Consistent, composed delivery with a formal broadcast character."},{"speaker_alias":"Edmund","speaker_id":"spk_edmund","voice_group":"add_on_24","perceived_gender":"male","register":"low","catalog_age":"middle aged","catalog_accent":"british","description":"Low, dark-toned dramatic delivery with a serious character."},{"speaker_alias":"Emmett","speaker_id":"spk_emmett","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"middle aged","catalog_accent":"american","description":"Flowing and composed, with a dependable conversational presence."},{"speaker_alias":"Felix","speaker_id":"spk_felix","voice_group":"add_on_24","perceived_gender":"male","register":"low","catalog_age":"old","catalog_accent":"american","description":"Low, gravelly texture balanced by a welcoming narrative warmth."},{"speaker_alias":"Gareth","speaker_id":"spk_gareth","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"middle aged","catalog_accent":"british","description":"Enveloping, engaging narrative delivery with a mature-sounding presence."},{"speaker_alias":"Hugo","speaker_id":"spk_hugo","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"young","catalog_accent":"american","description":"Rough-edged, forceful character delivery with youthful-sounding energy."},{"speaker_alias":"Iris","speaker_id":"spk_iris","voice_group":"add_on_24","perceived_gender":"female","register":"unspecified","catalog_age":"young","catalog_accent":"american","description":"Lighthearted and radiant, with a welcoming, playful character."},{"speaker_alias":"Leonie","speaker_id":"spk_leonie","voice_group":"add_on_24","perceived_gender":"female","register":"unspecified","catalog_age":"young","catalog_accent":"american","description":"Animated, individualistic delivery with a lightly cheeky attitude."},{"speaker_alias":"Lucian","speaker_id":"spk_lucian","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"young","catalog_accent":"american","description":"Outgoing, self-assured delivery with a lively presentation style."},{"speaker_alias":"Lydia","speaker_id":"spk_lydia","voice_group":"add_on_24","perceived_gender":"female","register":"unspecified","catalog_age":"middle aged","catalog_accent":"british","description":"Soft, plush vocal texture with a confident dramatic presence."},{"speaker_alias":"Marielle","speaker_id":"spk_marielle","voice_group":"add_on_24","perceived_gender":"female","register":"unspecified","catalog_age":"middle aged","catalog_accent":"american","description":"Well-informed, professional delivery with a positive, animated manner."},{"speaker_alias":"Remy","speaker_id":"spk_remy","voice_group":"add_on_24","perceived_gender":"neutral","register":"unspecified","catalog_age":"middle aged","catalog_accent":"american","description":"Unhurried and composed, with an understated explanatory delivery."},{"speaker_alias":"Ronan","speaker_id":"spk_ronan","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"middle aged","catalog_accent":"american","description":"Relaxed and informal, with a full, resonant vocal body."},{"speaker_alias":"Sabine","speaker_id":"spk_sabine","voice_group":"add_on_24","perceived_gender":"female","register":"unspecified","catalog_age":"young","catalog_accent":"american","description":"Assured and reassuring delivery with a polished, mature-sounding presence."},{"speaker_alias":"Tobias","speaker_id":"spk_tobias","voice_group":"add_on_24","perceived_gender":"male","register":"low","catalog_age":"middle aged","catalog_accent":"standard","description":"Low, welcoming narrative delivery with a professional finish."},{"speaker_alias":"Wesley","speaker_id":"spk_wesley","voice_group":"add_on_24","perceived_gender":"male","register":"unspecified","catalog_age":"young","catalog_accent":"american","description":"Easygoing, positive delivery with an unhurried conversational manner."},{"speaker_alias":"Gaston","speaker_id":"spk_gaston","voice_group":"character_extra","perceived_gender":"male","register":"low / warm (character direction)","catalog_age":"not specified","catalog_accent":"performed French accent in English and German","description":"Warm, playful and gallant character; outwardly capable, emotionally receptive and lightly comic. Register and manner are performance directions, not acoustic measurements."}],"note":"Catalog characteristics describe synthetic voice presets, not real human demographics. Pitch or age not supplied by the catalog is not inferred. Actual performances can differ."}