tts: add native tts plugin for Android (#1376)

This commit is contained in:
Huang Xin 2025-06-09 22:54:12 +08:00 committed by GitHub
parent 69d418aa61
commit f8ac30adf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 2256 additions and 3 deletions

View file

@ -0,0 +1,20 @@
import SwiftRs
import Tauri
import UIKit
import WebKit
class PingArgs: Decodable {
let value: String?
}
class NativeTTSPlugin: Plugin {
@objc public func ping(_ invoke: Invoke) throws {
let args = try invoke.parseArgs(PingArgs.self)
invoke.resolve(["value": args.value ?? ""])
}
}
@_cdecl("init_plugin_native_tts")
func initPlugin() -> Plugin {
return NativeTTSPlugin()
}