Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

138
Visualizações
How to send audio segments to the API until user presses STOP

I am developing in React Native. I need to classify sound segments in a Machine Learning API. The Model in this API accepts fragments of 5 seconds.

I would like to know what is the best way of implementing this in react native.

So far, I am recording the sound, using setTimeOut to define the 5 seconds of recording (defined 5 seconds). And the part of recording and sending until the user presses stop, I am handling with setInterval (defined 7 seconds).

The problem is, setInterval requires a time to repeat again, I put 7 seconds, and sometimes, it starts a new cycle when I am still recording the sound.So I am thowrn an error saying that I cant prepare two audio records at the same time.

How to control this?

Is there another way? I tryied using WHILE cycles, but without success.

So, the dynamics are :

  1. user starts recording.

  2. the 5 seconds sound is recorded and sent to the API.

  3. again the point 2) until user presses STOP.

  4. user presses STOP.

about 4 years ago · Santiago Gelvez
1 Respostas
Responde à pergunta

0

Hi, I'm doing something similar for my graduation project. I would like to know how you are doing with the audio issue and how you send it to the API. I'm starting on the React Native topic. but I don't know why the audio is not saved, it only generates the URL where it saves but not the file.

almost 4 years ago · Brayam Alexis Castro Correa Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda