Skip to content

Commit 253a2d4

Browse files
otosaku-aiclaude
andcommitted
v1.0.5: cleanup debug logging, fix resource loading
- Simplify mel_filterbank.bin loading (supports both .copy and .process) - Remove debug print statements - Update README with correct org URL and version 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8cd3210 commit 253a2d4

2 files changed

Lines changed: 5 additions & 15 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Add to your `Package.swift`:
2626

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/niceguy135/NeMoFeatureExtractor-iOS.git", from: "1.0.0")
29+
.package(url: "https://github.com/Otosaku/NeMoFeatureExtractor-iOS.git", from: "1.0.5")
3030
]
3131
```
3232

Sources/NeMoFeatureExtractor/MelFilterbank.swift

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,20 @@ enum NeMoFilterbankLoader {
77
/// Загрузка pre-computed filterbank из bundle resources
88
/// - Returns: filterbank матрица [80, 257], row-major, или nil если файл не найден
99
static func loadFromBundle() -> [Float]? {
10-
print("[NeMoFE] Looking for mel_filterbank.bin...")
11-
1210
// Try with subdirectory first (for .copy), then without (for .process)
13-
var url = Bundle.module.url(
11+
let url = Bundle.module.url(
1412
forResource: "mel_filterbank",
1513
withExtension: "bin",
1614
subdirectory: "Resources"
15+
) ?? Bundle.module.url(
16+
forResource: "mel_filterbank",
17+
withExtension: "bin"
1718
)
1819

19-
if url == nil {
20-
print("[NeMoFE] Not found in Resources/, trying root...")
21-
url = Bundle.module.url(
22-
forResource: "mel_filterbank",
23-
withExtension: "bin"
24-
)
25-
}
26-
2720
guard let url = url else {
28-
print("[NeMoFE] ERROR: mel_filterbank.bin not found in bundle!")
2921
return nil
3022
}
3123

32-
print("[NeMoFE] Found at: \(url.path)")
33-
3424
do {
3525
let data = try Data(contentsOf: url)
3626
// NeMo filterbank: 80 mels x 257 bins = 20560 floats x 4 bytes = 82240 bytes

0 commit comments

Comments
 (0)