mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-08 06:42:53 +00:00
Adds a default-enabled SwiftPM Talk trait for OpenClawKit so chat-only consumers can opt out with traits: [] and avoid resolving ElevenLabsKit. Default traits preserve existing talk/TTS API and bundled app behavior; macOS CI now verifies the trait-off dependency graph and build. Verification: - CI at85f00ebc04passed macos-swift and Real behavior proof. - Local Swift 6.3.2: trait-off dependency graph omitted ElevenLabsKit; full swift build with default traits disabled built through OpenClawChatUI; default dependency graph still included ElevenLabsKit; trait-off OpenClawKit target build passed. - merge-tree against latest origin/main4eba3e5d7dwas clean. - Current main already fails plugin-SDK declaration gates in unrelated TS files; reproduced locally with node scripts/run-tsgo.mjs -p tsconfig.plugin-sdk.dts.json --declaration true. Thanks @mochiexists. Co-authored-by: mochiexists <259077624+mochiexists@users.noreply.github.com> Co-authored-by: atlascodesai <76924051+atlascodesai@users.noreply.github.com>
19 lines
518 B
Swift
19 lines
518 B
Swift
#if Talk
|
|
import Foundation
|
|
|
|
@MainActor
|
|
public protocol StreamingAudioPlaying {
|
|
func play(stream: AsyncThrowingStream<Data, Error>) async -> StreamingPlaybackResult
|
|
func stop() -> Double?
|
|
}
|
|
|
|
@MainActor
|
|
public protocol PCMStreamingAudioPlaying {
|
|
func play(stream: AsyncThrowingStream<Data, Error>, sampleRate: Double) async -> StreamingPlaybackResult
|
|
func stop() -> Double?
|
|
}
|
|
|
|
extension StreamingAudioPlayer: StreamingAudioPlaying {}
|
|
extension PCMStreamingAudioPlayer: PCMStreamingAudioPlaying {}
|
|
#endif
|