-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: Cast 엔티티 수정 Voice와 Formality 분리 * add: tts 기능 구현 용 파일 추가 * fix: 파일 구조 오류 수정 * fix: tts 로직 임시 구현(파싱 로직 구현 후 refactoring 예정) * add: dto로 요청 값 받기 * feat: 스크립트 생성 기능 (#21) * fix: voice 칼럼 String으로 변경 * add: OpenAI 라이브러리 https://github.com/TheoKanning/openai-java * add: validation 라이브러리 추가 @Valid가 작동 안하길래 찾아봤는데 springboot-starter-validation 라이브러리를 따로 추가해야된다고 함 * feat: ScriptService 추가 - 캐스트 생성 요청은 CastCreationRequestDTO로 받음 - 프롬프트 생성 (ChatGPTPromptGenerator) - 스크립트 생성 (ChatGPTScriptGenerator) - ScriptService로 묶음 * add: CastController, CastService 추가 - 회의때 얘기한 클래스 구조로 ㄱㄱ * fix: 수정사항 반영 - CastController에 raiseError 함수 삭제 - OpenAiService 응답 대기 시간 30초로 늘림 * add: @구분자를 통한 parsing 로직 구현 * add: script parsing 후 time point marking 후 ssml요청 로직 구현 * add: ssml 결과물(mp3) 파일 프로젝트 내부(임시)에 저장 로직 구현 * fix: 코드 정리 * add: sentence에 timepoint column 추가 * update: mp3 파일 무시 * add: script 번역 기능 구현 (#28) * feat: S3 관련 파일 업로드 설정 (#34) * fix: ci/cd 구축 변경 (#31) * add: S3 설정 추가 및 mp3 upload 로직 반영 * fix: 불필요한 코드 정리 * feat: 캐스트 재생 (스트리밍) (#33) * feat: streaming 기능 추가 * add: 테스트용 파일 추가 - 나중에 삭제 해주세용 * add: 스트리밍 API 추가 - 일단 ~/stream-test랑 ~/stream/{filename}으로 정함 * fix: filePath 문자열로 타입 변경 * add: castId 스트리밍 추가 * add : sentence entity 저장 로직 * add : voice code enum 처리 * [FEATURE] Voice Enum 처리 & Sentence save 로직 구현 (#36) * add : sentence entity 저장 로직 * add : voice code enum 처리 --------- Co-authored-by: yuuddin <[email protected]> * add: 필요한 DTO/서비스/리포지토리 선언 - CastPlaylistRepository/Service - CastSaveDTO / CastUpdateDTO - PlaylistRepository - ScriptCastCreationDTO - KeywordCastCreationDTO * add: Cast 필요 메소드 - update(): 정보 수정 - updateHits(): 조회수 증가 * feat: cast api 구현 * fix: Cast에 Sentence 매핑 추가 + 연관관계 편의 메소드 * fix: 컬렉션 초기화 안되는 문제 Lombok에서 @builder 쓸 때 컬렉션 초기화하려면 - final이거나 - @Builder.Default 붙이거나 해야되는데 일단 후자로 했습니다 * update: API가 엔티티 대신 dto 반환하도록 변경 * add: DTO 클래스 추가 * feat: 캐스트 스크립트 검색 API 추가 - GET /cast/{id}/script로 해당 캐스트 스크립트 가져옴 - 캐스트 재생은 GET /cast/{id}에서 GET /cast/{id}/audio로 변경 (일관성) - 이에 따른 SentenceService, SentenceRepository 등 변경 * feat: Cast API 구현 (#37) * add: 필요한 DTO/서비스/리포지토리 선언 - CastPlaylistRepository/Service - CastSaveDTO / CastUpdateDTO - PlaylistRepository - ScriptCastCreationDTO - KeywordCastCreationDTO * add: Cast 필요 메소드 - update(): 정보 수정 - updateHits(): 조회수 증가 * feat: cast api 구현 * fix: Cast에 Sentence 매핑 추가 + 연관관계 편의 메소드 * fix: 컬렉션 초기화 안되는 문제 Lombok에서 @builder 쓸 때 컬렉션 초기화하려면 - final이거나 - @Builder.Default 붙이거나 해야되는데 일단 후자로 했습니다 * update: API가 엔티티 대신 dto 반환하도록 변경 * add: DTO 클래스 추가 * feat: 캐스트 스크립트 검색 API 추가 - GET /cast/{id}/script로 해당 캐스트 스크립트 가져옴 - 캐스트 재생은 GET /cast/{id}에서 GET /cast/{id}/audio로 변경 (일관성) - 이에 따른 SentenceService, SentenceRepository 등 변경 * fix : cast 생성 로직 수정 * add : cast audi length 입력 * fix: multipartfile 입력 형태 수정 * fix: 코드 정리 * fix: CastScriptDTO에 스크립트가 비는 문제 해결 - sentenceService.save()가 List<Sentence>를 반환하도록 변경 * add: StringUtil 추가 - String 비었는지 확인하는 기능 * add: deleteCast 추가, setCastImage 추가 * fix: update 조건 수정 - blank가 아닐 떄 수정해야하는데 그 반대로 하고 있었네.. * fix: CastPlaylist 동일한 행 존재하면 기각 * fix: Long playlistId 검사조건 @NotNull로 변경 * update: 수정, 저장, 삭제 API 추가 + @RequestPart 오류 수정 + stream에 @crossorigin 추가 * fix: stream 기능 업데이트 - aws에 파일 업로드함에 따른 변경 * feat: Cast API 완성 (#42) * add : sentence entity 저장 로직 * add : voice code enum 처리 * add: 필요한 DTO/서비스/리포지토리 선언 - CastPlaylistRepository/Service - CastSaveDTO / CastUpdateDTO - PlaylistRepository - ScriptCastCreationDTO - KeywordCastCreationDTO * add: Cast 필요 메소드 - update(): 정보 수정 - updateHits(): 조회수 증가 * feat: cast api 구현 * fix: Cast에 Sentence 매핑 추가 + 연관관계 편의 메소드 * fix: 컬렉션 초기화 안되는 문제 Lombok에서 @builder 쓸 때 컬렉션 초기화하려면 - final이거나 - @Builder.Default 붙이거나 해야되는데 일단 후자로 했습니다 * update: API가 엔티티 대신 dto 반환하도록 변경 * add: DTO 클래스 추가 * feat: 캐스트 스크립트 검색 API 추가 - GET /cast/{id}/script로 해당 캐스트 스크립트 가져옴 - 캐스트 재생은 GET /cast/{id}에서 GET /cast/{id}/audio로 변경 (일관성) - 이에 따른 SentenceService, SentenceRepository 등 변경 * fix : cast 생성 로직 수정 * add : cast audi length 입력 * fix: multipartfile 입력 형태 수정 * fix: 코드 정리 * fix: CastScriptDTO에 스크립트가 비는 문제 해결 - sentenceService.save()가 List<Sentence>를 반환하도록 변경 * add: StringUtil 추가 - String 비었는지 확인하는 기능 * add: deleteCast 추가, setCastImage 추가 * fix: update 조건 수정 - blank가 아닐 떄 수정해야하는데 그 반대로 하고 있었네.. * fix: CastPlaylist 동일한 행 존재하면 기각 * fix: Long playlistId 검사조건 @NotNull로 변경 * update: 수정, 저장, 삭제 API 추가 + @RequestPart 오류 수정 + stream에 @crossorigin 추가 * fix: stream 기능 업데이트 - aws에 파일 업로드함에 따른 변경 --------- Co-authored-by: yuuddin <[email protected]> * fix: 머지 중 오류 변경 --------- Co-authored-by: yuuddin <[email protected]> Co-authored-by: yuuddin <[email protected]> Co-authored-by: yuuddin <[email protected]>
- Loading branch information
1 parent
822a967
commit f3d3d26
Showing
42 changed files
with
1,342 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,5 @@ out/ | |
.vscode/ | ||
|
||
### 추가로 무시할 파일 ### | ||
*.yml | ||
*.yml | ||
*.mp3 |
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
14 changes: 14 additions & 0 deletions
14
src/main/java/com/umc/owncast/common/config/AppConfig.java
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,14 @@ | ||
package com.umc.owncast.common.config; | ||
|
||
import org.springframework.boot.web.client.RestTemplateBuilder; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.client.RestTemplate; | ||
|
||
@Configuration | ||
public class AppConfig { | ||
@Bean | ||
public RestTemplate restTemplate(RestTemplateBuilder builder) { | ||
return builder.build(); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/com/umc/owncast/common/config/AwsS3Config.java
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,31 @@ | ||
package com.umc.owncast.common.config; | ||
|
||
import com.amazonaws.auth.AWSCredentials; | ||
import com.amazonaws.auth.AWSStaticCredentialsProvider; | ||
import com.amazonaws.auth.BasicAWSCredentials; | ||
import com.amazonaws.services.s3.AmazonS3Client; | ||
import com.amazonaws.services.s3.AmazonS3ClientBuilder; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class AwsS3Config { | ||
@Value("${cloud.aws.credentials.access-key}") | ||
private String accessKey; | ||
|
||
@Value("${cloud.aws.credentials.secret-key}") | ||
private String secretKey; | ||
|
||
@Value("${cloud.aws.region.static}") | ||
private String region; | ||
|
||
@Bean | ||
public AmazonS3Client amazonS3Client() { | ||
AWSCredentials awsCreds = new BasicAWSCredentials(accessKey, secretKey); | ||
return (AmazonS3Client) AmazonS3ClientBuilder.standard() | ||
.withRegion(region) | ||
.withCredentials(new AWSStaticCredentialsProvider(awsCreds)) | ||
.build(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.umc.owncast.common.util; | ||
|
||
import java.util.Objects; | ||
|
||
public class StringUtil { | ||
public static boolean isBlank(String s){ | ||
return Objects.isNull(s) || s.isBlank(); | ||
} | ||
} |
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
39 changes: 39 additions & 0 deletions
39
src/main/java/com/umc/owncast/domain/cast/dto/CastDTO.java
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,39 @@ | ||
package com.umc.owncast.domain.cast.dto; | ||
|
||
import com.umc.owncast.domain.cast.entity.Cast; | ||
import com.umc.owncast.domain.enums.Formality; | ||
import com.umc.owncast.domain.sentence.dto.SentenceResponseDTO; | ||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString | ||
public class CastDTO { | ||
private Long id; | ||
private String title; | ||
private String imagePath; | ||
private String audioLength; | ||
private String voice; | ||
private Formality formality; | ||
private Boolean isPublic; | ||
private Long hits; | ||
private List<SentenceResponseDTO> sentences; | ||
|
||
public CastDTO(Cast cast){ | ||
id = cast.getId(); | ||
title = cast.getTitle(); | ||
imagePath = cast.getImagePath(); | ||
audioLength = cast.getAudioLength(); | ||
voice = cast.getVoice(); | ||
formality = cast.getFormality(); | ||
isPublic = cast.getIsPublic(); | ||
hits = cast.getHits(); | ||
sentences = cast.getSentences().stream() | ||
.map(SentenceResponseDTO::new) | ||
.toList(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/umc/owncast/domain/cast/dto/CastSaveDTO.java
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,21 @@ | ||
package com.umc.owncast.domain.cast.dto; | ||
|
||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.*; | ||
|
||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@ToString | ||
public class CastSaveDTO { | ||
// 제목 커버이미지 카테고리 공개 여부 | ||
@NotEmpty | ||
private String title; | ||
|
||
@NotNull | ||
private Long playlistId; | ||
|
||
private Boolean isPublic; | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/umc/owncast/domain/cast/dto/CastScriptDTO.java
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,24 @@ | ||
package com.umc.owncast.domain.cast.dto; | ||
|
||
import com.umc.owncast.domain.cast.entity.Cast; | ||
import com.umc.owncast.domain.sentence.dto.SentenceResponseDTO; | ||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString | ||
public class CastScriptDTO { | ||
private Long id; | ||
private List<SentenceResponseDTO> sentences; | ||
|
||
public CastScriptDTO(Cast cast){ | ||
id = cast.getId(); | ||
sentences = cast.getSentences().stream() | ||
.map(SentenceResponseDTO::new) | ||
.toList(); | ||
} | ||
} |
Oops, something went wrong.