@hoanghong/speaking-angular 0.4.2 → 0.5.0

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +35 -17
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.5.0
2
+
3
+ - Optional multi-criteria local pronunciation diagnostics with methods, limitations and unavailable scores.
4
+ - Compatible with older service responses.
5
+
6
+ ## 0.4.3
7
+
8
+ - Remove service addresses from public integration examples; no runtime changes.
9
+
1
10
  ## 0.4.2
2
11
 
3
12
  - Simplify public integration documentation; no runtime changes.
package/README.md CHANGED
@@ -5,15 +5,15 @@ Component nhận dạng lời nói online dùng ngay. Chỉ cài package, chọn
5
5
  ## 1. Cài đặt
6
6
 
7
7
  ```bash
8
- npm install ./vendor/hoanghong-speaking-core-0.4.2.tgz ./vendor/hoanghong-speaking-angular-0.4.2.tgz
8
+ npm install ./vendor/hoanghong-speaking-core-0.5.0.tgz ./vendor/hoanghong-speaking-angular-0.5.0.tgz
9
9
  ```
10
10
 
11
11
  Core được cài tự động. Với ứng dụng mới: `npx @angular/cli@18 new speaking-demo --standalone --routing=false --style=css`, rồi `cd speaking-demo` và chạy lệnh trên.
12
12
 
13
- Bản 0.4.2 là bộ cài test local: giải nén ZIP và copy hai tarball vào `vendor/` trước.
14
- Chưa publish 0.4.2 lên registry. Các tính năng nhận dạng cũ vẫn dùng được.
13
+ Bản 0.5.0 là bộ cài test local: giải nén ZIP và copy hai tarball vào `vendor/` trước.
14
+ Chưa publish 0.5.0 lên registry. Các tính năng nhận dạng cũ vẫn dùng được.
15
15
 
16
- ## Đánh giá phát âm tiếng Anh Mỹ (0.4.2)
16
+ ## Đánh giá phát âm tiếng Anh Mỹ (0.5.0)
17
17
 
18
18
  Thêm `SpeakingService` vào `providers` của component dùng để test, import từ
19
19
  `@hoanghong/speaking-angular`, rồi gọi trong class component:
@@ -40,10 +40,9 @@ Thêm `signal: controller.signal` để hủy request. Hàm reject khi lỗi; UI
40
40
  Kết quả có timestamp, âm thiếu/thừa/thay thế, formant/pitch/intensity/PSD và warnings.
41
41
 
42
42
  Dùng `provideSpeakingApp` hiện có nếu có appKey. SDK tự cấp phiên riêng cho mỗi lần đánh giá,
43
- không nhập service token. Endpoint public `/sdk/v1/pronunciation-assessments` và model phải
43
+ không nhập service token. Dịch vụ đánh giá phát âm và model phải
44
44
  được triển khai trước; 404/503 nghĩa là server chưa sẵn sàng. Bộ cài không triển khai server.
45
- Test server riêng qua `provideSpeakingGateway({baseUrl: 'https://YOUR_TEST_GATEWAY'})`;
46
- gateway phải chuyển tiếp endpoint và giữ service credential ở backend, không đưa vào app.
45
+ Không đưa service credential vào ứng dụng.
47
46
 
48
47
  ## 2. Thêm component — ví dụ đầy đủ
49
48
 
@@ -158,17 +157,36 @@ Dịch vụ public tự cấp phiên ngắn hạn. Mặc định server giới h
158
157
  API thấp của 0.2 vẫn có sẵn cho tích hợp tùy chỉnh; không cần dùng trong luồng trên. Microphone thiết bị và khả năng truy cập mạng cần kiểm tra trong ứng dụng triển khai thực tế.
159
158
 
160
159
 
161
- ## Application key and service URL
160
+ ## Application key
162
161
 
163
- Pass the application key provided by FSEL as `appKey`. Quotas and key status are
164
- managed by the service. App keys identify an application and are visible in
165
- browser/mobile applications.
166
-
167
- The default service is https://ai-service.fsel.edu.vn/sdk. For a private deployment,
168
- set `baseUrl` to the absolute /sdk endpoint supplied by your service operator.
162
+ Pass the application key provided by FSEL as `appKey`. The SDK handles service
163
+ connections automatically. Quotas and key status are managed by the service.
164
+ App keys identify an application and are visible in browser/mobile applications.
169
165
 
170
166
  ```ts
171
- provideSpeakingApp({ appKey: environment.speakingAppKey,
172
- baseUrl: environment.speakingServiceUrl });
173
- // Local: speakingServiceUrl = 'http://127.0.0.1:8001/sdk'
167
+ provideSpeakingApp({ appKey: environment.speakingAppKey });
174
168
  ```
169
+
170
+
171
+ ## Multi-criteria pronunciation diagnostics (0.5.0)
172
+
173
+ Optional `breakdown` contains accuracy, completeness, fluency, prosody, pronunciation,
174
+ vocabulary, grammar and topic. Each has score (0–100 or null), status
175
+ (estimated/unavailable), method and reason. These are local diagnostics, not Azure
176
+ scores or calibrated grades. Older services may omit breakdown.
177
+
178
+ - Accuracy = 100 * matches / (matches + substitutions + insertions), at phoneme level.
179
+ - Completeness = 100 * (reference phonemes - omissions) / reference phonemes.
180
+ Substitutions count as covered; this is coverage, not correctness.
181
+ - Fluency is an energy continuity proxy = 100 * (1 - internal pause seconds / active span).
182
+ 20 ms RMS windows, threshold=max(0.005, 0.1*peak RMS), internal gaps >=250 ms.
183
+ Excludes leading/trailing silence; requires >=2 s audio and >=1 s active span.
184
+ Noise may inflate the value and intentional pauses may lower it; this is not VAD/native fluency.
185
+ - Prosody has no score. Pitch P90-P10 and standard deviation (semitones) are reported
186
+ with >=20 voiced frames and >=2 s audio. Variation does not imply correct intonation.
187
+ - Overall pronunciation and content scores remain null: no calibrated composite,
188
+ stress model, transcript/grammar evaluator or topic evaluator is configured.
189
+
190
+ errors counts phoneme matches/substitutions/omissions/insertions. signal.pauses are
191
+ acoustic intervals, not linguistic unexpected/missing breaks. Consult limitations
192
+ and version=local-diagnostics-v1 before interpreting estimates.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoanghong/speaking-angular",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Ready-to-use online speaking: five languages, microphone realtime and audio upload",
5
5
  "type": "module",
6
6
  "peerDependencies": {
@@ -11,7 +11,7 @@
11
11
  "sideEffects": false,
12
12
  "license": "MIT",
13
13
  "dependencies": {
14
- "@hoanghong/speaking-core": "^0.4.2",
14
+ "@hoanghong/speaking-core": "^0.5.0",
15
15
  "tslib": "^2.3.0"
16
16
  },
17
17
  "publishConfig": {