Giter VIP home page Giter VIP logo

asterisk-voicekit-modules's Introduction

INTRODUCTION

This document provides a brief description of the VoiceKit modules for Asterisk. Each module may be used individually although there are shared thitd party repositories.

Following presentation may be helpful for Russian speakers as an introduction: https://www.youtube.com/watch?v=4LRcaSM46t8

INSTALLATION

See INSTALL files for corresponding modules.

QUICKSTART

See 'examples' directory for dial-plan and configuration examples.

You may also build Docker image or use pre-built one with STT and TTS demo using your API credentials.

Building demo Docker image

  1. Put your API credentials into api_key and secret_key variables at container-mnt/grpcstt.conf and container-mnt/grpcstt.conf

  2. Build image:

docker build -t asterisk-voicekit-demo .
  1. Run container in foreground mode:
docker run -it --network=host --mount type=bind,src="$PWD/container-mnt",dst=/mnt asterisk-voicekit-demo

NOTE: System-wide Asterisk must be stopped if running!

Using pre-built Docker image

  1. Put your API credentials into api_key and secret_key variables at container-mnt/grpcstt.conf and container-mnt/grpcstt.conf

  2. Run container in foreground mode:

docker run -it --network=host --mount type=bind,src="$PWD/container-mnt",dst=/mnt tinkoffcreditsystems/asterisk-voicekit-modules:`git describe --tags`

NOTE: System-wide Asterisk must be stopped if running!

NOTE: The modules repository must be at recent release tag for git describe --tags to work properly!

For full list of pre-built images see: https://hub.docker.com/r/tinkoffcreditsystems/asterisk-voicekit-modules/tags

Configuring SIP client

  1. Install Ekiga:
sudo apt-get install ekiga
  1. Configure Ekiga:
  • Set "Edit -> Preferences -> Protocols -> SIP settings -> Outbound proxy" to "localhost"
  • Add account at "Edit -> Accounts" with following settings:
    • Name: demo-user
    • Registrar: sip
    • User: demo-user
    • Authentication user: demo-user
    • Password: lBwzDjXAwMs94Sn
  • Add contact at "Chat -> Add contact" with following settings:
    • Name: Voicekit parrot
    • Address: sip:parrot
  1. Call contact Voicekit parrot

LICENSING

Since Asterisk is distributed under the GPLv2 license, and the VoiceKit modules are loaded by and directly interface with Asterisk, the GPLv2 license applies to the VoiceKit modules too.

See COPYING files for corresponding modules for details.

asterisk-voicekit-modules's People

Contributors

g-e-okopnik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asterisk-voicekit-modules's Issues

не работает stt и не могу отдебажить

Чистый asterisk 18, для примера взял ваш конфиг

extensions.ael

WaitEventInit(); // Initialize event queue
GRPCSTTBackground(); // Initialize background recognition
PlayBackgroundInitGRPCTTS();
PlayBackground(say,,{"text":"глаголь кожанный мешок, я буду понимать что ты говоришь "});
Set(CALL_END_TIME=$[${GET_TIME_NSEC(MONOTONIC)} + 10]); // Set end time to a minute after now
Set(SLEEP_TIME=$[${CALL_END_TIME} - ${GET_TIME_NSEC(MONOTONIC)}]); // Calculate maximum wait time
while (${SLEEP_TIME} > 0) { // While not timed out yet
WaitEvent(${SLEEP_TIME}); // Wait until next event or timeout
if (${WAITEVENTSTATUS} == SUCCESS) {
Set(CurrentUTCTime=${GET_TIME_NSEC(UTC)});
Set(CurrentUTCTimeString=${STRFTIME(${CurrentUTCTime},GMT,%FT%T)}.${CurrentUTCTime:-9:});
switch (${WAITEVENTNAME}) {
case GRPCSTT_X_REQUEST_ID:
Log(NOTICE,[${CurrentUTCTimeString}] x-request-id = ${WAITEVENTBODY});
break;
case GRPCSTT_UTF8:
Log(NOTICE,[${CurrentUTCTimeString}] Phrase(UTF-8 encoded) = ${WAITEVENTBODY});
break;
default:
}
} else {
Log(NOTICE,WaitEvent() WAITEVENTSTATUS == ${WAITEVENTSTATUS}; ${WAITEVENTBODY});
}
Set(SLEEP_TIME=$[${CALL_END_TIME} - ${GET_TIME_NSEC(MONOTONIC)}]); // Update maximum wait time
}
Hangup();

tts - успешно работает никакоих нарекаий нет, но при stt

Executing [sw_3_GRPCSTT_X_REQUEST_ID@office:10] Log("PJSIP/7705-00000022", "NOTICE,[2021-02-04T15:05:20.028031482] x-request-id = e86becab-a380-4345-9a5b-9089d9196a9b") in new stack
Executing [sw_3_GRPCSTT_X_REQUEST_ID@office:10] Log("PJSIP/7705-00000022", "NOTICE,[2021-02-04T15:05:20.028031482] x-request-id = e86becab-a380-4345-9a5b-9089d9196a9b") in new stack

-- Executing [44459@office:18] Log("PJSIP/7705-00000022", "NOTICE,WaitEvent() WAITEVENTSTATUS == FAIL; ") in new stack
[Feb 4 18:05:29] NOTICE[20723][C-00000023]: Ext. 44459:18 @ office: WaitEvent() WAITEVENTSTATUS == FAIL;
log_aster.txt
приложил полный лог

GRPCSTTBackground VAD

Приветствую.

Есть ли возможность передавать параметры VAD в приложение GRPCSTTBackground?
Хотелось бы менять параметр silence_duration_threshold в зависимости от определенного UserEvent в dialplan.

После загрузки модулей в Asterisk ошибки

Добрый день.
После сборки модулей и загрузки их в Asterisk. Сначала ругается на XML Документацию, но работе не мешает.

Дальше при попытке воспользоваться данным примером https://github.com/TinkoffCreditSystems/asterisk-voicekit-modules/blob/v1.4.7/examples/combined/combined_stt_tts/etc/asterisk/extensions.ael

в консоли Asterisk выводится:

grpc_stt.cpp:650 void grpc_stt_run(int, const char*, const char*, const char*, const char*, const char*, const char*, ast_channel*, int, const char*, const char*, int, grpc_stt_frame_format, int, double, double, double, double, double, int, double): GRPC STT finished with error (code = 16): signature validation failed

app_playbackground.c:459 stream_error_callback: GRPC TTS stream finished with error (code = 16): signature validation failed

Смотрел на подпись, вроде бы AST_BUILDOPT_SUM есть в собранных модулях.

Подскажите в какую сторону смотреть?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.