Skip to content

Commit

Permalink
Merge pull request #14 from occ-ai/roy.more_refactor_add_cuda
Browse files Browse the repository at this point in the history
Add new header files and functions for whisper processing and utilities
  • Loading branch information
royshil committed Apr 13, 2024
2 parents c1983cc + 346dd53 commit a11df79
Show file tree
Hide file tree
Showing 15 changed files with 1,038 additions and 765 deletions.
6 changes: 6 additions & 0 deletions .github/actions/build-plugin/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
description: 'Build configuration'
required: false
default: 'RelWithDebInfo'
cublas:
description: 'Enable cuBLAS'
required: false
default: 'cpu'
codesign:
description: 'Enable codesigning (macOS only)'
required: false
Expand Down Expand Up @@ -81,6 +85,8 @@ runs:
}
.github/scripts/Build-Windows.ps1 @BuildArgs
env:
CPU_OR_CUDA: ${{ inputs.cublas }}

- name: Create Summary 📊
if: contains(fromJSON('["Linux", "macOS"]'),runner.os)
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/package-plugin/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
description: 'Build configuration'
required: false
default: 'RelWithDebInfo'
cublas:
description: 'Enable cuBLAS'
required: false
default: 'cpu'
codesign:
description: 'Enable codesigning (macOS only)'
required: false
Expand Down Expand Up @@ -108,6 +112,7 @@ runs:
$PackageArgs = @{
Target = '${{ inputs.target }}'
Configuration = '${{ inputs.config }}'
Cublas = '${{ inputs.cublas }}'
}
if ( '${{ inputs.package }}' -eq 'true' ) {
Expand Down
7 changes: 6 additions & 1 deletion .github/scripts/Package-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ function Package {
$BuildSpec = Get-Content -Path ${BuildSpecFile} -Raw | ConvertFrom-Json
$ProductName = $BuildSpec.name
$ProductVersion = $BuildSpec.version
$CudaName = "cuda${Cublas}"
# Check if $cublas is cpu or cuda
if ( $Cublas -eq 'cpu' ) {
$CudaName = 'cpu'
} else {
$CudaName = "cuda${Cublas}"
}

$OutputName = "${ProductName}-${ProductVersion}-windows-${Target}-${CudaName}"

Expand Down
16 changes: 1 addition & 15 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ jobs:
needs: check-event
strategy:
matrix:
cublas: [cpu] # , 12.2.0, 11.8.0
cublas: [cpu, 12.2.0, 11.8.0]
defaults:
run:
shell: pwsh
Expand All @@ -237,20 +237,6 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: Install CUDA Toolkit
if: ${{ matrix.cublas != 'cpu' }}
id: cuda-toolkit
uses: Jimver/[email protected]
with:
cuda: '${{ matrix.cublas }}'

- name: Set CUDA_TOOLKIT_ROOT_DIR if CUDA is installed
if: ${{ matrix.cublas != 'cpu' }}
run: |
ls "$env:CUDA_PATH\bin"
ls -d 2 "$env:CUDA_PATH\lib"
"CUDA_TOOLKIT_ROOT_DIR=$env:CUDA_PATH" >> $env:GITHUB_ENV
- name: Set Up Environment 🔧
id: setup
run: |
Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ include(cmake/BuildWhispercpp.cmake)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Whispercpp)

target_sources(
${CMAKE_PROJECT_NAME} PRIVATE src/plugin-main.c src/cleanstream-filter.cpp src/cleanstream-filter.c
src/model-utils/model-downloader.cpp src/model-utils/model-downloader-ui.cpp)
${CMAKE_PROJECT_NAME}
PRIVATE src/plugin-main.c
src/cleanstream-filter.cpp
src/cleanstream-filter.c
src/model-utils/model-downloader.cpp
src/model-utils/model-downloader-ui.cpp
src/whisper-utils/whisper-utils.cpp
src/whisper-utils/whisper-processing.cpp)

set_target_properties_plugin(${CMAKE_PROJECT_NAME} PROPERTIES OUTPUT_NAME ${_name})
30 changes: 15 additions & 15 deletions buildspec.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"dependencies": {
"obs-studio": {
"version": "29.1.3",
"version": "30.0.2",
"baseUrl": "https://github.com/obsproject/obs-studio/archive/refs/tags",
"label": "OBS sources",
"hashes": {
"macos": "9d9cfbdbdd255f48a23feeefb60089769a65f52bbca24fa31d74125f3bbb0e90",
"windows-x64": "965334470e447dc164801f8812d583260761521e6e3c5ebee1da7cd8f6ec4a95"
"macos": "be12c3ad0a85713750d8325e4b1db75086223402d7080d0e3c2833d7c5e83c27",
"windows-x64": "970058c49322cfa9cd6d620abb393fed89743ba7e74bd9dbb6ebe0ea8141d9c7"
}
},
"prebuilt": {
"version": "2023-06-22",
"version": "2023-11-03",
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
"label": "Pre-Built obs-deps",
"hashes": {
"macos": "a0d2e03f0ea79681634c31627430a220d9b62113d6ff58174d0bdab6fafdd32b",
"windows-x64": "1b12e86e2d62a97a889866d66b95fe47ddc6f7fa9b13e88aedfab4ea9e298ea2"
"macos": "90c2fc069847ec2768dcc867c1c63b112c615ed845a907dc44acab7a97181974",
"windows-x64": "d0825a6fb65822c993a3059edfba70d72d2e632ef74893588cf12b1f0d329ce6"
}
},
"qt6": {
"version": "2023-06-22",
"version": "2023-11-03",
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
"label": "Pre-Built Qt6",
"hashes": {
"macos": "f890d258a1afa7ba409b79c8ee55d53155e5c72105b8b18a3f52047ee70fc0aa",
"windows-x64": "1907fbcbcef69527154b29316c425b0885afb77ad69a9a2af7a1471d79512195"
"macos": "ba4a7152848da0053f63427a2a2cb0a199af3992997c0db08564df6f48c9db98",
"windows-x64": "bc57dedf76b47119a6dce0435a2f21b35b08c8f2948b1cb34a157320f77732d1"
},
"debugSymbols": {
"windows-x64": "b461a7ade0c099505baea857fa5b98c4f8e9b702681be019ea354735d062e065"
"windows-x64": "fd8ecd1d8cd2ef049d9f4d7fb5c134f784836d6020758094855dfa98bd025036"
}
}
},
Expand All @@ -45,13 +45,13 @@
}
},
"name": "obs-cleanstream",
"version": "0.0.3",
"version": "0.0.4",
"author": "Roy Shilkrot",
"website": "https://github.com/royshil/obs-cleanstream/",
"website": "https://github.com/occ-ai/obs-cleanstream/",
"email": "[email protected]",
"uuids": {
"macosPackage": "00000000-0000-0000-0000-000000000000",
"macosInstaller": "00000000-0000-0000-0000-000000000000",
"windowsApp": "00000000-0000-0000-0000-000000000000"
"macosPackage": "b6f62fcf-36d3-4006-8b9a-dc0df1875dda",
"macosInstaller": "0e828987-688e-4510-9aee-d39605ce2332",
"windowsApp": "39bf1865-9d79-4754-8ce2-150132f47012"
}
}
Loading

0 comments on commit a11df79

Please sign in to comment.