-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Text-To-Speech 구현 #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements Text-To-Speech functionality by integrating a new audio download service, streamlining UI state management by removing the unused conversion state, and updating the necessary dependency and permission configurations.
- Implements TTS playback and download logic in the LearningViewModel.
- Removes the redundant LearningUiState.isConverting state.
- Adjusts UI components in LearningScreen to support the new TTS flow.
- Adds new repository, use case, and DI configurations for TTS with corresponding updates in the manifest and build files.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
presentation/learning/src/main/java/com/saegil/learning/learning/LearningViewModel.kt | Adds TTS playback functionality, integrates DownloadAudioUseCase, and updates state management. |
presentation/learning/src/main/java/com/saegil/learning/learning/LearningUiState.kt | Removes the unused isConverting state. |
presentation/learning/src/main/java/com/saegil/learning/learning/LearningScreen.kt | Updates UI state handling and modifies recording logic to focus on TTS functionality. |
domain/src/main/java/com/saegil/domain/usecase/DownloadAudioUseCase.kt | Introduces a use case for downloading audio from the TTS service. |
domain/src/main/java/com/saegil/domain/repository/TextToSpeechRepository.kt | Defines the repository interface for TTS functionality. |
data/src/main/java/com/saegil/data/repository/TextToSpeechRepositoryImpl.kt | Implements the TTS repository using the TextToSpeechService. |
data/src/main/java/com/saegil/data/remote/TextToSpeechServiceImpl.kt | Implements the TTS service using the Ktor client to retrieve audio. |
data/src/main/java/com/saegil/data/remote/HttpRoutes.kt | Adds the TTS endpoint route. |
data/src/main/java/com/saegil/data/di/NetworkModule.kt | Provides dependency injection bindings for the TTS service. |
data/src/main/java/com/saegil/data/di/DataModule.kt | Provides DI configuration for the TTS repository. |
app/src/main/AndroidManifest.xml | Adds the RECORD_AUDIO permission required for audio recording. |
app/build.gradle.kts | Increments the versionCode reflecting new changes. |
@@ -181,11 +180,8 @@ fun LearningScreen( | |||
when (state) { | |||
is LearningUiState.Success, is LearningUiState.Idle -> { | |||
RecordButton( | |||
isRecording = state == LearningUiState.isRecording, | |||
isRecording = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RecordButton onClick logic has been removed, which disables the functionality to start/stop recording. If this change is intentional to focus solely on TTS, please add a clarifying comment to explain the expected behavior.
isRecording = false, | |
isRecording = false, | |
// The onClick logic ensures that recording starts if the necessary permissions are granted. | |
// If the focus of the application has shifted to TTS and recording is no longer required, | |
// this logic can be removed, but a clarifying comment should be added to explain the change. |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙇♀️수고 많으셨습니다!
-
RECORD_AUDIO가 재생할때 필요한 권한인가요??
-
convertAndUpload안에서 downloadAudio를 호출하는건 좀 맥락상에서 자연스럽지 않은 것 같아요. convertAndUpload 메소드 이름만 봐서는 진짜 변환하고 업로드만 하는 것 같아서.. 그래서 제가 드리는 제안은
다른 함수에서 convertAndUpload도 호출하고 downloadAudio도 호출하는게 어떨까유???
아니면 convertAndUpload 네이밍을 바꾸면 좋을 것 같아요. 사실 convert는 안드에서 안하니까.. 빼도 될 것 같구.. UploadAndTTS ? UploadAndGetFile? UploadAndGetMp3? 등등...
- 그리구 conflict 있구만유
⭐️ 변경된 내용
LearnUiState
에서isConvert
가 필요없는 것 같아서 제거했습니다.📌 이 부분은 꼭 봐주세요! (Optional)
🏞️ 스크린샷 (Optional)
KakaoTalk_20250509_024448460.mp4