Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Button/btn_Day1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_Day2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_Day3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_Review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_cl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_exp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_help.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_listen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_next_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_next_blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_next_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_pass.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_re.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_speak.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/btn_word.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Button/listen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
108 changes: 100 additions & 8 deletions HHJ_Capstone_2020.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
"size" : "20x20"
},
{
"filename" : "Logo_58px.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "Logo_87px.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
204 changes: 130 additions & 74 deletions HHJ_Capstone_2020/Base.lproj/Main.storyboard

Large diffs are not rendered by default.

25 changes: 11 additions & 14 deletions HHJ_Capstone_2020/Day1/Day1_3.0.15.0.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,33 @@ class Day1_3_0_15_0: UIViewController {
NotificationCenter.default.addObserver(self,selector:Selector(("playerDidFinishPlaying")), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: url)
sound.prepareToPlay()
sound.play()
if sound.play() {
nextButton.isHidden = true
}

} catch let error {
print(error.localizedDescription)
}
}
}

// @objc func playerDidFinishPlaying(sender: Notification) {
// // Your code here
// // isHidden = false 면 보여준다
// nextButton.isHidden = false
//
// }
@objc func playerDidFinishPlaying(sender: Notification) {
// Your code here
// isHidden = false 면 보여준다
nextButton.isHidden = false

}
func playerDidFinishPlaying() {
// Your code here
nextButton.isHidden = false
}
override func viewDidLoad() {
// Do any additional setup after loading the view.
super.viewDidLoad()

// nextButton.isHidden = true // 화면 처음 실행할 때는 "다음페이지"버튼 숨기기
playAudio()
// Do any additional setup after loading the view.
nextButton.isHidden = true
playerDidFinishPlaying()
// playerDidFinishPlaying()
// nextButton.isHidden = true

}


/*
// MARK: - Navigation
Expand Down
37 changes: 15 additions & 22 deletions HHJ_Capstone_2020/Day1/Day1_3_1_ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Day1_3_1_ViewController: UIViewController, SFSpeechRecognizerDelegate {
@IBOutlet weak var nextButton: UIButton!

@IBAction func nextPage (_ sender: Any ) {
if record_count <= 6 {
if record_count <= 5 {
nextButton.isHidden = true
}
else {
Expand All @@ -33,7 +33,7 @@ class Day1_3_1_ViewController: UIViewController, SFSpeechRecognizerDelegate {
}
// 변수
var user_recorded: String! // 사용자가 말한 문장 저장
var record_count: Int! = 1 // 말하는 횟수 제한
var record_count: Int! = 0 // 말하는 횟수 제한


// 말한 것을 인식
Expand Down Expand Up @@ -64,53 +64,46 @@ class Day1_3_1_ViewController: UIViewController, SFSpeechRecognizerDelegate {
let answer_split = answer?.split(separator: " ")
let user_recorded_split = user_recorded?.split(separator: " ")

if answer_split == user_recorded_split {
if record_count == 2 {
if answer_split == user_recorded_split { // 일치 할 경우
if record_count == 1 {
firstImg.backgroundColor = UIColor.blue
}
else if record_count == 3 {
else if record_count == 2 {
secondImg.backgroundColor = UIColor.blue
}
else if record_count == 4 {
else if record_count == 3 {
thirdImg.backgroundColor = UIColor.blue
}
else if record_count == 5 {
else if record_count == 4 {
fourthImg.backgroundColor = UIColor.blue
}
else if record_count == 6 {
else if record_count == 5 {
fifthImg.backgroundColor = UIColor.blue
}
else {
// 혹시나 6번 할까봐
}

}
else {
if record_count == 2 {
else { // 불일치 할 경우
if record_count == 1 {
firstImg.backgroundColor = UIColor.red
}
else if record_count == 3 {
else if record_count == 2 {
secondImg.backgroundColor = UIColor.red
}
else if record_count == 4 {
else if record_count == 3 {
thirdImg.backgroundColor = UIColor.red
}
else if record_count == 5 {
else if record_count == 4 {
fourthImg.backgroundColor = UIColor.red
}
else if record_count == 6 {
else if record_count == 5 {
fifthImg.backgroundColor = UIColor.red
}
else {
// 혹시나 6번 할까봐
}
}
}

// MARK: - Speech To Text
@IBAction func speechToText(_ sender: Any) {
// 횟수 제한
if record_count <= 6 {
if record_count <= 5 {
if audioEngine.isRunning { // 현재 음성인식 수행중이라면
audioEngine.stop() // 오디오 입력 중단
recognitionRequest?.endAudio() // 음성인식 역시 중단
Expand Down
10 changes: 6 additions & 4 deletions HHJ_Capstone_2020/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Zedd&apos;s App</string>
<key>NSMicrophoneUsageDescription</key>
<string>test</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>고운영어</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand All @@ -24,6 +22,10 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMicrophoneUsageDescription</key>
<string>test</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Zedd's App</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
1 change: 0 additions & 1 deletion HHJ_Capstone_2020/Main/DayMenuViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import UIKit

class DayMenuViewController: UIViewController {


@IBOutlet weak var chapterLabel: UILabel!

var receiveItem = ""
Expand Down
Binary file added Image/background_day.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/background_home.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/hm_a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/hm_b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/picture16.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.