Skip to content

Commit

Permalink
1.5.0 (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel authored Dec 16, 2023
2 parents a28797e + 49d26ba commit 7f0e6d0
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 167 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ on:

jobs:
license_tests:
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master
with:
packages-exclude: '^(precise-runner|fann2|tqdm|bs4|ovos-phal-plugin|ovos-ocp|bitstruct|audioread).*'
156 changes: 18 additions & 138 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,172 +1,52 @@
# Changelog

## [1.3.3a21](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a21) (2023-10-27)
## [1.4.1a6](https://github.com/NeonGeckoCom/neon_audio/tree/1.4.1a6) (2023-12-13)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a20...1.3.3a21)
[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.4.1a5...1.4.1a6)

**Merged pull requests:**

- Handle playback thread init bug affecting Docker instances [\#151](https://github.com/NeonGeckoCom/neon_audio/pull/151) ([NeonDaniel](https://github.com/NeonDaniel))
- Update ovos-audio to remove excessive empty log [\#159](https://github.com/NeonGeckoCom/neon_audio/pull/159) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a20](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a20) (2023-10-27)
## [1.4.1a5](https://github.com/NeonGeckoCom/neon_audio/tree/1.4.1a5) (2023-12-13)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a19...1.3.3a20)
[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.4.1a4...1.4.1a5)

**Merged pull requests:**

- Downgrade OCP for ovos-core/NeonCore compat. [\#150](https://github.com/NeonGeckoCom/neon_audio/pull/150) ([NeonDaniel](https://github.com/NeonDaniel))
- Update neon-utils dependency to stable release [\#158](https://github.com/NeonGeckoCom/neon_audio/pull/158) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a19](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a19) (2023-10-27)
## [1.4.1a4](https://github.com/NeonGeckoCom/neon_audio/tree/1.4.1a4) (2023-11-21)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a18...1.3.3a19)
[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.4.1a3...1.4.1a4)

**Merged pull requests:**

- Update OCP to latest alpha to resolve dependency error [\#149](https://github.com/NeonGeckoCom/neon_audio/pull/149) ([NeonDaniel](https://github.com/NeonDaniel))
- Handle invalid timing metrics [\#157](https://github.com/NeonGeckoCom/neon_audio/pull/157) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a18](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a18) (2023-10-27)
## [1.4.1a3](https://github.com/NeonGeckoCom/neon_audio/tree/1.4.1a3) (2023-11-17)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a17...1.3.3a18)
[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.4.1a2...1.4.1a3)

**Merged pull requests:**

- Fix typo in thread state check [\#148](https://github.com/NeonGeckoCom/neon_audio/pull/148) ([NeonDaniel](https://github.com/NeonDaniel))
- Send utterance metrics for PHAL plugin [\#156](https://github.com/NeonGeckoCom/neon_audio/pull/156) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a17](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a17) (2023-10-26)
## [1.4.1a2](https://github.com/NeonGeckoCom/neon_audio/tree/1.4.1a2) (2023-11-15)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a16...1.3.3a17)
[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.4.1a1...1.4.1a2)

**Merged pull requests:**

- Update dependencies to prep for stable release [\#147](https://github.com/NeonGeckoCom/neon_audio/pull/147) ([NeonDaniel](https://github.com/NeonDaniel))
- Response timing and MQ fixes [\#155](https://github.com/NeonGeckoCom/neon_audio/pull/155) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a16](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a16) (2023-10-26)
## [1.4.1a1](https://github.com/NeonGeckoCom/neon_audio/tree/1.4.1a1) (2023-11-10)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a15...1.3.3a16)
[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.4.0...1.4.1a1)

**Merged pull requests:**

- Update dependencies to test for stable releases [\#146](https://github.com/NeonGeckoCom/neon_audio/pull/146) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a15](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a15) (2023-10-13)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a14...1.3.3a15)

**Merged pull requests:**

- Update dependencies for module compat. [\#145](https://github.com/NeonGeckoCom/neon_audio/pull/145) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a14](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a14) (2023-10-11)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a13...1.3.3a14)

**Merged pull requests:**

- ovos-audio compatibility updates [\#144](https://github.com/NeonGeckoCom/neon_audio/pull/144) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a13](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a13) (2023-10-10)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a12...1.3.3a13)

**Merged pull requests:**

- Update timing context for non-Neon skills [\#143](https://github.com/NeonGeckoCom/neon_audio/pull/143) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a12](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a12) (2023-10-10)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a11...1.3.3a12)

**Merged pull requests:**

- Pin upper limit to ovos-plugin-manager to work around breaking change [\#142](https://github.com/NeonGeckoCom/neon_audio/pull/142) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a11](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a11) (2023-10-04)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a10...1.3.3a11)

**Merged pull requests:**

- Timing metrics and ovos-audio compat [\#141](https://github.com/NeonGeckoCom/neon_audio/pull/141) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a10](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a10) (2023-08-16)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a9...1.3.3a10)

**Merged pull requests:**

- Improved language support and plugin compatibility [\#139](https://github.com/NeonGeckoCom/neon_audio/pull/139) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a9](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a9) (2023-07-26)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a8...1.3.3a9)

**Merged pull requests:**

- Update Dockerfile for Kubernetes [\#137](https://github.com/NeonGeckoCom/neon_audio/pull/137) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a8](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a8) (2023-07-18)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a7...1.3.3a8)

**Merged pull requests:**

- Mark old CLI entrypoint as deprecated [\#136](https://github.com/NeonGeckoCom/neon_audio/pull/136) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a7](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a7) (2023-07-12)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a6...1.3.3a7)

**Merged pull requests:**

- Pin ovos-audio dependency to resolve ident handling issue [\#135](https://github.com/NeonGeckoCom/neon_audio/pull/135) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a6](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a6) (2023-06-27)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a5...1.3.3a6)

**Merged pull requests:**

- Update Docker to use OVOS\_CONFIG envvars [\#134](https://github.com/NeonGeckoCom/neon_audio/pull/134) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a5](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a5) (2023-06-03)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a4...1.3.3a5)

**Merged pull requests:**

- Implement tests for CLI module [\#133](https://github.com/NeonGeckoCom/neon_audio/pull/133) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a4](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a4) (2023-05-25)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a3...1.3.3a4)

**Merged pull requests:**

- Fix missed refactoring in CLI entrypoints [\#132](https://github.com/NeonGeckoCom/neon_audio/pull/132) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a3](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a3) (2023-05-18)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a2...1.3.3a3)

**Merged pull requests:**

- Optimize module init [\#131](https://github.com/NeonGeckoCom/neon_audio/pull/131) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a2](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a2) (2023-05-17)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.3a1...1.3.3a2)

**Merged pull requests:**

- Add malloc debugging support [\#130](https://github.com/NeonGeckoCom/neon_audio/pull/130) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.3.3a1](https://github.com/NeonGeckoCom/neon_audio/tree/1.3.3a1) (2023-05-17)

[Full Changelog](https://github.com/NeonGeckoCom/neon_audio/compare/1.3.2...1.3.3a1)

**Merged pull requests:**

- Refactor for ovos-audio compat. [\#129](https://github.com/NeonGeckoCom/neon_audio/pull/129) ([NeonDaniel](https://github.com/NeonDaniel))
- Add timing metrics for response to handler in MQ client [\#154](https://github.com/NeonGeckoCom/neon_audio/pull/154) ([NeonDaniel](https://github.com/NeonDaniel))



Expand Down
17 changes: 12 additions & 5 deletions neon_audio/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ def on_started():


class NeonPlaybackService(PlaybackService):
_stopwatch = Stopwatch("get_tts")

def __init__(self, ready_hook=on_ready, error_hook=on_error,
stopping_hook=on_stopping, alive_hook=on_alive,
started_hook=on_started, watchdog=lambda: None,
Expand Down Expand Up @@ -134,6 +132,8 @@ def handle_speak(self, message):

def handle_finished(_):
audio_finished.set()

# If we have an identifier, add a callback to wait for playback
if speak_id:
self.bus.once(speak_id, handle_finished)
else:
Expand All @@ -143,6 +143,7 @@ def handle_finished(_):
if not audio_finished.wait(self._playback_timeout):
LOG.warning(f"Playback not completed for {speak_id} within "
f"{self._playback_timeout} seconds")
self.bus.remove(speak_id, handle_finished)
elif speak_id:
LOG.debug(f"Playback completed for: {speak_id}")

Expand All @@ -157,22 +158,28 @@ def handle_get_tts(self, message):
if not message.data.get("speaker"):
LOG.info(f"No speaker data with request, "
f"core defaults will be used.")
message.context.setdefault('timing', dict())
if text:
stopwatch = Stopwatch("api_get_tts", allow_reporting=True,
bus=self.bus)
if not isinstance(text, str):
message.context['timing']['response_sent'] = time()
self.bus.emit(message.reply(
ident, data={"error": f"text is not a str: {text}"}))
return
try:
with self._stopwatch:
with stopwatch:
responses = self.tts.get_multiple_tts(message)
message.context.setdefault('timing', dict())
message.context['timing']['get_tts'] = self._stopwatch.time
message.context['timing']['get_tts'] = stopwatch.time
LOG.debug(f"Emitting response: {responses}")
message.context['timing']['response_sent'] = time()
self.bus.emit(message.reply(ident, data=responses))
except Exception as e:
LOG.exception(e)
message.context['timing']['response_sent'] = time()
self.bus.emit(message.reply(ident, data={"error": repr(e)}))
else:
message.context['timing']['response_sent'] = time()
self.bus.emit(message.reply(ident,
data={"error": "No text provided."}))

Expand Down
Loading

0 comments on commit 7f0e6d0

Please sign in to comment.