Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

284
Views
¿Cómo reproducir/escuchar fragmentos de búfer en reaccionar nativo?

Estoy tratando de crear una aplicación en reaccionar nativo para hablar en el micrófono y escuchar al mismo tiempo. Probé el paquete react-native-live-audio-stream que transmite el micrófono. Aquí está el código de ejemplo:

 import React, { Component } from 'react'; import { View, SafeAreaView } from 'react-native'; import { NativeBaseProvider, Button} from 'native-base'; import LiveAudioStream from 'react-native-live-audio-stream'; import { Buffer } from 'buffer'; export default class TestMic extends Component { startListenToMic(){ LiveAudioStream.init({ sampleRate: 32000, channels: 1, bitsPerSample: 16, audioSource: 6, bufferSize: 4096 }); LiveAudioStream.on('data', data => { let chunk = Buffer.from(data, 'base64'); // => What I am supposed to do with this data to listen them? console.log(chunk) }) LiveAudioStream.start(); } stopListenToMic(){ LiveAudioStream.stop(); } render(){ return( <NativeBaseProvider> <SafeAreaView style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}> <View style={{flexDirection: 'row'}}> <Button onPress={ () => this.startListenToMic() } mr={3} >Start</Button> <Button onPress={ () => this.stopListenToMic() } ml={3} >Stop</Button> </View> </SafeAreaView> </NativeBaseProvider> ) } }

y este es el registro de datos en la consola: Registro de consola

¿Cuál es la mejor manera de convertir datos a audio y escuchar?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!