Skip to content

Commit

Permalink
Merge pull request #137 from ReproNim/bf-condaforge-tests
Browse files Browse the repository at this point in the history
Fixes basic tests execution under conda-forge.
  • Loading branch information
vmdocua authored Feb 7, 2025
2 parents 26e41f5 + d31cec9 commit a03fab0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/reprostim/audio/audiocodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# SPDX-License-Identifier: MIT

# optionally: import sounddevice as sd
import importlib
import logging
import os
import tempfile
Expand All @@ -10,11 +12,17 @@
from enum import Enum

import numpy as np
import sounddevice as sd
from reedsolo import RSCodec
from scipy.io import wavfile
from scipy.io.wavfile import read, write

sd = (
importlib.import_module("sounddevice")
if importlib.util.find_spec("sounddevice")
else None
)


# setup logging
logger = logging.getLogger(__name__)
logger.setLevel(os.environ.get("REPROSTIM_LOG_LEVEL", "INFO"))
Expand Down

0 comments on commit a03fab0

Please sign in to comment.