fix(audio): update CoreML bridge for SileroVADRunner rename
Aligns with silero-coreml class rename to avoid CoreML type collision.
This commit is contained in:
@@ -3,11 +3,11 @@ import Foundation
|
|||||||
import SileroCoreML
|
import SileroCoreML
|
||||||
|
|
||||||
private final class ChanoraSileroVadBox {
|
private final class ChanoraSileroVadBox {
|
||||||
let vad: SileroVAD
|
let vad: SileroVADRunner
|
||||||
|
|
||||||
init() throws {
|
init() throws {
|
||||||
let configuration = MLModelConfiguration()
|
let configuration = MLModelConfiguration()
|
||||||
vad = try SileroVAD(configuration: configuration)
|
vad = try SileroVADRunner(configuration: configuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,8 +67,8 @@ public func chanoraSileroVadProcess(
|
|||||||
setChanoraSileroLastError("SileroVAD probability output pointer is null")
|
setChanoraSileroLastError("SileroVAD probability output pointer is null")
|
||||||
return -3
|
return -3
|
||||||
}
|
}
|
||||||
guard sampleCount == SileroVAD.chunkSize else {
|
guard sampleCount == SileroVADRunner.chunkSize else {
|
||||||
setChanoraSileroLastError("SileroVAD expected \(SileroVAD.chunkSize) samples, got \(sampleCount)")
|
setChanoraSileroLastError("SileroVAD expected \(SileroVADRunner.chunkSize) samples, got \(sampleCount)")
|
||||||
return -4
|
return -4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import Foundation
|
|||||||
import SileroCoreML
|
import SileroCoreML
|
||||||
|
|
||||||
private final class ChanoraSileroVadBox {
|
private final class ChanoraSileroVadBox {
|
||||||
let vad: SileroVAD
|
let vad: SileroVADRunner
|
||||||
|
|
||||||
init() throws {
|
init() throws {
|
||||||
let configuration = MLModelConfiguration()
|
let configuration = MLModelConfiguration()
|
||||||
vad = try SileroVAD(configuration: configuration)
|
vad = try SileroVADRunner(configuration: configuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,8 +67,8 @@ public func chanoraSileroVadProcess(
|
|||||||
setChanoraSileroLastError("SileroVAD probability output pointer is null")
|
setChanoraSileroLastError("SileroVAD probability output pointer is null")
|
||||||
return -3
|
return -3
|
||||||
}
|
}
|
||||||
guard sampleCount == SileroVAD.chunkSize else {
|
guard sampleCount == SileroVADRunner.chunkSize else {
|
||||||
setChanoraSileroLastError("SileroVAD expected \(SileroVAD.chunkSize) samples, got \(sampleCount)")
|
setChanoraSileroLastError("SileroVAD expected \(SileroVADRunner.chunkSize) samples, got \(sampleCount)")
|
||||||
return -4
|
return -4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user