Git Product home page Git Product logo

10seconds-composer's Introduction

10seconds-composer

10秒間の作曲家

これは何?

任意の作曲家名を入力すると、その作曲家をイメージした音(コード進行)をブラウザ上で鳴らすことができます。

仕組み

  • コード進行はOpenAIのAPIを使って生成させています
    • コード進行はjson形式で出力させています
    • 10秒程度の音が鳴るようにAIさんにしてもらっています
  • Tone.js を利用して、ブラウザ上で音を鳴らしています
  • openAIのAPIで生成したjsonをパラメータとして、Tone.jsに渡しています

Demo

demo.mp4

⚠️⚠️ 注意(免責) ⚠️⚠️

お遊びアプリなのでクライアントサイドでOpenAIのAPIを実行する実装になっています。
(この実装のまま公開するとOpenAIのAPI keys🔑が漏れてしまいます)

お試しされる際は、あくまでも個人、ローカルで楽しむようにしてください。
なにかあっても筆者は責任が取れません。

初期設定

環境

$ node -v
v18.16.0
$ yarn -v
4.1.1

Voltaを入れておくと楽です

事前準備

OpenAIのAPIキーを発行してください。

clone

$ git clone https://github.com/shimabox/10seconds-composer.git
$ cd 10seconds-composer

envの設定

$ cp .env.example .env
$ vi .env

REACT_APP_OPENAI_API_KEY に、事前準備で取得したOpenAIのAPIキーを入れてください。
REACT_APP_OPENAI_MODEL は任意で修正してください。
※ デフォルトで gpt-4o を指定しています

REACT_APP_OPENAI_MODEL='gpt-4o'
REACT_APP_OPENAI_API_KEY='xxxxx'

yarn install

$ yarn install

実行

$ yarn start

こちらのコマンドで http://localhost:3000 が立ち上がります。
※ デフォルトのportは3000

10seconds-composer's People

Contributors

shimabox avatar dependabot[bot] avatar

Stargazers

Sam Foster avatar

Watchers

 avatar

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.