[英]Swift - How to save a text file from speech
我正在研究 iOS 中的 Speech to Text 應用程序。
其實我已經做到了,但我的實際問題是當語音轉換為文本時,如何將文本文件保存在 txt 中的指定位置?
guard let path = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false) .appendingPathComponent("Folder/File.txt") else { return } try? "Text".write(to: path, atomically: false, encoding: .utf8)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.