feat: Google Cloud TTS 사용을 위한 클라이언트 설정 및 상수 정의
This commit is contained in:
parent
59eee6131f
commit
1abad2258d
@ -0,0 +1,44 @@
|
|||||||
|
package com.sangdol.text_to_speech
|
||||||
|
|
||||||
|
import com.google.cloud.texttospeech.v1.TextToSpeechClient
|
||||||
|
import org.springframework.context.annotation.Bean
|
||||||
|
import org.springframework.context.annotation.Configuration
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
class GoogleTtsConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
fun textToSpeechClient(): TextToSpeechClient = TextToSpeechClient.create()
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class TtsLanguageCode(
|
||||||
|
val code: String
|
||||||
|
) {
|
||||||
|
ENGLISH_US("en-US")
|
||||||
|
}
|
||||||
|
|
||||||
|
sealed interface VoiceType {
|
||||||
|
val identifier: String
|
||||||
|
val name: String
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Neural2MaleVoice(
|
||||||
|
override val identifier: String,
|
||||||
|
): VoiceType {
|
||||||
|
TYPE_A("en-US-Neural2-A"),
|
||||||
|
TYPE_D("en-US-Neural2-D"),
|
||||||
|
TYPE_I("en-US-Neural2-I"),
|
||||||
|
TYPE_J("en-US-Neural2-J"),
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Neural2FemaleVoice(
|
||||||
|
override val identifier: String
|
||||||
|
): VoiceType {
|
||||||
|
TYPE_C("en-US-Neural2-C"),
|
||||||
|
TYPE_E("en-US-Neural2-E"),
|
||||||
|
TYPE_F("en-US-Neural2-F"),
|
||||||
|
TYPE_G("en-US-Neural2-G"),
|
||||||
|
TYPE_H("en-US-Neural2-H"),
|
||||||
|
;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user