mirror of
https://github.com/FluidInference/FluidAudio.git
synced 2026-05-12 20:20:36 +00:00
00ea906c20
## Summary - Remove `mach.module_map` from the `MachTaskSelfWrapper` subspec — CocoaPods does not allow `module_map` on subspecs - Guard `import MachTaskSelfWrapper` with `#if canImport(MachTaskSelfWrapper)`, matching the existing `FastClusterWrapper` pattern - In CocoaPods builds, the C headers are already exposed via the umbrella header, so the explicit module import is only needed under SwiftPM ## Verification - `pod lib lint FluidAudio.podspec --allow-warnings` — **passed** - `swift build` — **passed** Fixes #545 <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/fluidinference/fluidaudio/pull/546" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open in Devin Review"> </picture> </a> <!-- devin-review-badge-end --> Co-authored-by: dianshu <dianshu@123.com>
73 lines
3.0 KiB
Ruby
73 lines
3.0 KiB
Ruby
Pod::Spec.new do |spec|
|
|
spec.name = "FluidAudio"
|
|
spec.version = "0.12.2"
|
|
spec.summary = "Speaker diarization, voice-activity-detection and transcription with CoreML"
|
|
spec.description = <<-DESC
|
|
Fluid Audio is a Swift SDK for fully local, low-latency audio AI on Apple devices,
|
|
with inference offloaded to the Apple Neural Engine (ANE). The SDK includes
|
|
state-of-the-art speaker diarization, transcription, and voice activity detection
|
|
via open-source models that can be integrated with just a few lines of code.
|
|
DESC
|
|
|
|
spec.homepage = "https://github.com/FluidInference/FluidAudio"
|
|
spec.license = { :type => "Apache 2.0", :file => "LICENSE" }
|
|
spec.author = { "FluidInference" => "info@fluidinference.com" }
|
|
|
|
spec.ios.deployment_target = "17.0"
|
|
spec.osx.deployment_target = "14.0"
|
|
|
|
spec.source = { :git => "https://github.com/FluidInference/FluidAudio.git", :tag => "v#{spec.version}" }
|
|
# CocoaPods sets SWIFT_VERSION based on this list; use values Xcode recognizes.
|
|
spec.swift_versions = ["6.0"]
|
|
|
|
spec.pod_target_xcconfig = {
|
|
'DEFINES_MODULE' => 'YES',
|
|
'ARCHS[sdk=macosx*]' => 'arm64',
|
|
'EXCLUDED_ARCHS[sdk=macosx*]' => 'x86_64',
|
|
'ARCHS[sdk=iphonesimulator*]' => 'arm64',
|
|
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 x86_64',
|
|
'ARCHS[sdk=iphoneos*]' => 'arm64'
|
|
}
|
|
|
|
spec.user_target_xcconfig = {
|
|
'ARCHS[sdk=macosx*]' => 'arm64',
|
|
'EXCLUDED_ARCHS[sdk=macosx*]' => 'x86_64',
|
|
'ARCHS[sdk=iphonesimulator*]' => 'arm64',
|
|
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 x86_64',
|
|
'ARCHS[sdk=iphoneos*]' => 'arm64'
|
|
}
|
|
|
|
spec.subspec "FastClusterWrapper" do |wrapper|
|
|
wrapper.requires_arc = false
|
|
wrapper.source_files = "Sources/FastClusterWrapper/**/*.{cpp,h,hpp}"
|
|
wrapper.public_header_files = "Sources/FastClusterWrapper/include/FastClusterWrapper.h"
|
|
wrapper.private_header_files = "Sources/FastClusterWrapper/fastcluster_internal.hpp"
|
|
wrapper.header_mappings_dir = "Sources/FastClusterWrapper"
|
|
wrapper.pod_target_xcconfig = {
|
|
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17'
|
|
}
|
|
end
|
|
|
|
spec.subspec "MachTaskSelfWrapper" do |mach|
|
|
mach.source_files = "Sources/MachTaskSelfWrapper/**/*.{c,h}"
|
|
mach.public_header_files = "Sources/MachTaskSelfWrapper/include/MachTaskSelf.h"
|
|
mach.header_mappings_dir = "Sources/MachTaskSelfWrapper"
|
|
end
|
|
|
|
spec.subspec "Core" do |core|
|
|
core.dependency "#{spec.name}/FastClusterWrapper"
|
|
core.dependency "#{spec.name}/MachTaskSelfWrapper"
|
|
core.source_files = "Sources/FluidAudio/**/*.swift"
|
|
|
|
# iOS Configuration
|
|
# TTS sources are moved under `Sources/FluidAudioTTS` and are not part of the Core subspec.
|
|
# iOS builds include ASR, Diarization, and VAD.
|
|
core.ios.frameworks = "CoreML", "AVFoundation", "Accelerate", "UIKit"
|
|
|
|
# macOS Configuration
|
|
core.osx.frameworks = "CoreML", "AVFoundation", "Accelerate", "Cocoa"
|
|
end
|
|
|
|
spec.default_subspecs = ["Core"]
|
|
end
|