Build Information
Failed to build WWAudioFileTranscription, reference main (28b511), with Swift 6.2 for macOS (SPM) on 17 Aug 2026 14:03:57 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-26.3.0.app xcrun swift build --arch arm64Build Log
========================================
RunAll
========================================
Builder version: undefined version: run 'make version' to update
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/William-Weng/WWAudioFileTranscription.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/William-Weng/WWAudioFileTranscription
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 28b511d - 加入語系可設定功能
Cloned https://github.com/William-Weng/WWAudioFileTranscription.git
Revision (git rev-parse @):
28b511d1435f50d83385ca45f6f81c6aae22972d
SUCCESS checkout https://github.com/William-Weng/WWAudioFileTranscription.git at main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.2
Building package at path: $PWD
https://github.com/William-Weng/WWAudioFileTranscription.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-26.3.0.app xcrun swift build --arch arm64
Building for debugging...
[0/3] Write sources
[1/3] Copying Privacy
[2/3] Write swift-version--3CB7CFEC50E0D141.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/8] Compiling WWAudioFileTranscription Error.swift
[5/8] Compiling WWAudioFileTranscription resource_bundle_accessor.swift
[6/8] Emitting module WWAudioFileTranscription
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:16:51: error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
11 | /// 使用 Apple Speech framework 將音訊檔案轉換成文字
12 | @MainActor
13 | public final class WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing class
14 |
15 | public private(set) var isTranscribing = false // 指示目前是否正在進行音訊轉錄
16 | public private(set) var authorizationStatus = SFSpeechRecognizer.authorizationStatus() // 目前的語音辨識授權狀態
| `- error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
17 |
18 | private var recognizer: SFSpeechRecognizer? // 指定語言的語音辨識器
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:18:29: error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
11 | /// 使用 Apple Speech framework 將音訊檔案轉換成文字
12 | @MainActor
13 | public final class WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing class
14 |
15 | public private(set) var isTranscribing = false // 指示目前是否正在進行音訊轉錄
16 | public private(set) var authorizationStatus = SFSpeechRecognizer.authorizationStatus() // 目前的語音辨識授權狀態
17 |
18 | private var recognizer: SFSpeechRecognizer? // 指定語言的語音辨識器
| `- error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
19 |
20 | private var recognitionTask: SFSpeechRecognitionTask? // 目前正在執行的語音辨識工作
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:20:34: error: 'SFSpeechRecognitionTask' is only available in macOS 10.15 or newer
11 | /// 使用 Apple Speech framework 將音訊檔案轉換成文字
12 | @MainActor
13 | public final class WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing class
14 |
15 | public private(set) var isTranscribing = false // 指示目前是否正在進行音訊轉錄
:
18 | private var recognizer: SFSpeechRecognizer? // 指定語言的語音辨識器
19 |
20 | private var recognitionTask: SFSpeechRecognitionTask? // 目前正在執行的語音辨識工作
| `- error: 'SFSpeechRecognitionTask' is only available in macOS 10.15 or newer
21 | private var recognitionRequest: SFSpeechURLRecognitionRequest? // 目前使用中的音訊檔案辨識請求
22 |
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:21:37: error: 'SFSpeechURLRecognitionRequest' is only available in macOS 10.15 or newer
11 | /// 使用 Apple Speech framework 將音訊檔案轉換成文字
12 | @MainActor
13 | public final class WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing class
14 |
15 | public private(set) var isTranscribing = false // 指示目前是否正在進行音訊轉錄
:
19 |
20 | private var recognitionTask: SFSpeechRecognitionTask? // 目前正在執行的語音辨識工作
21 | private var recognitionRequest: SFSpeechURLRecognitionRequest? // 目前使用中的音訊檔案辨識請求
| `- error: 'SFSpeechURLRecognitionRequest' is only available in macOS 10.15 or newer
22 |
23 | private var securityScopedURL: URL? // 目前正在使用的 security-scoped 音訊檔案 URL
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:109:126: error: 'SFSpeechRecognitionTaskHint' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
107 | /// - Note:
108 | /// 一次只能執行一個轉錄工作;如果目前已經有其他轉錄工作正在執行,callback 會收到 `.transcriptionInProgress` 錯誤
109 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation, result: @escaping (Result<TranscriptResult, TranscriptError>) -> Void) {
| | `- error: 'SFSpeechRecognitionTaskHint' is only available in macOS 10.15 or newer
| `- note: add '@available' attribute to enclosing instance method
110 |
111 | guard !isTranscribing else { return result(.failure(.transcriptionInProgress)) }
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:173:126: error: 'SFSpeechRecognitionTaskHint' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
171 | /// - Note:
172 | /// 當辨識完成、發生錯誤,或外部取消 stream 時,stream 會結束
173 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation) -> AsyncThrowingStream<TranscriptResult, any Error> {
| | `- error: 'SFSpeechRecognitionTaskHint' is only available in macOS 10.15 or newer
| `- note: add '@available' attribute to enclosing instance method
174 |
175 | AsyncThrowingStream { continuation in
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:173:171: error: 'AsyncThrowingStream' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
171 | /// - Note:
172 | /// 當辨識完成、發生錯誤,或外部取消 stream 時,stream 會結束
173 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation) -> AsyncThrowingStream<TranscriptResult, any Error> {
| | `- error: 'AsyncThrowingStream' is only available in macOS 10.15 or newer
| `- note: add '@available' attribute to enclosing instance method
174 |
175 | AsyncThrowingStream { continuation in
[7/8] Compiling WWAudioFileTranscription Model.swift
[8/8] Compiling WWAudioFileTranscription WWAudioFileTranscription.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:16:51: error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
11 | /// 使用 Apple Speech framework 將音訊檔案轉換成文字
12 | @MainActor
13 | public final class WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing class
14 |
15 | public private(set) var isTranscribing = false // 指示目前是否正在進行音訊轉錄
16 | public private(set) var authorizationStatus = SFSpeechRecognizer.authorizationStatus() // 目前的語音辨識授權狀態
| `- error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
17 |
18 | private var recognizer: SFSpeechRecognizer? // 指定語言的語音辨識器
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:18:29: error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
11 | /// 使用 Apple Speech framework 將音訊檔案轉換成文字
12 | @MainActor
13 | public final class WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing class
14 |
15 | public private(set) var isTranscribing = false // 指示目前是否正在進行音訊轉錄
16 | public private(set) var authorizationStatus = SFSpeechRecognizer.authorizationStatus() // 目前的語音辨識授權狀態
17 |
18 | private var recognizer: SFSpeechRecognizer? // 指定語言的語音辨識器
| `- error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
19 |
20 | private var recognitionTask: SFSpeechRecognitionTask? // 目前正在執行的語音辨識工作
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:20:34: error: 'SFSpeechRecognitionTask' is only available in macOS 10.15 or newer
11 | /// 使用 Apple Speech framework 將音訊檔案轉換成文字
12 | @MainActor
13 | public final class WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing class
14 |
15 | public private(set) var isTranscribing = false // 指示目前是否正在進行音訊轉錄
:
18 | private var recognizer: SFSpeechRecognizer? // 指定語言的語音辨識器
19 |
20 | private var recognitionTask: SFSpeechRecognitionTask? // 目前正在執行的語音辨識工作
| `- error: 'SFSpeechRecognitionTask' is only available in macOS 10.15 or newer
21 | private var recognitionRequest: SFSpeechURLRecognitionRequest? // 目前使用中的音訊檔案辨識請求
22 |
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:21:37: error: 'SFSpeechURLRecognitionRequest' is only available in macOS 10.15 or newer
11 | /// 使用 Apple Speech framework 將音訊檔案轉換成文字
12 | @MainActor
13 | public final class WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing class
14 |
15 | public private(set) var isTranscribing = false // 指示目前是否正在進行音訊轉錄
:
19 |
20 | private var recognitionTask: SFSpeechRecognitionTask? // 目前正在執行的語音辨識工作
21 | private var recognitionRequest: SFSpeechURLRecognitionRequest? // 目前使用中的音訊檔案辨識請求
| `- error: 'SFSpeechURLRecognitionRequest' is only available in macOS 10.15 or newer
22 |
23 | private var securityScopedURL: URL? // 目前正在使用的 security-scoped 音訊檔案 URL
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:109:126: error: 'SFSpeechRecognitionTaskHint' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
107 | /// - Note:
108 | /// 一次只能執行一個轉錄工作;如果目前已經有其他轉錄工作正在執行,callback 會收到 `.transcriptionInProgress` 錯誤
109 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation, result: @escaping (Result<TranscriptResult, TranscriptError>) -> Void) {
| | `- error: 'SFSpeechRecognitionTaskHint' is only available in macOS 10.15 or newer
| `- note: add '@available' attribute to enclosing instance method
110 |
111 | guard !isTranscribing else { return result(.failure(.transcriptionInProgress)) }
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:173:126: error: 'SFSpeechRecognitionTaskHint' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
171 | /// - Note:
172 | /// 當辨識完成、發生錯誤,或外部取消 stream 時,stream 會結束
173 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation) -> AsyncThrowingStream<TranscriptResult, any Error> {
| | `- error: 'SFSpeechRecognitionTaskHint' is only available in macOS 10.15 or newer
| `- note: add '@available' attribute to enclosing instance method
174 |
175 | AsyncThrowingStream { continuation in
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:173:171: error: 'AsyncThrowingStream' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
171 | /// - Note:
172 | /// 當辨識完成、發生錯誤,或外部取消 stream 時,stream 會結束
173 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation) -> AsyncThrowingStream<TranscriptResult, any Error> {
| | `- error: 'AsyncThrowingStream' is only available in macOS 10.15 or newer
| `- note: add '@available' attribute to enclosing instance method
174 |
175 | AsyncThrowingStream { continuation in
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:39:22: error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
11 | /// 使用 Apple Speech framework 將音訊檔案轉換成文字
12 | @MainActor
13 | public final class WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing class
14 |
15 | public private(set) var isTranscribing = false // 指示目前是否正在進行音訊轉錄
:
36 | /// - Important:
37 | /// 建議根據音訊內容指定正確的語言,以取得較好的辨識結果
38 | public init(locale: Locale = .current) {
| `- note: add '@available' attribute to enclosing initializer
39 | recognizer = SFSpeechRecognizer(locale: locale)
| |- error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
40 | }
41 |
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:60:28: error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
48 |
49 | // MARK: - 公開屬性
50 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
51 |
52 | /// 指示目前是否已取得語音辨識權限
:
56 | ///
57 | /// 設定新的語系後,會使用指定的語系,建立新的 `SFSpeechRecognizer`
58 | var locale: Locale {
| `- note: add '@available' attribute to enclosing property
59 | get { recognizer?.locale ?? .current }
60 | set { recognizer = SFSpeechRecognizer(locale: newValue) }
| |- error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:82:28: error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
78 | /// - Note:
79 | /// 這個方法只請求語音辨識權限,如果使用即時麥克風錄音,還需要另外請求麥克風權限
80 | func requestAuthorization() async {
| `- note: add '@available' attribute to enclosing instance method
81 |
82 | let status = await withCheckedContinuation { continuation in
| |- error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
83 | SFSpeechRecognizer.requestAuthorization { status in
84 | continuation.resume(returning: status)
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:83:13: error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
78 | /// - Note:
79 | /// 這個方法只請求語音辨識權限,如果使用即時麥克風錄音,還需要另外請求麥克風權限
80 | func requestAuthorization() async {
| `- note: add '@available' attribute to enclosing instance method
81 |
82 | let status = await withCheckedContinuation { continuation in
83 | SFSpeechRecognizer.requestAuthorization { status in
| |- error: 'SFSpeechRecognizer' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
84 | continuation.resume(returning: status)
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:82:53: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:82:52: note: expanded code originates here
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
78 | /// - Note:
79 | /// 這個方法只請求語音辨識權限,如果使用即時麥克風錄音,還需要另外請求麥克風權限
80 | func requestAuthorization() async {
| `- note: add '@available' attribute to enclosing instance method
81 |
82 | let status = await withCheckedContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift
|80 |
|81 |
|82 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+---------------------------------------------------------------------------------------------------------------
83 | SFSpeechRecognizer.requestAuthorization { status in
84 | continuation.resume(returning: status)
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:119:23: error: 'SFSpeechURLRecognitionRequest' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
107 | /// - Note:
108 | /// 一次只能執行一個轉錄工作;如果目前已經有其他轉錄工作正在執行,callback 會收到 `.transcriptionInProgress` 錯誤
109 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation, result: @escaping (Result<TranscriptResult, TranscriptError>) -> Void) {
| `- note: add '@available' attribute to enclosing instance method
110 |
111 | guard !isTranscribing else { return result(.failure(.transcriptionInProgress)) }
:
117 | cleanup()
118 |
119 | let request = SFSpeechURLRecognitionRequest(url: audioFileURL)
| |- error: 'SFSpeechURLRecognitionRequest' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
120 |
121 | request.shouldReportPartialResults = shouldReportPartialResults
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:133:13: error: 'Task' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
107 | /// - Note:
108 | /// 一次只能執行一個轉錄工作;如果目前已經有其他轉錄工作正在執行,callback 會收到 `.transcriptionInProgress` 錯誤
109 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation, result: @escaping (Result<TranscriptResult, TranscriptError>) -> Void) {
| `- note: add '@available' attribute to enclosing instance method
110 |
111 | guard !isTranscribing else { return result(.failure(.transcriptionInProgress)) }
:
131 | recognitionTask = recognizer.recognitionTask(with: request) { [weak self] recognitionResult, error in
132 |
133 | Task { @MainActor [weak self] in
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
134 |
135 | guard let self else { return }
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:133:13: error: 'init(name:priority:operation:)' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
107 | /// - Note:
108 | /// 一次只能執行一個轉錄工作;如果目前已經有其他轉錄工作正在執行,callback 會收到 `.transcriptionInProgress` 錯誤
109 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation, result: @escaping (Result<TranscriptResult, TranscriptError>) -> Void) {
| `- note: add '@available' attribute to enclosing instance method
110 |
111 | guard !isTranscribing else { return result(.failure(.transcriptionInProgress)) }
:
131 | recognitionTask = recognizer.recognitionTask(with: request) { [weak self] recognitionResult, error in
132 |
133 | Task { @MainActor [weak self] in
| |- error: 'init(name:priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
134 |
135 | guard let self else { return }
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:175:9: error: 'AsyncThrowingStream' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
171 | /// - Note:
172 | /// 當辨識完成、發生錯誤,或外部取消 stream 時,stream 會結束
173 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation) -> AsyncThrowingStream<TranscriptResult, any Error> {
| `- note: add '@available' attribute to enclosing instance method
174 |
175 | AsyncThrowingStream { continuation in
| |- error: 'AsyncThrowingStream' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
176 |
177 | continuation.onTermination = { @Sendable [weak self] _ in
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:178:17: error: 'Task' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
171 | /// - Note:
172 | /// 當辨識完成、發生錯誤,或外部取消 stream 時,stream 會結束
173 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation) -> AsyncThrowingStream<TranscriptResult, any Error> {
| `- note: add '@available' attribute to enclosing instance method
174 |
175 | AsyncThrowingStream { continuation in
176 |
177 | continuation.onTermination = { @Sendable [weak self] _ in
178 | Task { @MainActor [weak self] in self?.cancel() }
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
179 | }
180 |
/Users/admin/builder/spi-builder-workspace/Sources/WWAudioFileTranscription/WWAudioFileTranscription.swift:178:17: error: 'init(name:priority:operation:)' is only available in macOS 10.15 or newer
63 |
64 | // MARK: - 公開API
65 | public extension WWAudioFileTranscription {
| `- note: add '@available' attribute to enclosing extension
66 |
67 | /// 請求使用語音辨識的授權
:
171 | /// - Note:
172 | /// 當辨識完成、發生錯誤,或外部取消 stream 時,stream 會結束
173 | func transcribe(audioFileURL: URL, shouldReportPartialResults: Bool = false, contextualStrings: [String] = [], taskHint: SFSpeechRecognitionTaskHint = .dictation) -> AsyncThrowingStream<TranscriptResult, any Error> {
| `- note: add '@available' attribute to enclosing instance method
174 |
175 | AsyncThrowingStream { continuation in
176 |
177 | continuation.onTermination = { @Sendable [weak self] _ in
178 | Task { @MainActor [weak self] in self?.cancel() }
| |- error: 'init(name:priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
179 | }
180 |
BUILD FAILURE 6.2 macosSpm