brunch

You can make anything
by writing

C.S.Lewis

by Master Seo Aug 02. 2020

432.  미디어 서비스 + AI 서비스

영어를 스페인어로 변경하기


S3------------ transcribe ------------translate ------polly----mediacnvert --------s3------video player



<1> S3  와  음성인식   transcribe  

<2> 비디오를 번역하기  translate 

<3>  text를 오디오로 변환  Polly   사용

<4>  미디어 컨버터로  Apple HLS 스택으로 변경하기

<5>  오디오 , 자막등  동작 확인하기




<1> S3  와  음성인식   transcribe  



1

s3

소스버킷

mp4 다운로드


2

s3  경로 복사하기

s3://source-lfdc09/test-clip-00m03s-1080p30.mp4



3

서비스  > transcribe  >  job  생성하기

transcribe-test-clip

입력 데이터

s3://source-lfdc09/test-clip-00m03s-1080p30.mp4

셍성하기


4

text previre  세션 복사

Here's your official opening of the 2018 Rose Parade.


5

다운로드 full 스크립트  클릭 >  파일 다운로드


참고

https://www.json2yaml.com/



6

대화내용을  text 파일로 저장

1 00:00:00,000 --> 00:00:00,000 Replace me with desired text


저장

test-clip-00m03s-1080p30.mp4_eng.srt
  



1 00:00:00,000 --> 00:00:00,000 Here's your official opening of the 2018 Rose Parade.





7

파일에 시잔정보 추가하기


1 00:00:00,040 --> 00:00:03,370 Here's your official opening of the 2018 Rose Parade.


8

S3에 파일 올리기

SRT FILE  올리기



S3   > source-xxxxxxx

올리기


파일 추가하기

test-clip-00m03s-1080p30.mp4_eng.srt

올리기






<2> 비디오를 번역하기  translate 




1

서비스 >  translate   >  실시간 번역   > 소스 언어 : 자동   > 입력

Here's your official opening of the 2018 Rose Parade.


목적기 언어 : Spanish (es)


2

애플리케이션 통합에서 보기



3

번역 json 스크립트를 파일로 저장 > 자막 파일로 변환하기

test-clip-00m03s-1080p30.mp4_spa.srt


1 00:00:00,040 --> 00:00:03,370 Aquí está su inauguración oficial del desfile de rosas 2018.



3

S3 >  seource에  >  올리기  >  test-clip-00m03s-1080p30.mp4_spa.srt > 업로드






<3>  text를 오디오로 변환  Polly   사용


1  

서비스 > amazon  polly  > 시작하기  :  Text-to-Speech

Aquí está su inauguración oficial del desfile de rosas 2018.



2

plain text

엔진 : 표준

언어: Spanish, US

Voice : miguel, male

언어 듣기


지원하는 테그

https://docs.aws.amazon.com/polly/latest/dg/supportedtags.html



3

 SSML 텝으로 이동

// 입력하기

<speak> <prosody amazon:max-duration="3.33s"> Aquí está su inauguración oficial del desfile de rosas 2018. </prosody> </speak>


듣기

디운로드  mp3


4

이름 변경

test-clip-00m03s-1080p30.mp4_spa.mp3


5

s3에 올릭기

test-clip-00m03s-1080p30.mp4_spa.mp3





<4>  미디어 컨버터로  Apple HLS 스택으로 변경하기

// role 이 필요하다.



0

서비스  > media convert   > 시작하기  >  설정 > IAM role  > 미디어 컨버터-role  선택



1 입력 하기

입력 1  > 입력 파일 URL 찾아보기   > S3 bucket  > 입력 파일  > 30 mp4



2 원래 오디오  구성

기본 값 사용

언어코드

영어



3

오디오 선택기 추가

입력 대체 오디오 구성

디폴트  선택하지 않음

언어코드

기한 40

스페인 선택

외부파일

spa.mp3



4

캡션 선택기


캡션 선택기1 

소스

SRT

소스파익 

mp4_eng.srt


캡션 선택기2
  

소스


SRT


소스파익 


mp4_spa.srt






5

아웃풋 그룹  >  추가  > Apple HLS

Apple HLS  >  Apple HLS 그룹 설정 > 목적지 >  S3  : output > 

test-clip

선택



6

아웃풋 추가 > 

_video

_audio-eng

_audio-spa

_captions-eng

_subtitles-spa



8

Output1

1920

1080


QVBR

6000000

9


9

Output2

Output3

Output4

Output5




10

media convert  job

생성하기


11

job sim,mary


Export JSON







<5>  오디오 , 자막등  동작 확인하기


1

출력

Apple HLS



2

허용

CORS 설정


make public 만들기



감사합니다.

매거진의 이전글 431. KMS이용하여  EMR 클라이언트 측 암호화

작품 선택

키워드 선택 0 / 3 0

댓글여부

afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari