Skip to content

Commit

Permalink
microphone init
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvonthenen committed Dec 12, 2023
1 parent 2d6ba81 commit a5c2e09
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions deepgram/audio/microphone/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2023 Deepgram SDK contributors. All Rights Reserved.
# Use of this source code is governed by a MIT license that can be found in the LICENSE file.
# SPDX-License-Identifier: MIT

import pyaudio
import logging, verboselogs

from .microphone import Microphone

FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 16000
CHUNK = 8194


def microphone(
push_callback,
verbose=logging.WARNING,
format=FORMAT,
rate=RATE,
chunk=CHUNK,
channels=CHANNELS,
):
return Microphone(push_callback, verbose, format, rate, chunk, channels)

0 comments on commit a5c2e09

Please sign in to comment.