GithubHelp home page GithubHelp logo

jinhyukparkk / vsearch Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 374.85 MB

동영상 내 음성 검색 서비스

License: MIT License

Go 5.97% Shell 0.80% HTML 13.92% JavaScript 40.53% CSS 17.31% Python 3.90% Makefile 0.04% SCSS 17.52%

vsearch's Introduction

header

Position

  • Back-end Engineer

Experience

우아한 형제들

  • 검색 서비스 (2023/02 ~ )

아프리카TV

  • 광고 서비스 (2022/01 ~ 2022/12)
  • 검색 서비스 (2020/01 ~ 2022/05)
  • 전사 웹 서비스 (2018/05 ~ 2019/12)

한국전자통신연구원

  • 공간정보 연구실 연구연수생 (2018/01 ~ 2018/02)

모비젠

  • DevOps 엔지니어 인턴 (2017/01 ~ 2017/06)

Activit

Metrics

Hyuk's github stats Top Langs

vsearch's People

Contributors

gail5135 avatar hyh4827 avatar jaeminl avatar jinhyukparkk avatar ywook avatar

Stargazers

 avatar  avatar  avatar  avatar

vsearch's Issues

동영상 중간 재생

문제사항
동영상을 원하는 시간부터 재생

해결

1. video 태그에 id 붙여줌

2018-01-11 4 13 25

2. 자바스크립트에서 비디오 태크 불러오고 currentTime 으로 시간 설정해주면 해당 시간부터 영상재생됨(초 단위)

2018-01-11 4 16 01

Access-Control-Allow-Origin

문제 사항
form 같은 경우 서버로 request를 보내 다음 response 데이터를 가지고 다루기에 힘들 것 같음.
그래서 ajax 요청으로 서버에 영상을 업로드 하고 test를 해봄.
Response 과정에서 'Access-Control-Allow-Origin' 문제 발생. 크롬 브라우저 상에서 처음 전송되는 리소스의 도메인과 다른 도메인으로부터 리소스가 요청될 경우 해당 리소스는 cross-origin HTTP 요청에 의해 요청됨.

image

해결
서버에서 response를 할 때 헤더에 Access-Control-Allow-Origin와 접근된 출처를 넣어줌
image

Audio 파일 작은 단위로 자르기

문제사항
작은 단위의 시간 당 음성에서 추출한 text를 매핑시켜야 한다.
해결
sox(SOund eXchange)를 이용 -> 파일 형 변환 할 때도 이용함.
*시연
image

여기서 생기는 아래의 에러는 밑에 정리.
sox WARN trim: Last 1 position(s) not reached (audio shorter than expected).

[참고 자료]
http://sox.sourceforge.net/sox.html

영상 파일 flac형식으로 변환

문제
영상 파일을 flac형식으로 변환

해결
ffmpeg 사용

  1. Homebrew 안깔려있으면 설치하고 brew install ffmpeg 명령어로 ffmpeg 설치

2018-01-11 4 21 25

  1. ffmpeg -i 파일명.mp4 결과명.flac

2018-01-11 4 23 31

Audio 파일 Encoding시 Config 맞추기

문제사항
Google speech API를 사용하면서 audio 파일을 request 할 때 "400 error " 가 response 된다면

image
image

해결
error에 대해 검색해보니 이러한 Troubleshooting에 다룬 페이지가 GCP 사이트에 있었다.
https://cloud.google.com/speech/support
-> 내용을 읽으면서 audio파일 형식과 Encoding에 대해 공부할 필요성을 느꼈다.

시연

  1. Audacity를 이용하여 flac형식의 녹음 파일(모노)을 만든다.
  2. 파일의 config는 default로 channel: 2, Samplerate: 44100으로 되있으므로 SoX를 사용하여 해당 녹음파일의 config를 변경해준다.
    example): sox --channels=2 --bits=16 --rate=44100 --encoding=signed-integer --endian=little [변경할파일] --channels=1 --bits=16 --rate=16000 [변경 후 파일]
  3. curl이나 speech API를 사용하여 확인.

[참조]
https://brunch.co.kr/@sunghyunlim/23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.