npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

dta-voice

v20.0.4

Published

Biblioteca para gravação de áudio com Angular e PO UI que depois converta o áudio gravado em json estruturado.

Downloads

255

Readme

# DTA VOICE

Biblioteca para facilitar a extração de texto através de audios.

## Como instalar

```bash
npm install dta-voice

ou

yarn add dta-voice

Como usar

É necessário possuir um código de projeto para uso. Após obtenção do código do projeto, basta seguir os passos abaixo.

Uso no HTML

    <po-button 
        p-label="Carregar dados para pagina"
        p-icon="po-icon-ok"
        p-kind="primary"
        (p-click)="openNewVoice()">
    </po-button>

  <dta-voice 
    labelHeader="Nome que vai aparece no cabeçalho do slider como subtitle"
    [context]="context"
    [jsonReturn]="jsonReturn" 
    [idDtaVoice]="idDtaVoice"
    [idProjeto]="idProjeto"
    [welcomeTitle]="valorX" /*opcional mudar o titulo da tela de boas vindas*/
    [welcomeDescription]="'testeb'"/*opcional mudar o titulo da tela de boas vindas*/
    [welcomeFeatures]="'testeC'"/*opcional mudar o titulo da tela de boas vindas*/
    [user]="user"
    [contingency]="contingency"
    (informacaoEnviada)="receberInformacao({ menssagem
    : $event.message, uniqueKey: $event.uniqueKey})" 
    #sliderNewVoice>
  </dta-voice>

Para TypeScript

jsonReturn: AudioJsonModel[] = [
    {
      fieldName: 'medications',
      fieldType: 'array',
      fieldDescription: 'Medicamentos do paciente',
      isRequired: true,
      subFields: [
        {
          fieldName: 'medication_name',
          fieldType: 'string',
          fieldDescription: 'Nome do medicamento',
          isRequired: true
        },
        {
          fieldName: 'dosage',
          fieldType: 'string',
          fieldDescription: 'Dosagem',
          isRequired: true
        },
        {
          fieldName: 'frequency',
          fieldType: 'string',
          fieldDescription: 'Frequência',
          isRequired: true
        }
      ]
    },
    {
      fieldName: 'patient_name',
      fieldType: 'string',
      fieldDescription: 'Nome do paciente',
      isRequired: true
    },
    {
      fieldName: 'patient_age',
      fieldType: 'number',
      fieldDescription: 'Idade do paciente',
      isRequired: true
    }
  ];

  context = ""; //Informação que vai de contexto para llm, por exemplo medicina
  idProjeto = "";
  idDtaVoice = "";
  user = "";
  contingency = '';

  @ViewChild('sliderNewVoice')
  private readonly sliderNewVoice?: DtaVoiceComponent;

  openNewVoice() {
    this.sliderNewVoice?.openNewVoice();
  }

Para facilitar a criação do Json acima

https://html-teste-pi.vercel.app/
receberInformacao(informacao: { menssagem: JsonReturnAiModel; uniqueKey: number; }) {
    //Abaixo é dado recebido pelo json estruturado, depois de recebe o json estruturado 
    // pode preencher o formulario ou usar de outra forma
    console.log(informacao);
}

Explicação do buttonList

  • fieldName: Nome do campo.
  • fieldType: Tipo de dado esperado.
  • fieldDescription: Descrição do campo.
  • isRequired: Se o campo é obrigatório

Dados experados no exemplo

export interface Root {
    patient_name: string
    patient_age: number
    medications: MedicamentosModel[]
}

export interface MedicamentosModel {
    medication_name: string
    dosage: string
    frequency: string
}

(Opcional) Habilitar o Tour

Caso queira usar o tour de demostração de como usar aplicação Angular, siga os passos abaixo:

Coloque a variável enableTour como true no componente e, depois, siga as etapas abaixo.

  <dta-voice 
  [enableTour]="'true'"
    .
    .
    .
  >
  </dta-voice>

1. Instale a biblioteca

É necessário instalar a biblioteca angular-shepherd:

npm i angular-shepherd

2. Inclua as dependências de estilo

No arquivo angular.json, adicione o Shepherd CSS na seção de estilos:

"styles": [
  "node_modules/shepherd.js/dist/css/shepherd.css"
]

Observação: Certifique-se de que o caminho está correto para o seu projeto e que a linha do Shepherd CSS foi realmente adicionada.

Referências: