Greasy Fork 还支持 简体中文。

Change ChatGPT Image And Text To Speech Function

ChatGPT

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
kaes-u-paya
今日安裝
0
安裝總數
216
評價
0 0 1
版本
0.2
建立日期
2023-01-17
更新日期
2023-01-21
尺寸
9.6 KB
授權條款
MIT
腳本執行於

This script will read the answer of ChatGPT (text-to-speech). I used it on Firefox with the dark theme of ChatGPT. I also include the Icon change script from another user.

How the script for the text-to-speech works:

Since the answer of ChatGPT is not provided at once but more like an on the fly, typewriter kind answer, we don't want to wait until ChatGPT finished the answer before read it. We would like to start reading the answer while ChatGPT is still answering. This script reads the answer within a loop (timeout) again and again and checks if the answer each cycle has been changed. It starts/continues reading out the answer where it has stopped the cycle before. The problem is where to cut the text for the start of the next cycle. I tried to focus on signs like: ".,!:?" and if there is no sign at all or too far away it should be cut between two words. Answers are often very different. Sometimes there is no punctuation at all or after each line, like within a poem. The script replaces all tags like

etc. with '' in order not to read out tags.

Enjoy the script and feel free to improve it. I'm sure it can be done better than my approach ;)