mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-12-04 19:35:56 +00:00
Merge branch 'master' into v0.6
This commit is contained in:
commit
705126ef2f
37
.github/workflows/build.yml
vendored
37
.github/workflows/build.yml
vendored
|
@ -2,35 +2,42 @@ name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build_linux:
|
build_linux:
|
||||||
name: Build Linux
|
name: Build Linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: |
|
- run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libspeechd-dev
|
sudo apt-get install -y libspeechd-dev
|
||||||
cargo build --release --verbose
|
cargo build --release
|
||||||
|
|
||||||
build_windows:
|
build_windows:
|
||||||
name: Build Windows
|
name: Build Windows
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: |
|
- run: |
|
||||||
choco install -y llvm
|
choco install -y llvm
|
||||||
cargo build --release --verbose
|
cargo build --release
|
||||||
|
|
||||||
|
build_macos:
|
||||||
|
name: Build MacOS
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: |
|
||||||
|
cargo build --release
|
||||||
|
|
||||||
build_android:
|
build_android:
|
||||||
name: Build Android
|
name: Build Android
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: |
|
- run: |
|
||||||
./gradlew assemble
|
./gradlew assemble
|
||||||
|
|
135
.github/workflows/release.yml
vendored
135
.github/workflows/release.yml
vendored
|
@ -3,78 +3,95 @@ name: Release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build_linux:
|
build_linux:
|
||||||
name: Build Linux
|
name: Build Linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: |
|
- run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libspeechd-dev
|
sudo apt-get install -y libspeechd-dev
|
||||||
cargo build --release --verbose
|
cargo build --release --verbose
|
||||||
mv target linux
|
mv target linux
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: linux
|
name: linux
|
||||||
path: linux
|
path: linux
|
||||||
|
|
||||||
build_windows:
|
build_windows:
|
||||||
name: Build Windows
|
name: Build Windows
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: |
|
- run: |
|
||||||
choco install -y llvm
|
choco install -y llvm
|
||||||
cargo build --release --verbose
|
cargo build --release --verbose
|
||||||
move target windows
|
move target windows
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: windows
|
name: windows
|
||||||
path: windows
|
path: windows
|
||||||
|
|
||||||
|
build_macos:
|
||||||
|
name: Build MacOS
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: |
|
||||||
|
cargo build --release
|
||||||
|
mv target macos
|
||||||
|
- uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: macos
|
||||||
|
path: macos
|
||||||
|
|
||||||
package:
|
package:
|
||||||
name: Package
|
name: Package
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build_linux, build_windows]
|
needs: [build_linux, build_windows, build_macos]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/download-artifact@v1
|
- uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: linux
|
name: linux
|
||||||
- uses: actions/download-artifact@v1
|
- uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: windows
|
name: windows
|
||||||
- run: |
|
- uses: actions/download-artifact@v1
|
||||||
mkdir godot-tts
|
with:
|
||||||
cp godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib
|
name: macos
|
||||||
mkdir -p godot-tts/target/release
|
- run: |
|
||||||
cp linux/release/*.so godot-tts/target/release
|
mkdir godot-tts
|
||||||
cp windows/release/*.dll godot-tts/target/release
|
cp godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib
|
||||||
cp LICENSE godot-tts
|
mkdir -p godot-tts/target/release
|
||||||
cp TTS.gd godot-tts.g* godot-tts
|
cp linux/release/*.so godot-tts/target/release
|
||||||
cp godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib
|
cp windows/release/*.dll godot-tts/target/release
|
||||||
rm godot-tts/*.release
|
cp macos/release/*.dylib godot-tts/target/release
|
||||||
cp -R android godot-tts
|
cp LICENSE godot-tts
|
||||||
zip -r9 godot-tts godot-tts
|
cp README.md godot-tts
|
||||||
- uses: actions/create-release@v1
|
cp TTS.gd godot-tts.g* godot-tts
|
||||||
id: create_release
|
cp godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib
|
||||||
env:
|
rm godot-tts/*.release
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
cp -R android godot-tts
|
||||||
with:
|
zip -r9 godot-tts godot-tts
|
||||||
tag_name: ${{ github.ref }}
|
- uses: actions/create-release@v1
|
||||||
release_name: Release ${{ github.ref }}
|
id: create_release
|
||||||
draft: false
|
env:
|
||||||
prerelease: false
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- uses: actions/upload-release-asset@v1
|
with:
|
||||||
id: upload-release-asset
|
tag_name: ${{ github.ref }}
|
||||||
env:
|
release_name: Release ${{ github.ref }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
draft: false
|
||||||
with:
|
prerelease: false
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
- uses: actions/upload-release-asset@v1
|
||||||
asset_path: ./godot-tts.zip
|
id: upload-release-asset
|
||||||
asset_name: godot-tts.zip
|
env:
|
||||||
asset_content_type: application/zip
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./godot-tts.zip
|
||||||
|
asset_name: godot-tts.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
|
@ -10,7 +10,7 @@ crate-type = ["cdylib"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
env_logger = "0.7"
|
env_logger = "0.7"
|
||||||
gdnative = "0.8"
|
gdnative = "0.8"
|
||||||
tts = "0.3"
|
tts = "0.5"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
tolk = "0.2"
|
tolk = "0.2"
|
10
TTS.gd
10
TTS.gd
|
@ -7,9 +7,7 @@ var tts
|
||||||
|
|
||||||
signal done
|
signal done
|
||||||
|
|
||||||
|
func _init():
|
||||||
func _ready():
|
|
||||||
pause_mode = Node.PAUSE_MODE_PROCESS
|
|
||||||
if OS.get_name() == "Server" or OS.has_feature("JavaScript"):
|
if OS.get_name() == "Server" or OS.has_feature("JavaScript"):
|
||||||
return
|
return
|
||||||
elif Engine.has_singleton("AndroidTTS"):
|
elif Engine.has_singleton("AndroidTTS"):
|
||||||
|
@ -22,6 +20,10 @@ func _ready():
|
||||||
print_debug("TTS not available!")
|
print_debug("TTS not available!")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pause_mode = Node.PAUSE_MODE_PROCESS
|
||||||
|
|
||||||
func _get_min_rate():
|
func _get_min_rate():
|
||||||
if OS.has_feature('JavaScript'):
|
if OS.has_feature('JavaScript'):
|
||||||
return 0.1
|
return 0.1
|
||||||
|
@ -217,10 +219,8 @@ var _was_speaking = false
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if self.is_speaking:
|
if self.is_speaking:
|
||||||
print("xxx Speaking")
|
|
||||||
_was_speaking = true
|
_was_speaking = true
|
||||||
elif _was_speaking:
|
elif _was_speaking:
|
||||||
print("xxx Done")
|
|
||||||
emit_signal("done")
|
emit_signal("done")
|
||||||
_was_speaking = false
|
_was_speaking = false
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ Server.64="res://addons/godot-tts/target/debug/libgodot_tts.so"
|
||||||
Windows.64="res://addons/godot-tts/target/debug/godot_tts.dll"
|
Windows.64="res://addons/godot-tts/target/debug/godot_tts.dll"
|
||||||
UWP.64="res://addons/godot-tts/target/debug/godot_tts.dll"
|
UWP.64="res://addons/godot-tts/target/debug/godot_tts.dll"
|
||||||
X11.64="res://addons/godot-tts/target/debug/libgodot_tts.so"
|
X11.64="res://addons/godot-tts/target/debug/libgodot_tts.so"
|
||||||
|
OSX.64="res://addons/godot-tts/target/debug/libgodot_tts.dylib"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ Server.64="res://addons/godot-tts/target/release/libgodot_tts.so"
|
||||||
Windows.64="res://addons/godot-tts/target/release/godot_tts.dll"
|
Windows.64="res://addons/godot-tts/target/release/godot_tts.dll"
|
||||||
UWP.64="res://addons/godot-tts/target/release/godot_tts.dll"
|
UWP.64="res://addons/godot-tts/target/release/godot_tts.dll"
|
||||||
X11.64="res://addons/godot-tts/target/release/libgodot_tts.so"
|
X11.64="res://addons/godot-tts/target/release/libgodot_tts.so"
|
||||||
|
OSX.64="res://addons/godot-tts/target/release/libgodot_tts.dylib"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user