Skip to content

Add microphone realtime example#88

Merged
HennerM merged 1 commit into
masterfrom
microphone-example
Feb 29, 2024
Merged

Add microphone realtime example#88
HennerM merged 1 commit into
masterfrom
microphone-example

Conversation

@HennerM
Copy link
Copy Markdown
Contributor

@HennerM HennerM commented Feb 24, 2024

Quick example how microphone input can be read and transcribed with the sound device and speechmatics libraries

Copy link
Copy Markdown
Contributor

@aaronng91 aaronng91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding such an example!

Comment thread examples/transcribe_from_microphone.py Outdated
) as stream:
settings = speechmatics.models.AudioSettings(
sample_rate=frame_rate,
chunk_size=1024 * 4,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does this chunk size value come from? maybe add a comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it now, it was set to the default value anyway

Comment thread examples/transcribe_from_microphone.py Outdated
conf = speechmatics.models.TranscriptionConfig(
language="en",
operating_point="enhanced",
max_delay=2,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this can be a user input? this can vary the performance of RT depending on the delay

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes good idea, changed!

@HennerM HennerM merged commit d6303be into master Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants