Skip to content

Commit

Permalink
feat: update ten runtime to 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyoucao577 committed Dec 26, 2024
1 parent 0bee664 commit c7332df
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "azure_tts",
"image": "ghcr.io/ten-framework/ten_agent_build:0.3.2",
"image": "ghcr.io/ten-framework/ten_agent_build:0.3.3",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
matrix:
build_type: [debug, release]
container:
image: ghcr.io/ten-framework/ten_agent_build:0.3.2
image: ghcr.io/ten-framework/ten_agent_build:0.3.3
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TEN extension of [azure Text to speech service](https://learn.microsoft.com/en-u
Only `linux/amd64` building inside container is supported at the moment.

```bash
# inside docker ghcr.io/ten-framework/ten_agent_build:0.3.2
# inside docker ghcr.io/ten-framework/ten_agent_build:0.3.3

task build
```
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"type": "extension",
"name": "azure_tts",
"version": "0.7.0",
"version": "0.7.1",
"dependencies": [
{
"type": "system",
"name": "ten_runtime",
"version": "0.5"
"version": "0.6"
},
{
"type": "system",
Expand Down
16 changes: 8 additions & 8 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#include "log.h"
#include "ten_runtime/binding/cpp/ten.h"
#include "ten_utils/macro/check.h"
#include "tts.h"
#include "tmpl.h"
#include "tts.h"

namespace azure_tts_extension {

std::string trimString(const std::string& input) {
std::string trimString(const std::string &input) {
std::string result = input;
std::string::size_type pos;

Expand All @@ -43,7 +43,7 @@ std::string trimString(const std::string& input) {

class azure_tts_extension_t : public ten::extension_t {
public:
explicit azure_tts_extension_t(const std::string &name) : extension_t(name) {}
explicit azure_tts_extension_t(const char *name) : extension_t(name) {}

// on_start will be called when the extension is starting,
// properies can be read here to initialize and start the extension.
Expand Down Expand Up @@ -166,11 +166,11 @@ class azure_tts_extension_t : public ten::extension_t {
if (!language_.empty() && (!prosody_.empty() || !role_.empty() || !style_.empty())) {
MsttsTemplate tmpl;
auto ssml_text = tmpl.replace(json{{"role", role_},
{"voice", voice_},
{"lang", language_},
{"style", style_},
{"prosody", prosody_},
{"text", text}});
{"voice", voice_},
{"lang", language_},
{"style", style_},
{"prosody", prosody_},
{"text", text}});
AZURE_TTS_LOGI("input ssml text: [%s]", ssml_text.c_str());
azure_tts_->Push(ssml_text, true);
} else {
Expand Down

0 comments on commit c7332df

Please sign in to comment.