Please use the following script to build `sherpa-onnx`_ for Swift API:
https://github.com/k2-fsa/sherpa-onnx/blob/master/build-swift-macos.sh
The following is an example command:
git clone https://github.com/k2-fsa/sherpa-onnx cd sherpa-onnx ./build-swift-macos.sh