Compare commits
No commits in common. "240b245154d23a9cf04b968d0862141c70015bf2" and "867efce90d3a829c2e4d1efaf7604887f2362cbd" have entirely different histories.
240b245154
...
867efce90d
26 changed files with 27 additions and 29 deletions
|
@ -27,7 +27,7 @@ trigger event="Raid" {
|
|||
## For developers
|
||||
Extending audiencekit's automation abilities is made as simple as possible. For example, a plugin that automatically changes "simp" to "shrimp" in every message (as seen by those consuming this project's output) is simply:
|
||||
```python
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.events import Message
|
||||
|
||||
class Plugin(PluginBase):
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
|
@ -17,12 +17,11 @@ import hypercorn
|
|||
import hypercorn.asyncio
|
||||
import hypercorn.logging
|
||||
|
||||
from ovtk_audiencekit.core import WebsocketServerProcess
|
||||
from ovtk_audiencekit.core.Config import parse_kdl_deep, kdl_reserved, compute_dynamic
|
||||
from ovtk_audiencekit.core.Plugins import PluginError
|
||||
from ovtk_audiencekit.core.WebsocketServerProcess import WebsocketServerProcess
|
||||
from ovtk_audiencekit.events import Event, Delete
|
||||
from ovtk_audiencekit.chats.ChatProcess import ShutdownRequest
|
||||
from ovtk_audiencekit.plugins import builtins
|
||||
from ovtk_audiencekit.plugins import builtins, PluginError
|
||||
from ovtk_audiencekit.utils import format_exception
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
from .WebsocketServerProcess import WebsocketServerProcess
|
||||
from .Plugins import PluginBase, PluginError
|
||||
from .MainProcess import MainProcess
|
||||
from .Audio import Clip, Stream
|
||||
|
|
|
@ -7,4 +7,3 @@ from .Subscription import Subscription
|
|||
from .Follow import Follow
|
||||
|
||||
__all__ = ['Event', 'Message', 'SysMessage', 'Delete', 'Control', 'Subscription', 'Follow']
|
||||
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
||||
|
|
|
@ -3,13 +3,11 @@ from collections import deque
|
|||
|
||||
import maya
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.core import Clip, Stream
|
||||
|
||||
class AudioAlert(PluginBase):
|
||||
def setup(self, output=None, timeout_min=1, sample_rate=None, buffer_length=4096, force_stereo=True):
|
||||
self._cleanup_task = asyncio.create_task(self._cleanup())
|
||||
|
||||
self.force_stereo = force_stereo
|
||||
self.timeout_min = timeout_min
|
||||
self.clips = {}
|
||||
|
@ -23,6 +21,8 @@ class AudioAlert(PluginBase):
|
|||
except StopIteration:
|
||||
self.logger.warn('Target audio device does not claim to support common sample rates! Attempting playback at native rate of audio')
|
||||
|
||||
self._cleanup_task = asyncio.create_task(self._cleanup())
|
||||
|
||||
def run(self, path, speed=1, keep_pitch=False, immediate=True, poly=1, **kwargs):
|
||||
poly = int(poly)
|
||||
key = f'{path}@{speed}{"X" if keep_pitch else "x"}'
|
||||
|
|
|
@ -7,7 +7,7 @@ import maya
|
|||
from requests.exceptions import HTTPError
|
||||
from owoify.owoify import owoify, Owoness
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.core.Data import CACHE_DIR
|
||||
from ovtk_audiencekit.plugins.builtins.Command import Command, CommandTypes
|
||||
from ovtk_audiencekit.events.Message import Message, SysMessage
|
||||
|
|
|
@ -2,7 +2,7 @@ import asyncio
|
|||
|
||||
import mido
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
|
||||
|
||||
def matches(msg, attrs):
|
||||
|
|
|
@ -2,7 +2,7 @@ import asyncio
|
|||
|
||||
import simpleobsws
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
|
||||
|
||||
class OBSWSPlugin(PluginBase):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from pythonosc.udp_client import SimpleUDPClient
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
|
||||
|
||||
class OSCPlugin(PluginBase):
|
||||
|
|
|
@ -4,7 +4,7 @@ import json
|
|||
import os
|
||||
|
||||
from ovtk_audiencekit.core.Data import CACHE_DIR
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.events import Message
|
||||
|
||||
from .Formatter import PhraseCountFormatter
|
||||
|
|
|
@ -2,7 +2,7 @@ from argparse import ArgumentError
|
|||
|
||||
from requests.exceptions import HTTPError
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.plugins.builtins.Command import Command, CommandTypes
|
||||
from ovtk_audiencekit.events.Message import Message, SysMessage, USER_TYPE
|
||||
from ovtk_audiencekit.chats.Twitch import Process as Twitch
|
||||
|
|
|
@ -6,7 +6,7 @@ from TTS.utils.synthesizer import Synthesizer
|
|||
from TTS.utils.manage import ModelManager
|
||||
from TTS.config import load_config
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.events import Message, SysMessage
|
||||
from ovtk_audiencekit.core import Clip, Stream
|
||||
from ovtk_audiencekit.core.Data import CACHE_DIR
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
||||
from ovtk_audiencekit.core.PluginBase import PluginBase, PluginError
|
||||
|
||||
__all__ = ['PluginBase', 'PluginError']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import random
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
|
||||
|
||||
class ChancePlugin(PluginBase):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import subprocess
|
||||
import random
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.events import SysMessage
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import sys
|
|||
|
||||
from multipledispatch import dispatch
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.events import Message, SysMessage
|
||||
from ovtk_audiencekit.events.Message import USER_TYPE
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import uuid
|
|||
import maya
|
||||
import aioscheduler
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.utils import format_exception
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import subprocess
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.events import SysMessage
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
|
||||
import logging
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.events import SysMessage, Message
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import json
|
|||
|
||||
import kdl
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.utils import format_exception
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.core.Config import compute_dynamic
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import re
|
|||
from dataclasses import dataclass
|
||||
import typing
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.events import Message
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
|
||||
from ovtk_audiencekit.core import PluginBase
|
||||
from ovtk_audiencekit.plugins import PluginBase
|
||||
from ovtk_audiencekit.events import SysMessage, Message
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue