Skip to content

voice is not clear #16

@NANTHA2001

Description

@NANTHA2001

Hi Team,

I am trying to capture the audio from my microphone and send the frames into agora using push_audio_frame() function, audio reach to my remote user but that is not myvoice, voice is like a child.

can you tell a frequency rate while sending into agora?

code sinipet:

async def capture_from_java():
        """Receive audio from Java, save to PCM, and push to Agora."""
        try:
            while True:
                audio_data = await asyncio.to_thread(conn.recv, CHUNK)
                if not audio_data:
                    logger.info("❌ No data received from Java, closing file")
                    break

                # ✅ Save to file
                pcm_file.write(audio_data)
         
                # ✅ Send to Agora
                await channel.push_audio_frame(audio_data)
            

        except Exception as e:
            logger.error(f"❌ Error receiving audio from Java: {e}")
        finally:
            pcm_file.close()
            logger.info("💾 Finished saving audio file")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions