From dec1d2cc1749ae379a53dac435cc2c865890928d Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 23 Jul 2020 14:05:36 -0500 Subject: [PATCH 1/7] Move TTS initiaization to `_init` so script works either as a singleton or an instantiated object. --- TTS.gd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TTS.gd b/TTS.gd index 046e44c..3203aaf 100644 --- a/TTS.gd +++ b/TTS.gd @@ -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 From bfdedf64db3b6488b65b5d8f1a03c944f26f7c89 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 12 Aug 2020 16:31:39 -0500 Subject: [PATCH 2/7] Bump dependency. --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6985018..0465ecc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["cdylib"] [dependencies] env_logger = "0.7" gdnative = "0.8" -tts = "0.3" +tts = "0.4" [target.'cfg(windows)'.dependencies] -tolk = "0.2" \ No newline at end of file +tolk = "0.2" From 1eca767056f1bd9e26c1d9719d6f4bbed6fddbd5 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 12 Aug 2020 16:34:49 -0500 Subject: [PATCH 3/7] Add MacOS test build. --- .github/workflows/build.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ff6553..457ebea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,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,4 +25,12 @@ 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 From 8c26502f25f79cfa3d73acf4e61a61238ef5c450 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 12 Aug 2020 18:59:03 -0500 Subject: [PATCH 4/7] Add OSX library to gdnlib files. --- godot-tts.gdnlib | 1 + godot-tts.gdnlib.release | 1 + 2 files changed, 2 insertions(+) diff --git a/godot-tts.gdnlib b/godot-tts.gdnlib index 62b7c00..8e72137 100644 --- a/godot-tts.gdnlib +++ b/godot-tts.gdnlib @@ -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] diff --git a/godot-tts.gdnlib.release b/godot-tts.gdnlib.release index ea65c58..abb29fb 100644 --- a/godot-tts.gdnlib.release +++ b/godot-tts.gdnlib.release @@ -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] From f389e818b93283efe9d48856fbbde87164f78753 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 13 Aug 2020 12:12:48 -0500 Subject: [PATCH 5/7] Bump dependency. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0465ecc..4a98292 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["cdylib"] [dependencies] env_logger = "0.7" gdnative = "0.8" -tts = "0.4" +tts = "0.5" [target.'cfg(windows)'.dependencies] tolk = "0.2" From 8dfa941ba68b9c94ae5fa54d026ebe4545796eca Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 13 Aug 2020 12:56:14 -0500 Subject: [PATCH 6/7] Remove unnecessary logging. --- TTS.gd | 2 -- 1 file changed, 2 deletions(-) diff --git a/TTS.gd b/TTS.gd index 3203aaf..49d6236 100644 --- a/TTS.gd +++ b/TTS.gd @@ -219,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 From 6fd18b0de1f4d108fc703afb1ce892e3238cca4c Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Fri, 14 Aug 2020 08:37:11 -0500 Subject: [PATCH 7/7] Update release build to include MacOS, and to package README.md. --- .github/workflows/release.yml | 135 +++++++++++++++++++--------------- 1 file changed, 76 insertions(+), 59 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fee9f19..3bb727b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,78 +3,95 @@ name: Release on: push: tags: - - 'v*' + - "v*" jobs: - build_linux: name: Build Linux runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: | - sudo apt-get update - sudo apt-get install -y libspeechd-dev - cargo build --release --verbose - mv target linux - - uses: actions/upload-artifact@v1 - with: - name: linux - path: linux + - uses: actions/checkout@v2 + - run: | + sudo apt-get update + sudo apt-get install -y libspeechd-dev + cargo build --release --verbose + mv target linux + - uses: actions/upload-artifact@v1 + with: + name: linux + path: linux build_windows: name: Build Windows runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - run: | - choco install -y llvm - cargo build --release --verbose - move target windows - - uses: actions/upload-artifact@v1 - with: - name: windows - path: windows + - uses: actions/checkout@v2 + - run: | + choco install -y llvm + cargo build --release --verbose + move target windows + - uses: actions/upload-artifact@v1 + with: + 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 - with: - name: linux - - uses: actions/download-artifact@v1 - with: - name: windows - - 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 LICENSE godot-tts - cp TTS.gd godot-tts.g* godot-tts - cp godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib - rm godot-tts/*.release - cp -R android godot-tts - zip -r9 godot-tts godot-tts - - uses: actions/create-release@v1 - id: create_release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - uses: actions/upload-release-asset@v1 - id: upload-release-asset - env: - 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 + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v1 + with: + name: linux + - 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 + cp -R android godot-tts + zip -r9 godot-tts godot-tts + - uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - uses: actions/upload-release-asset@v1 + id: upload-release-asset + env: + 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