├── .vscode └── settings.json ├── project.gif ├── step1.html ├── step2.html ├── README.md ├── step6.html ├── step3.html ├── step5.html └── step4.html /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "liveServer.settings.port": 5501 3 | } -------------------------------------------------------------------------------- /project.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jakevin/openai-workshop/HEAD/project.gif -------------------------------------------------------------------------------- /step1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OpenAI Web Project 5 | 6 | 7 |

Using OpenAI

8 |

OpenAI API Key:

9 | 10 |

11 |

Keyword:

12 | 13 |

14 | 15 |

16 |

17 | 18 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /step2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OpenAI Web Project 5 | 6 | 7 |

Using OpenAI

8 |

OpenAI API Key:

9 | 10 |

11 |

Keyword:

12 | 13 |

14 | 15 |

16 |

17 | 18 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # openai-workshop 2 | 3 | ![demo](/project.gif) 4 | 5 | 這是一個整合OpenAI的練習專案,從text-davinci 到 最新的 Whisper 都有使用。 6 | 7 | This is an integration practice project that uses OpenAI's models from Text-Davinci to the latest Whisper. 8 | 9 | ## 準備 10 | 1. 先到 OpenAI申請一個 API-Key https://platform.openai.com/account/api-keys 11 | 12 | 2. 每一個 Model的費用都不一樣,再使用之前,請先確認 https://openai.com/pricing 13 | 14 | 3. API呼叫是有費用的,可以到Usage去確認用量 https://platform.openai.com/account/usage 15 | 16 | ## Preparation: 17 | 18 | 1. Apply for an API-Key from OpenAI: https://platform.openai.com/account/api-keys 19 | 20 | 2. Each model has different costs. Before using, please check the pricing on https://openai.com/pricing 21 | 22 | 3. There is a cost for API calls. You can check your usage on https://platform.openai.com/account/usage 23 | 24 | ## Step1.html 25 | 使用 text-davinci,輸入一個keyword後,回傳一篇文章的標題 26 | 27 | Using text-davinci model, input a keyword, then response a article titel 28 | 29 | ## Step2.html 30 | text-davinci 價格非常高,所以改使用gpt-3.5。因為API的格式並不一樣,再做微幅修改 31 | 32 | Switched to using GPT-3.5 instead of text-davinci due to the high price. Minor modifications were made to the API format. 33 | 34 | ## Step3.html 35 | 將OpenAI回傳的內容,再為文章產生一張圖片,這邊使用了 DALL.E model 36 | 37 | Generating an image for the article based on the content returned by OpenAI, using the DALL-E model. 38 | 39 | ## Step4.html/Step5.html 40 | 懶人模式,不想打字,改用語音方式輸入關鍵字,將語音傳給OpenAI做解析。 41 | 42 | Lazy mode, don't want to type, switch to voice input to enter keywords, and send the voice to OpenAI for parsing. 43 | 44 | ## Step6.html 45 | OpenAI 新功能 Text-to—Speech,文字轉語音的測試,有6個風格可以使用看看 46 | 47 | OpenAI's new feature Text-to-Speech allows testing of converting text into speech with 6 different styles to explore. 48 | 49 | ## 備註、Note 50 | 在Step4.html/Step5.html時,如果你沒有Local Server,會無法正常的拿到麥克風權限,需要使用 plug-in: Live Server 51 | 52 | During Step4.html/Step5.html, if you do not have a Local Server, you will not be able to obtain microphone permissions properly. You need to use the plug-in Live Server. 53 | 54 | https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer 55 | -------------------------------------------------------------------------------- /step6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | OpenAI Web Project 6 | 7 | 8 |

OpenAI gpt-3 Text-to-Speech Project

9 | 10 |

OpenAI API Key:

11 | 12 |

13 | 14 | 15 |

Voice Content:

16 | 17 |

18 |

Speaker

19 | 27 |

28 | 29 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /step3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OpenAI Web Project 5 | 6 | 7 |

Using OpenAI

8 |

OpenAI API Key:

9 | 10 |

11 |

Keyword:

12 | 13 |

14 | 15 |

16 |

17 | 18 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /step5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | OpenAI Web Project 6 | 7 | 8 |

OpenAI gpt-3 DALL.E Whisper Integration Project

9 | 10 |

OpenAI API Key:

11 | 12 |

13 |

Recording:

14 | 15 | 16 |

17 | 18 | 19 |

Voice Content:

20 |

21 |

22 | 23 |

24 |

25 | 26 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /step4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OpenAI Web Project 5 | 6 | 7 |

OpenAI gpt-3 DALL.E Whisper Integration Project

8 | 9 |

OpenAI API Key:

10 | 11 |

12 |

Recording:

13 | 14 | 15 |

16 | 17 | 18 |

Voice Content:

19 |

20 |

21 | 22 |

23 |

24 | 25 | 138 | 139 | 140 | --------------------------------------------------------------------------------