Skip to content

Commit

Permalink
⬆ bump edge-tts to v6.1.9 (#44)
Browse files Browse the repository at this point in the history
- adds back the pitch option

Signed-off-by: rany <ranygh@riseup.net>
  • Loading branch information
rany2 committed Nov 4, 2023
1 parent 547e645 commit 574673e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ tts:
### Options
- [`voice`](https://docs.microsoft.com/zh-CN/azure/cognitive-services/speech-service/speech-synthesis-markup?tabs=csharp#use-multiple-voices)
- [`rate` / `volume`](https://docs.microsoft.com/zh-CN/azure/cognitive-services/speech-service/speech-synthesis-markup?tabs=csharp#adjust-prosody)
- [`pitch` / `rate` / `volume`](https://docs.microsoft.com/zh-CN/azure/cognitive-services/speech-service/speech-synthesis-markup?tabs=csharp#adjust-prosody)

> `pitch` is no longer supported ([#24](https://github.com/hasscc/hass-edge-tts/issues/24)).
>
> `style` / `styledegree` / `role` / `contour` are no longer supported ([#8](https://github.com/hasscc/hass-edge-tts/issues/8)).

### Basic example
Expand Down
2 changes: 1 addition & 1 deletion custom_components/edge_tts/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"documentation": "https://github.com/hasscc/hass-edge-tts",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/hasscc/hass-edge-tts/issues",
"requirements": ["edge-tts==6.1.8"],
"requirements": ["edge-tts==6.1.9"],
"version": "0.0.1"
}
10 changes: 2 additions & 8 deletions custom_components/edge_tts/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import voluptuous as vol
from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider

EDGE_TTS_VERSION = '6.1.8'
EDGE_TTS_VERSION = '6.1.9'
try:
import edge_tts
if '__version__' not in dir(edge_tts) or edge_tts.__version__ != EDGE_TTS_VERSION:
Expand Down Expand Up @@ -395,18 +395,12 @@ async def async_get_tts_audio(self, message, language, options=None):
)
break

if opt.get('pitch') is not None:
_LOGGER.warning(
'Edge TTS option pitch is no longer supported, '
'please remove it from your automation or script. '
'See: https://github.com/hasscc/hass-edge-tts/issues/24'
)

_LOGGER.debug('%s: %s', self.name, [message, opt])
mp3 = b''
tts = EdgeCommunicate(
message,
voice=voice,
pitch=opt.get('pitch', '+0Hz'),
rate=opt.get('rate', '+0%'),
volume=opt.get('volume', '+0%'),
)
Expand Down

0 comments on commit 574673e

Please sign in to comment.