cafa-ivr 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cafa_ivr-1.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,203 @@
1
+ Metadata-Version: 2.4
2
+ Name: cafa-ivr
3
+ Version: 1.1.0
4
+ Summary: Reference implementation of Counterfactual ASR Failure Attribution for conversational IVR
5
+ Author: Vijay Kumar Sridharan
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/sridharanvijaykumar/cafa-ivr
8
+ Project-URL: Repository, https://github.com/sridharanvijaykumar/cafa-ivr
9
+ Project-URL: Documentation, https://github.com/sridharanvijaykumar/cafa-ivr/tree/main/docs
10
+ Project-URL: Issues, https://github.com/sridharanvijaykumar/cafa-ivr/issues
11
+ Keywords: ASR,IVR,conversational AI,testing,WER,NLU
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Provides-Extra: dev
20
+ Requires-Dist: pytest>=8; extra == "dev"
21
+ Dynamic: license-file
22
+
23
+ # CAFA-IVR
24
+
25
+ [![CAFA-IVR CI](https://github.com/sridharanvijaykumar/cafa-ivr/actions/workflows/ci.yml/badge.svg)](https://github.com/sridharanvijaykumar/cafa-ivr/actions/workflows/ci.yml)
26
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
27
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](pyproject.toml)
28
+ [![Release](https://img.shields.io/github/v/release/sridharanvijaykumar/cafa-ivr)](https://github.com/sridharanvijaykumar/cafa-ivr/releases)
29
+
30
+ **Counterfactual ASR Failure Attribution for Conversational IVR**
31
+
32
+ CAFA-IVR is a vendor-neutral testing framework for answering a practical question that Word Error Rate (WER) cannot answer by itself:
33
+
34
+ > Did adding the speech/ASR path cause an otherwise valid conversational test to fail?
35
+
36
+ ## Core idea
37
+
38
+ Run every semantic test through two paths:
39
+
40
+ ```text
41
+ TEXT CONTROL: reference text -> NLU / agent -> task outcome
42
+ AUDIO PATH: audio -> ASR -> NLU / agent -> task outcome
43
+ ```
44
+
45
+ CAFA-IVR then distinguishes:
46
+
47
+ | Text control | Audio path | Attribution |
48
+ |---|---|---|
49
+ | Pass | Pass | HEALTHY |
50
+ | Pass | Fail | SPEECH_ATTRIBUTABLE |
51
+ | Fail | Fail | DOWNSTREAM_OR_TEST |
52
+ | Fail | Pass | CONTEXT_OR_ORACLE |
53
+
54
+ The primary metric is **ASR-IFR (ASR-Attributable Intent Failure Rate)**: the fraction of the full paired suite where the text control passes but the audio path fails.
55
+
56
+ CAFA-IVR also supports:
57
+
58
+ - **WER** - lexical transcription fidelity
59
+ - **CEER** - Critical-Entity Error Rate for amounts, dates, negation, actions, etc. CEER is an **unbounded normalized error count, not a probability**: it divides critical-entity errors by the number of reference critical entities and may exceed 1.0 when a hypothesis introduces spurious entities, just as WER may exceed 1.0 under heavy insertion.
60
+ - **CIER** - Critical-Impact Error Rate: a severity-weighted **realized-consequence** rate. Each trial with a recognized `impact_level` contributes its severity weight only when the audio-path task failed and contributes zero when it passed; trials without a recognized impact level are excluded. CIER counts realized task failures regardless of attribution. To isolate ASR-attributable consequence, restrict results to `attribution = SPEECH_ATTRIBUTABLE`.
61
+ - condition-level summaries for clean, telephony, noise and speaking-rate tests
62
+ - baseline-vs-candidate regression gates for CI/CD
63
+
64
+ ## Quick start
65
+
66
+ Requires Python 3.10+.
67
+
68
+ ```bash
69
+ git clone https://github.com/sridharanvijaykumar/cafa-ivr.git
70
+ cd cafa-ivr
71
+ python -m venv .venv
72
+ source .venv/bin/activate
73
+ pip install -e .
74
+ cafa-ivr score \
75
+ --input examples/demo_results.csv \
76
+ --out demo_out
77
+ ```
78
+
79
+ (If your environment blocks build isolation, use `pip install -e . --no-build-isolation`
80
+ instead — it requires setuptools to be pre-installed: `pip install setuptools` first.)
81
+
82
+ Outputs:
83
+
84
+ ```text
85
+ demo_out/
86
+ scored_trials.csv
87
+ summary.csv
88
+ summary.json
89
+ report.md
90
+ ```
91
+
92
+ The demo file is **illustrative only** and must not be cited as empirical evidence.
93
+
94
+ To reproduce scoring on the measured 360-trial Conformer-CTC pilot included with this release:
95
+
96
+ ```bash
97
+ cafa-ivr score \
98
+ --input empirical/conformer_360_cafa_input.csv \
99
+ --out measured_out
100
+ ```
101
+
102
+ ### What this release reproduces
103
+
104
+ This release reproduces **scoring**: it recomputes the reported metrics from the decoded outputs supplied in `empirical/`. It does **not** include the audio-synthesis, ASR-decoding, perturbation, or bootstrap-resampling pipelines and therefore does not regenerate those decoded outputs. The 540 local decodes and the 5,000-sample bootstrap intervals reported in the paper are not reproducible end to end from this tag.
105
+
106
+ A correct reproduction yields exactly: 360 trials, 142 speech-attributable failures,
107
+ 0.648429 mean WER, 0.411111 intent/task accuracy, 0.800000 text-control accuracy, and
108
+ 0.394444 ASR-IFR.
109
+
110
+ What the attribution report looks like (real output from the scorer on the illustrative
111
+ demo file — 12 trials, so CEER exceeds 1.0 here, which is expected behavior for an
112
+ unbounded error count):
113
+
114
+ ```markdown
115
+ # CAFA-IVR Results
116
+
117
+ Trials: **12**
118
+ Mean WER: **0.1944**
119
+ Intent/task accuracy: **0.5000**
120
+ Text-control accuracy: **0.8333**
121
+ ASR-IFR: **0.3333**
122
+ CEER: **2.0000**
123
+ CIER: **0.3458**
124
+
125
+ ASR-IFR counts trials where the reference-text control passes but the audio-path task fails.
126
+ ```
127
+
128
+ ## CI/CD gate
129
+
130
+ ```bash
131
+ cafa-ivr compare \
132
+ --baseline baseline/summary.csv \
133
+ --candidate candidate/summary.csv \
134
+ --max-asr-ifr-delta 0.02 \
135
+ --max-ceer-delta 0.01
136
+ ```
137
+
138
+ The default numeric gates are examples for tooling demonstration, not universal acceptance criteria. Production teams should govern their own thresholds by risk tier and historical baseline.
139
+
140
+ Every enabled gate requires a present, numeric, finite metric in both summaries and fails closed on invalid input. Datasets without critical-entity annotations must explicitly disable that optional gate with `--no-ceer-gate`.
141
+
142
+ ## Integration contract
143
+
144
+ CAFA-IVR does not require a specific ASR, NLU, contact-center platform, or agent architecture. An adapter only needs to populate the trial-result fields described in `docs/CAFA-IVR_SPEC_v1.0.md`.
145
+
146
+ Possible integrations include:
147
+
148
+ - cloud or on-prem ASR
149
+ - intent classifiers
150
+ - LLM voice agents
151
+ - contact-center test harnesses
152
+ - deterministic dialogue managers
153
+ - tool-calling agents with task-success oracles
154
+
155
+ ## Evidence included in this release
156
+
157
+ `empirical/` contains the locally measured controlled Conformer-CTC results used in the research manuscript plus public-human-source validation metadata. Synthetic-speech measurements and public-human source validation are deliberately kept separate.
158
+
159
+ ### Evidence boundary
160
+
161
+ CAFA-IVR is a testing and attribution framework, not an ASR model. The included 360-trial neural pilot uses controlled synthetic speech and a constrained in-domain recognizer; it should **not** be interpreted as a production-ASR benchmark. Public human-banking material is retained as source/provenance validation and is not mixed with locally executed measurements.
162
+
163
+ The included 360-trial pilot exercises **ASR-IFR** and **WER** only. It carries no critical-entity annotations and no impact labels, so **CEER** and **CIER** are specified and implemented but not exercised by this dataset; the reproduced summary accordingly reports `ceer: null` and `cier: null`.
164
+
165
+ ## Adoption
166
+
167
+ Organizations adopting the framework should record the exact CAFA-IVR version, test scope, engines, thresholds, and change-management decision. `docs/ADOPTION_EVIDENCE_LOG.md` provides a neutral template so independent use is reproducible and auditable.
168
+
169
+ Want to contribute? See [CONTRIBUTING.md](CONTRIBUTING.md) — good first areas include
170
+ platform adapters, entity normalizers, CI/CD integrations, and documentation. Please
171
+ respect the evidence rules there: no fabricated or estimated results presented as
172
+ measurements.
173
+
174
+ ## Technical manuscript
175
+
176
+ See `paper/CAFA-IVR.pdf` and `paper/CAFA-IVR.tex`.
177
+
178
+ The repository provides this venue-neutral technical manuscript as supporting documentation and does not represent it as accepted or published.
179
+
180
+ ## License
181
+
182
+ Reference implementation: Apache-2.0. Dataset/audio licensing remains governed by the source dataset or organization that owns the test material.
183
+
184
+ ## Author
185
+
186
+ Vijay Kumar Sridharan
187
+ IEEE Senior Member
188
+ Frisco, TX, USA
189
+
190
+ ## Repository adoption workflow
191
+
192
+ CAFA-IVR is designed to be forked or wrapped rather than requiring teams to replace their ASR/NLU stack. A typical adoption is:
193
+
194
+ ```text
195
+ existing test audio ──> existing ASR ──> existing NLU/agent ──> result adapter
196
+ │
197
+ reference text ─────────────────────────> same NLU/agent ────> text control
198
+ │
199
+ v
200
+ CAFA-IVR scorer
201
+ ```
202
+
203
+ Teams can add an adapter under `adapters/`, generate the required trial CSV, run `cafa-ivr score`, and optionally place `cafa-ivr compare` in CI/CD. Independent evaluations are welcome through the adoption-report issue template.
@@ -0,0 +1,181 @@
1
+ # CAFA-IVR
2
+
3
+ [![CAFA-IVR CI](https://github.com/sridharanvijaykumar/cafa-ivr/actions/workflows/ci.yml/badge.svg)](https://github.com/sridharanvijaykumar/cafa-ivr/actions/workflows/ci.yml)
4
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
5
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](pyproject.toml)
6
+ [![Release](https://img.shields.io/github/v/release/sridharanvijaykumar/cafa-ivr)](https://github.com/sridharanvijaykumar/cafa-ivr/releases)
7
+
8
+ **Counterfactual ASR Failure Attribution for Conversational IVR**
9
+
10
+ CAFA-IVR is a vendor-neutral testing framework for answering a practical question that Word Error Rate (WER) cannot answer by itself:
11
+
12
+ > Did adding the speech/ASR path cause an otherwise valid conversational test to fail?
13
+
14
+ ## Core idea
15
+
16
+ Run every semantic test through two paths:
17
+
18
+ ```text
19
+ TEXT CONTROL: reference text -> NLU / agent -> task outcome
20
+ AUDIO PATH: audio -> ASR -> NLU / agent -> task outcome
21
+ ```
22
+
23
+ CAFA-IVR then distinguishes:
24
+
25
+ | Text control | Audio path | Attribution |
26
+ |---|---|---|
27
+ | Pass | Pass | HEALTHY |
28
+ | Pass | Fail | SPEECH_ATTRIBUTABLE |
29
+ | Fail | Fail | DOWNSTREAM_OR_TEST |
30
+ | Fail | Pass | CONTEXT_OR_ORACLE |
31
+
32
+ The primary metric is **ASR-IFR (ASR-Attributable Intent Failure Rate)**: the fraction of the full paired suite where the text control passes but the audio path fails.
33
+
34
+ CAFA-IVR also supports:
35
+
36
+ - **WER** - lexical transcription fidelity
37
+ - **CEER** - Critical-Entity Error Rate for amounts, dates, negation, actions, etc. CEER is an **unbounded normalized error count, not a probability**: it divides critical-entity errors by the number of reference critical entities and may exceed 1.0 when a hypothesis introduces spurious entities, just as WER may exceed 1.0 under heavy insertion.
38
+ - **CIER** - Critical-Impact Error Rate: a severity-weighted **realized-consequence** rate. Each trial with a recognized `impact_level` contributes its severity weight only when the audio-path task failed and contributes zero when it passed; trials without a recognized impact level are excluded. CIER counts realized task failures regardless of attribution. To isolate ASR-attributable consequence, restrict results to `attribution = SPEECH_ATTRIBUTABLE`.
39
+ - condition-level summaries for clean, telephony, noise and speaking-rate tests
40
+ - baseline-vs-candidate regression gates for CI/CD
41
+
42
+ ## Quick start
43
+
44
+ Requires Python 3.10+.
45
+
46
+ ```bash
47
+ git clone https://github.com/sridharanvijaykumar/cafa-ivr.git
48
+ cd cafa-ivr
49
+ python -m venv .venv
50
+ source .venv/bin/activate
51
+ pip install -e .
52
+ cafa-ivr score \
53
+ --input examples/demo_results.csv \
54
+ --out demo_out
55
+ ```
56
+
57
+ (If your environment blocks build isolation, use `pip install -e . --no-build-isolation`
58
+ instead — it requires setuptools to be pre-installed: `pip install setuptools` first.)
59
+
60
+ Outputs:
61
+
62
+ ```text
63
+ demo_out/
64
+ scored_trials.csv
65
+ summary.csv
66
+ summary.json
67
+ report.md
68
+ ```
69
+
70
+ The demo file is **illustrative only** and must not be cited as empirical evidence.
71
+
72
+ To reproduce scoring on the measured 360-trial Conformer-CTC pilot included with this release:
73
+
74
+ ```bash
75
+ cafa-ivr score \
76
+ --input empirical/conformer_360_cafa_input.csv \
77
+ --out measured_out
78
+ ```
79
+
80
+ ### What this release reproduces
81
+
82
+ This release reproduces **scoring**: it recomputes the reported metrics from the decoded outputs supplied in `empirical/`. It does **not** include the audio-synthesis, ASR-decoding, perturbation, or bootstrap-resampling pipelines and therefore does not regenerate those decoded outputs. The 540 local decodes and the 5,000-sample bootstrap intervals reported in the paper are not reproducible end to end from this tag.
83
+
84
+ A correct reproduction yields exactly: 360 trials, 142 speech-attributable failures,
85
+ 0.648429 mean WER, 0.411111 intent/task accuracy, 0.800000 text-control accuracy, and
86
+ 0.394444 ASR-IFR.
87
+
88
+ What the attribution report looks like (real output from the scorer on the illustrative
89
+ demo file — 12 trials, so CEER exceeds 1.0 here, which is expected behavior for an
90
+ unbounded error count):
91
+
92
+ ```markdown
93
+ # CAFA-IVR Results
94
+
95
+ Trials: **12**
96
+ Mean WER: **0.1944**
97
+ Intent/task accuracy: **0.5000**
98
+ Text-control accuracy: **0.8333**
99
+ ASR-IFR: **0.3333**
100
+ CEER: **2.0000**
101
+ CIER: **0.3458**
102
+
103
+ ASR-IFR counts trials where the reference-text control passes but the audio-path task fails.
104
+ ```
105
+
106
+ ## CI/CD gate
107
+
108
+ ```bash
109
+ cafa-ivr compare \
110
+ --baseline baseline/summary.csv \
111
+ --candidate candidate/summary.csv \
112
+ --max-asr-ifr-delta 0.02 \
113
+ --max-ceer-delta 0.01
114
+ ```
115
+
116
+ The default numeric gates are examples for tooling demonstration, not universal acceptance criteria. Production teams should govern their own thresholds by risk tier and historical baseline.
117
+
118
+ Every enabled gate requires a present, numeric, finite metric in both summaries and fails closed on invalid input. Datasets without critical-entity annotations must explicitly disable that optional gate with `--no-ceer-gate`.
119
+
120
+ ## Integration contract
121
+
122
+ CAFA-IVR does not require a specific ASR, NLU, contact-center platform, or agent architecture. An adapter only needs to populate the trial-result fields described in `docs/CAFA-IVR_SPEC_v1.0.md`.
123
+
124
+ Possible integrations include:
125
+
126
+ - cloud or on-prem ASR
127
+ - intent classifiers
128
+ - LLM voice agents
129
+ - contact-center test harnesses
130
+ - deterministic dialogue managers
131
+ - tool-calling agents with task-success oracles
132
+
133
+ ## Evidence included in this release
134
+
135
+ `empirical/` contains the locally measured controlled Conformer-CTC results used in the research manuscript plus public-human-source validation metadata. Synthetic-speech measurements and public-human source validation are deliberately kept separate.
136
+
137
+ ### Evidence boundary
138
+
139
+ CAFA-IVR is a testing and attribution framework, not an ASR model. The included 360-trial neural pilot uses controlled synthetic speech and a constrained in-domain recognizer; it should **not** be interpreted as a production-ASR benchmark. Public human-banking material is retained as source/provenance validation and is not mixed with locally executed measurements.
140
+
141
+ The included 360-trial pilot exercises **ASR-IFR** and **WER** only. It carries no critical-entity annotations and no impact labels, so **CEER** and **CIER** are specified and implemented but not exercised by this dataset; the reproduced summary accordingly reports `ceer: null` and `cier: null`.
142
+
143
+ ## Adoption
144
+
145
+ Organizations adopting the framework should record the exact CAFA-IVR version, test scope, engines, thresholds, and change-management decision. `docs/ADOPTION_EVIDENCE_LOG.md` provides a neutral template so independent use is reproducible and auditable.
146
+
147
+ Want to contribute? See [CONTRIBUTING.md](CONTRIBUTING.md) — good first areas include
148
+ platform adapters, entity normalizers, CI/CD integrations, and documentation. Please
149
+ respect the evidence rules there: no fabricated or estimated results presented as
150
+ measurements.
151
+
152
+ ## Technical manuscript
153
+
154
+ See `paper/CAFA-IVR.pdf` and `paper/CAFA-IVR.tex`.
155
+
156
+ The repository provides this venue-neutral technical manuscript as supporting documentation and does not represent it as accepted or published.
157
+
158
+ ## License
159
+
160
+ Reference implementation: Apache-2.0. Dataset/audio licensing remains governed by the source dataset or organization that owns the test material.
161
+
162
+ ## Author
163
+
164
+ Vijay Kumar Sridharan
165
+ IEEE Senior Member
166
+ Frisco, TX, USA
167
+
168
+ ## Repository adoption workflow
169
+
170
+ CAFA-IVR is designed to be forked or wrapped rather than requiring teams to replace their ASR/NLU stack. A typical adoption is:
171
+
172
+ ```text
173
+ existing test audio ──> existing ASR ──> existing NLU/agent ──> result adapter
174
+ │
175
+ reference text ─────────────────────────> same NLU/agent ────> text control
176
+ │
177
+ v
178
+ CAFA-IVR scorer
179
+ ```
180
+
181
+ Teams can add an adapter under `adapters/`, generate the required trial CSV, run `cafa-ivr score`, and optionally place `cafa-ivr compare` in CI/CD. Independent evaluations are welcome through the adoption-report issue template.
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "cafa-ivr"
7
+ version = "1.1.0"
8
+ description = "Reference implementation of Counterfactual ASR Failure Attribution for conversational IVR"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [{name = "Vijay Kumar Sridharan"}]
12
+ license = {text = "Apache-2.0"}
13
+ keywords = ["ASR", "IVR", "conversational AI", "testing", "WER", "NLU"]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: Apache Software License",
17
+ "Intended Audience :: Developers",
18
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
19
+ ]
20
+
21
+ [project.scripts]
22
+ cafa-ivr = "cafa_ivr.cli:main"
23
+
24
+ [tool.setuptools.packages.find]
25
+ where = ["src"]
26
+
27
+ [project.optional-dependencies]
28
+ dev = ["pytest>=8"]
29
+
30
+ [tool.pytest.ini_options]
31
+ testpaths = ["tests"]
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/sridharanvijaykumar/cafa-ivr"
35
+ Repository = "https://github.com/sridharanvijaykumar/cafa-ivr"
36
+ Documentation = "https://github.com/sridharanvijaykumar/cafa-ivr/tree/main/docs"
37
+ Issues = "https://github.com/sridharanvijaykumar/cafa-ivr/issues"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ __version__ = "1.1.0"
2
+ from .core import attribution, cafa_score_row, critical_entity_error_rate, word_error_rate
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+ if __name__ == "__main__":
3
+ main()