Merge branch 'master' into v0.6

This commit is contained in:
Nolan Darilek 2020-08-18 10:34:08 -05:00
commit 705126ef2f
6 changed files with 107 additions and 81 deletions

View File

@ -2,12 +2,11 @@ name: Build
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
jobs:
build_linux:
name: Build Linux
runs-on: ubuntu-latest
@ -16,7 +15,7 @@ jobs:
- run: |
sudo apt-get update
sudo apt-get install -y libspeechd-dev
cargo build --release --verbose
cargo build --release
build_windows:
name: Build Windows
@ -25,7 +24,15 @@ jobs:
- uses: actions/checkout@v2
- run: |
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:
name: Build Android

View File

@ -3,10 +3,9 @@ name: Release
on:
push:
tags:
- 'v*'
- "v*"
jobs:
build_linux:
name: Build Linux
runs-on: ubuntu-latest
@ -36,10 +35,23 @@ jobs:
name: 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:
name: Package
runs-on: ubuntu-latest
needs: [build_linux, build_windows]
needs: [build_linux, build_windows, build_macos]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
@ -48,13 +60,18 @@ jobs:
- uses: actions/download-artifact@v1
with:
name: windows
- uses: actions/download-artifact@v1
with:
name: macos
- run: |
mkdir godot-tts
cp godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib
mkdir -p godot-tts/target/release
cp linux/release/*.so godot-tts/target/release
cp windows/release/*.dll godot-tts/target/release
cp macos/release/*.dylib godot-tts/target/release
cp LICENSE godot-tts
cp README.md godot-tts
cp TTS.gd godot-tts.g* godot-tts
cp godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib
rm godot-tts/*.release

View File

@ -10,7 +10,7 @@ crate-type = ["cdylib"]
[dependencies]
env_logger = "0.7"
gdnative = "0.8"
tts = "0.3"
tts = "0.5"
[target.'cfg(windows)'.dependencies]
tolk = "0.2"

10
TTS.gd
View File

@ -7,9 +7,7 @@ var tts
signal done
func _ready():
pause_mode = Node.PAUSE_MODE_PROCESS
func _init():
if OS.get_name() == "Server" or OS.has_feature("JavaScript"):
return
elif Engine.has_singleton("AndroidTTS"):
@ -22,6 +20,10 @@ func _ready():
print_debug("TTS not available!")
func _ready():
pause_mode = Node.PAUSE_MODE_PROCESS
func _get_min_rate():
if OS.has_feature('JavaScript'):
return 0.1
@ -217,10 +219,8 @@ var _was_speaking = false
func _process(delta):
if self.is_speaking:
print("xxx Speaking")
_was_speaking = true
elif _was_speaking:
print("xxx Done")
emit_signal("done")
_was_speaking = false

View File

@ -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"
UWP.64="res://addons/godot-tts/target/debug/godot_tts.dll"
X11.64="res://addons/godot-tts/target/debug/libgodot_tts.so"
OSX.64="res://addons/godot-tts/target/debug/libgodot_tts.dylib"
[dependencies]

View File

@ -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"
UWP.64="res://addons/godot-tts/target/release/godot_tts.dll"
X11.64="res://addons/godot-tts/target/release/libgodot_tts.so"
OSX.64="res://addons/godot-tts/target/release/libgodot_tts.dylib"
[dependencies]