Skip to content

Commit

Permalink
更新: 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LokerL committed Aug 16, 2022
1 parent 165fbbb commit d85e3fa
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 33 deletions.
43 changes: 28 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
### 1. 下载安装

- 方法 1:直接下载安装包:
* [下载地址 Gitee](https://gitee.com/LGW_space/tts-vue/releases/latest)
* [下载地址 GitHub](https://github.com/LokerL/tts-vue/releases/latest)
* [下载地址 lanzou 云](https://wwn.lanzoul.com/b0f3ype9g) 密码:`em1n`
*[GitHubActions](https://github.com/LokerL/tts-vue/actions)有实时推送自动构建的版本。

- [下载地址 Gitee](https://gitee.com/LGW_space/tts-vue/releases/latest)

- [下载地址 GitHub](https://github.com/LokerL/tts-vue/releases/latest)

- [下载地址 lanzou 云](https://wwn.lanzoul.com/b0f3ype9g) 密码:`em1n`

-[GitHubActions](https://github.com/LokerL/tts-vue/actions)有实时推送自动构建的版本。

![tts-vue.zip](http://pic.rmb.bdstatic.com/bjh/50c9038bab1165bce67cf26b763be521.png)

解压压缩包得到安装程序`tts-vue_1.0.0.exe`
Expand All @@ -26,7 +26,7 @@
GitHub: https://github.com/LokerL/tts-vue
Gitee: https://gitee.com/LGW_space/tts-vue
下载源码后运行

```shell
# npm
npm install
Expand Down Expand Up @@ -85,7 +85,7 @@
- 是否自动播放:配置为``时,文本转为语音后,可以自动播放。批量转换时无效。

- 配置模板编辑:保存的模板可以在这里查看或删除。鼠标放在配置名字上可以显示全部配置内容。

![](http://pic.rmb.bdstatic.com/bjh/dabc0e3200b44c0c3c1f65cfca586160.png)

修改完成后其实已经自动保存完成,可以点击`刷新配置`以立即应用。
Expand All @@ -107,17 +107,30 @@
- 去除 Bilibili 按钮,添加 Gitee 按钮
- 修复了一些莫名其妙的 BUG。

##### V1.6.0

- 添加版本检测功能。
- 添加转换时配置为空的检测。
- 更新语音库,新增一个晓伊声音。
- 修改了一些 UI。

##### V1.7.0

- 添加自定义的`AuthToken`,因为使用这个功能的可能不多,没把这个配置写到 UI 里面。需要在设置页面打开配置文件手动填写。(这是个未经测试的更新)
- 添加窗口最大化。修改部分属性为响应式。
- 修改了一些 UI。

#### 可能出现的问题

> **点击下载没反应,下载文件为文本文档?**
* 可能出现问题的原因:
- 可能出现问题的原因:

1. 正确的下载方法是转换完成后点击绿色的下载图标,而不是播放器控件的扩展下载,点播放器控件的下载会默认保存为 xxxx.txt。
2. 点击绿色下载没反应?因为默认保存位置是桌面,所以要检查当前登录的账户有没有写入桌面文件的权限。

* 解决方法:
- 解决方法:

1. 尝试更改默认下载位置为其他盘。
2. 以管理员身份运行此软件。
3. 要是想直接用播放器控件下载音乐,可以在保存的时候更改文件名后缀为.mp3 即可。(如果你已经下载完了,可以尝试更改下载的文本文档.txt 后缀名为.mp3)
Expand Down
24 changes: 17 additions & 7 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,20 @@ const indexHtml = join(ROOT_PATH.dist, "index.html");
async function createWindow() {
win = new BrowserWindow({
width: 900,
// height: 600,
minWidth: 900,
minHeight: 600,
height: 600,

title: "Main window",
icon: join(ROOT_PATH.public, "favicon.ico"),
useContentSize: true,
// useContentSize: true,
frame: false,
maximizable: false,
minimizable: false,
fullscreenable: false,
// maximizable: false,
// minimizable: false,
// fullscreenable: false,
transparent: true,
hasShadow: false,
resizable: false,
// resizable: false,
webPreferences: {
preload,
webSecurity: false,
Expand Down Expand Up @@ -103,7 +105,15 @@ app.on("activate", () => {
});

ipcMain.on("min", (e) => win.minimize());
ipcMain.on("max", (e) => win.maximize());
ipcMain.on("window-maximize", function () {
if (win.isFullScreen()) {
win.setFullScreen(false);
} else if (win.isMaximized()) {
win.unmaximize();
} else {
win.maximize();
}
});
ipcMain.on("close", (e) => win.close());
ipcMain.on("reload", (e) => win.reload());

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tts-vue",
"version": "1.6.0",
"version": "1.7.0",
"main": "dist/electron/main/index.js",
"description": "🎤 微软语音合成工具,使用 Electron + Vue + ElementPlus + Vite 构建。",
"author": "沫離Loker <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ body {
}
.container {
margin-top: 5px;
height: 100%;
height: calc(100vh - 35px);
}
.el-main,
.el-footer {
Expand Down
9 changes: 7 additions & 2 deletions src/components/configpage/ConfigPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<el-table
:data="config.formConfigList"
style="width: 100%"
height="230"
height="calc(100vh - 400px)"
>
<el-table-column prop="tagName" label="名字">
<template #default="scope">
Expand Down Expand Up @@ -133,17 +133,21 @@ const switchChange = (value: any) => {
flex-direction: row;
justify-content: space-around;
padding: 10px;
height: 97%;
}
h3 {
margin-left: 10px;
}
.el-form {
margin-top: 7px;
border-right: 1px solid #dcdfe6;
width: 270px;
width: 250px;
}
.er-code {
padding-left: 5px;
display: flex;
flex-direction: row;
justify-content: space-around;
}
:deep(.input-path .el-input-group__append) {
display: inline-flex;
Expand Down Expand Up @@ -180,6 +184,7 @@ img {
height: 280px;
}
.btns {
margin-top: 10px;
display: flex;
flex-direction: row;
justify-content: space-around;
Expand Down
15 changes: 12 additions & 3 deletions src/components/header/Header.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="header">
<div class="header" @click="test">
<div class="win-tools">
<el-button
type="danger"
Expand All @@ -9,8 +9,14 @@
@click="ipcRenderer.send('close')"
>
</el-button>
<!-- <el-button type="warning" size="small" circle class="circle-btn">
</el-button> -->
<el-button
type="warning"
size="small"
circle
class="circle-btn"
@click="ipcRenderer.send('window-maximize')"
>
</el-button>
<el-button
type="success"
size="small"
Expand All @@ -27,6 +33,9 @@
<script lang="ts" setup>
import Logo from "./Logo.vue";
const { ipcRenderer } = require("electron");
const test = () => {
console.log("object");
};
</script>

<style scoped>
Expand Down
12 changes: 8 additions & 4 deletions src/components/main/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
</div>
</div>
<div class="input-area" v-show="page.asideIndex == '2'">
<el-table :data="tableData" height="430" style="width: 100%">
<el-table
:data="tableData"
height="calc(100vh - 170px)"
style="width: 100%"
>
<el-table-column
prop="fileName"
label="文件名"
Expand Down Expand Up @@ -199,12 +203,12 @@ const openInFolder = (val: any) => {
justify-content: space-between;
}
.input-area {
width: 500px !important;
width: 100% !important;
border-radius: 5px !important;
}
.main-config-page {
width: 100%;
height: 498px;
height: calc(100vh - 102px);
background-color: #fff;
border-radius: 5px;
border: 1px solid #dcdfe6;
Expand All @@ -227,7 +231,7 @@ const openInFolder = (val: any) => {
display: none;
}
:deep(.el-textarea__inner) {
min-height: 470px !important;
height: calc(100vh - 130px);
resize: none;
border-radius: 5px !important;
}
Expand Down
3 changes: 3 additions & 0 deletions src/global/initLocalStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ export default function initStore() {
if (!store.has("autoplay")) {
store.set("autoplay", true);
}
if (!store.has("AuthToken")) {
store.set("AuthToken", "");
}
}
7 changes: 7 additions & 0 deletions src/store/play.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
const axios = require("axios");
const { v4: uuidv4 } = require("uuid");
const ws = require("nodejs-websocket");
const Store = require("electron-store");
const store = new Store();

async function getAuthToken() {
const customToken = store.get("AuthToken");
if (customToken !== "") {
console.log("正在使用用户Token:", customToken);
return customToken;
}
//https://azure.microsoft.com/en-gb/services/cognitive-services/text-to-speech/

const res = await axios.get(
Expand Down

0 comments on commit d85e3fa

Please sign in to comment.