From 7941a24074b0bb25d502ad7d175f30c7ada5b3c8 Mon Sep 17 00:00:00 2001 From: haeon Date: Wed, 26 Nov 2025 10:55:36 +0900 Subject: [PATCH] fix array type --- ios/ExampleiOSApp/TTSService.swift | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ios/ExampleiOSApp/TTSService.swift b/ios/ExampleiOSApp/TTSService.swift index 5d3189e..fc683c0 100644 --- a/ios/ExampleiOSApp/TTSService.swift +++ b/ios/ExampleiOSApp/TTSService.swift @@ -4,10 +4,6 @@ import OnnxRuntimeBindings final class TTSService { enum Voice { case male, female } - struct Settings { - var nTest: Int = 1 - } - struct SynthesisResult { let url: URL let elapsedSeconds: Double @@ -43,15 +39,15 @@ final class TTSService { } } - func synthesize(text: String, nfe: Int, voice: Voice, settings: Settings = Settings()) async throws -> SynthesisResult { + func synthesize(text: String, nfe: Int, voice: Voice) async throws -> SynthesisResult { let tic = Date() // 1) Get or compute style for the selected voice let style = try getStyle(voice: voice) // 2) Synthesize via packed TextToSpeech component - let (wav, duration) = try textToSpeech.call([text], style, nfe) - let audioSeconds = Double(duration[0]) + let (wav, duration) = try textToSpeech.call(text, style, nfe) + let audioSeconds = Double(duration) let wavLenSample = min(Int(Double(sampleRate) * audioSeconds), wav.count) let wavOut = Array(wav[0..