Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Add KMP_DUPLICATE_LIB_OK flag to .env file for Windows and Linux builds #1

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,15 @@ jobs:
run: |
echo "LOCAL_RELEASE_TAG=${GITHUB_REF_NAME}" >> .env
echo "LOCAL_RELEASE_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> .env
echo "KMP_DUPLICATE_LIB_OK=TRUE" >> .env

- name: Write .env file Windows
if: matrix.os == 'windows-latest'
run: |
@"
LOCAL_RELEASE_TAG=$env:GITHUB_REF_NAME
LOCAL_RELEASE_DATE=$(Get-Date -Format 'yyyy-MM-ddTHH:mm:ssZ')
KMP_DUPLICATE_LIB_OK=TRUE
"@ | Out-File -FilePath .env -Encoding ASCII
shell: pwsh

Expand Down
12 changes: 9 additions & 3 deletions audio_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,19 @@ def get_chunk_size_frames(self):

@staticmethod
def get_audio_devices() -> list[AudioSource]:
devices = sd.query_devices(kind="input")
devices = sd.query_devices()
devices_list = []
if type(devices) is dict:
devices = [devices]
devices_list = [devices]
else:
for device in devices:
if device["max_input_channels"] > 0:
logger.debug(f"Audio device: {device}")
devices_list.append(device)
return [
AudioSource(
sourceName=device["name"],
sourceType=AudioSource.SourceType.DEVICE,
)
for device in devices
for device in devices_list
]
1 change: 1 addition & 0 deletions transcription.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def __init__(self):
self.input_queue = queue.Queue()
self.model = None
self.running = False
self.language = None
# check if model has been downloaded already
checkAndDownloadModel(ModelDownloadInfo.FASTER_WHISPER_TINY_CT2)

Expand Down