-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from tukcomCD2024/RINGO-110-iOS-translate
RINGO-20 iOS 번역 기능 추가
- Loading branch information
Showing
9 changed files
with
63 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+21.2 KB
(110%)
...odeproj/project.xcworkspace/xcuserdata/jinhyuk.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// TTS.swift | ||
// Ringo | ||
// | ||
// Created by 강진혁 on 3/20/24. | ||
// | ||
|
||
import Foundation | ||
import AVFoundation | ||
|
||
class TTS { | ||
static let shared = TTS() | ||
|
||
private let synthesizer = AVSpeechSynthesizer() | ||
|
||
internal func play(_ string: String, _ language: String) { | ||
let utterance = AVSpeechUtterance(string: string) | ||
utterance.voice = AVSpeechSynthesisVoice(language: language) | ||
utterance.rate = 0.4 | ||
synthesizer.stopSpeaking(at: .immediate) | ||
synthesizer.speak(utterance) | ||
} | ||
|
||
internal func stop() { | ||
synthesizer.stopSpeaking(at: .immediate) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters