brailcom/speechd

add some level of ssml support to `module_strip_ssml`

Aberta

#905 aberto em 28 de abr. de 2024

 (0 comentário) (0 reação) (0 responsável)C (86 forks)auto 404
enhancementhelp wanted

Métricas do repositório

Stars
 (325 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Is your feature request related to a problem? Please describe. The SSML tags that clients send to speech-dispatcher are completely ignored for output modules that don't support them.

Describe the solution you'd like module_strip_ssml could be extended to support some of it. Notably:

  • break: we can easily produce silence for the requested duration
  • voice language/name/etc.: to switch voice on the fly
  • say-as: to switch spelling/etc.

The idea could be to introduce a module_handle_ssml function that returns an array of speech messages, that the module_speak function can then iterate over.

Or probably better: the processing could be done on the server side, which would require making modules tell whether they support ssml or not, see #904

This could be done in speaking.c's speak function which, after selecting the output module, could realize that it doesn't support ssml, and in that case split the ssml message into several pieces with differing parameters, and put back respective messages on the queue from which the message was obtained.

The implementation could be intermixed with support for multilinguilization (#372).

Guia do colaborador