Skip to content

Instantly share code, notes, and snippets.

View strvert's full-sized avatar

Riku Ishikawa strvert

View GitHub Profile
"""音声クリーンアップ API サーバー (BS-RoFormer) — CPU/GPU パイプライン版
3 段を別 thread pool で走らせて複数リクエストを重ね合わせる:
1. CPU decode — ffmpeg subprocess で任意フォーマットを (2, N) float32 に展開
2. GPU infer — patched demix ループ、gpu_executor=1 で直列化
3. CPU encode — ピーク正規化 + soundfile で FLAC 書き出し
GPU が N 番目を処理中に N+1 番目の decode と N-1 番目の encode が並走するため、
シングル GPU でも実効スループットが大きく向上する。
Begin Object Class=/Script/BlueprintGraph.K2Node_FunctionEntry Name="K2Node_FunctionEntry_5839" ExportPath="/Script/BlueprintGraph.K2Node_FunctionEntry'/Game/StarterContent/Blueprints/BP_LightStudio.BP_LightStudio:UserConstructionScript.K2Node_FunctionEntry_5839'"
bEnforceConstCorrectness=False
FunctionReference=(MemberParent="/Script/CoreUObject.Class'/Script/Engine.Actor'",MemberName="UserConstructionScript")
NodePosX=-464
NodeGuid=378D88C149A16068789D01A8662240E0
CustomProperties Pin (PinId=872688C8427089C78D3A70B361A74EF4,PinName="then",Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_ExecutionSequence_1383 A1966B3D471AD206A18A9A853E7692DF,),PersistentGuid=00000000000
@strvert
strvert / Sample
Created September 17, 2023 14:40
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_31371" ExportPath="/Script/BlueprintGraph.K2Node_CallFunction'/Game/StarterContent/Blueprints/BP_LightStudio.BP_LightStudio:UserConstructionScript.K2Node_CallFunction_31371'"
FunctionReference=(MemberParent="/Script/CoreUObject.Class'/Script/Engine.AtmosphericFogComponent'",MemberName="SetDefaultBrightness")
NodePosX=3904
NodePosY=-240
NodeGuid=A5B49BB341A4BBE9019B3995F051E402
CustomProperties Pin (PinId=3F7591174AFB9D61754929A74B1F9B89,PinName="execute",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultVal
main {
--color-text-primary: #24292f;
--color-text-secondary: #57606a;
--color-text-tertiary: #57606a;
--color-text-link: #0969da;
--color-text-danger: #cf222e;
--color-text-success: #1a7f37;
--color-border-primary: #d0d7de;
--color-border-secondary: #d8dee4;
--color-border-tertiary: rgba(175, 184, 193, 0.4);
type RecrArgsType = {
depth: number;
};
class PausableRecursiveRunner<ArgsType extends RecrArgsType> {
holder: Array<ArgsType>;
constructor(args: Readonly<ArgsType>) {
this.holder = new Array();
this.holder.push(args);
@strvert
strvert / GuidHelper.h
Last active June 24, 2021 08:04
UE4でwinrt触るときに書いたやつ
#pragma once
namespace BPLGuidHelper
{
namespace Impl
{
struct IntermediateGuid
{
uint32_t Data1;
uint16_t Data2;
@strvert
strvert / type_to_enum.cpp
Created June 24, 2021 03:53
require c++20
#include <iostream>
#include <map>
enum class TypeEnum : uint8_t {
Unknown = 1,
Int,
Float,
Double,
Char,
};
#include <iostream>
#include <string>
#include <tuple>
struct strct1 {
float f;
int i;
std::string s;
};
namespace enum_class_utils {
template <typename Enum>
struct impl_bitwise_ops: std::false_type {};
template <typename Enum>
constexpr bool impl_bitwise_ops_v = impl_bitwise_ops<Enum>::value;
namespace impl_bitwize_ops_content {
template <typename T>
using s_underlying_t = std::conditional_t<std::is_enum_v<T>, std::underlying_type_t<T>, T>;
namespace enum_class_utils {
template <typename Enum>
struct impl_bitwise_ops: std::false_type {};
template <typename Enum>
constexpr bool impl_bitwise_ops_v = impl_bitwise_ops<Enum>::value;
namespace impl_bitwize_ops_content {
enum class fallback_enum {};
template <typename T>
using s_underlying_t = std::conditional_t<std::is_enum_v<T>, std::underlying_type_t<T>, T>;