Skip to content

v0.15.6 fails to compile on macOS x86_64 due to unguarded Float16 usage #875

Description

@ertra

Environment

  • FluidAudio: v0.15.6 (4dbf4f9)
  • macOS: 15.7.9 (24G830)
  • Architecture: Intel x86_64
  • Xcode: 26.3 (17C529)
  • Swift: 6.2.4 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)

Reproduction

git clone --branch v0.15.6 --depth 1 https://github.com/FluidInference/FluidAudio.git
cd FluidAudio
swift build

Actual result

The FluidAudio target fails to compile because Swift.Float16 is unavailable for macOS x86_64.

Unique failing locations include:

  • Sources/FluidAudio/ASR/Paraformer/ParaformerManager.swift:477,481
  • Sources/FluidAudio/ASR/Shared/LogitsArgmax.swift:35,44
  • Sources/FluidAudio/TTS/NeuTts/NeuTtsSynthesizer.swift:170,172,230,231

Representative error:

Sources/FluidAudio/ASR/Paraformer/ParaformerManager.swift:477:61: error: 'Float16' is unavailable in macOS
let p = arr.dataPointer.assumingMemoryBound(to: Float16.self)
                                                            ^
Swift.Float16:4:23: note: 'Float16' has been explicitly marked unavailable here

The NeuTTS path also reports argument passed to call that takes no arguments for Float16(base[i]), and the dependent Float(...) conversions report no exact matches in call to initializer.

Expected result

FluidAudio should continue compiling for macOS x86_64. Version 0.15.5 builds successfully on the same machine.

This also prevents downstream applications from producing universal arm64 x86_64 macOS builds, even when they do not use Paraformer or NeuTTS, because these sources are part of the monolithic FluidAudio target.

Additional verification

  • v0.15.5 downstream x86_64 application build and test suite: succeeds
  • v0.15.6 arm64 application build: succeeds
  • v0.15.6 arm64 test-target compilation: succeeds
  • v0.15.6 standalone swift build on x86_64: fails with the errors above

An x86_64 compile job or universal archive smoke test would help prevent this regression from recurring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions