@overwolf/ow-electron-packages-types 1.0.1-beta.0 → 1.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types.d.ts +373 -0
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1663,7 +1663,372 @@ type VideoRecordingSplitType =
|
|
|
1663
1663
|
/** `manual` — Splitting is controlled programmatically or by user input. */
|
|
1664
1664
|
| 'manual';
|
|
1665
1665
|
|
|
1666
|
+
/**
|
|
1667
|
+
* The base configuration for an audio processing filter.
|
|
1668
|
+
*
|
|
1669
|
+
* This interface serves as a blueprint for all audio filters within the system,
|
|
1670
|
+
* ensuring they have a unique identifier and a flexible container for settings.
|
|
1671
|
+
* * @example
|
|
1672
|
+
* ```typescript
|
|
1673
|
+
* const lowPass: AudioFilterBase = {
|
|
1674
|
+
* id: 'low-pass-001',
|
|
1675
|
+
* parameters: {
|
|
1676
|
+
* cutoff: 500,
|
|
1677
|
+
* resonance: 1.2
|
|
1678
|
+
* }
|
|
1679
|
+
* };
|
|
1680
|
+
* ```
|
|
1681
|
+
*/
|
|
1682
|
+
export interface AudioFilterBase {
|
|
1683
|
+
/**
|
|
1684
|
+
* A unique identifier for the filter instance.
|
|
1685
|
+
*/
|
|
1686
|
+
id: string;
|
|
1687
|
+
|
|
1688
|
+
/**
|
|
1689
|
+
* A collection of key-value pairs representing the filter's configuration.
|
|
1690
|
+
*
|
|
1691
|
+
*/
|
|
1692
|
+
parameters?: Record<string, number | string>;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* A specialized filter for dynamic range compression.
|
|
1697
|
+
* * @example
|
|
1698
|
+
* ```typescript
|
|
1699
|
+
* const vocalComp: AudioCompressorFilter = {
|
|
1700
|
+
* id: 'compressor_filter',
|
|
1701
|
+
* parameters: {
|
|
1702
|
+
* ratio: 4,
|
|
1703
|
+
* threshold: -20
|
|
1704
|
+
* }
|
|
1705
|
+
* };
|
|
1706
|
+
* ```
|
|
1707
|
+
*/
|
|
1708
|
+
export interface AudioCompressorFilter extends AudioFilterBase {
|
|
1709
|
+
/**
|
|
1710
|
+
* A unique identifier for the filter instance.
|
|
1711
|
+
*/
|
|
1712
|
+
id: 'compressor_filter';
|
|
1666
1713
|
|
|
1714
|
+
/**
|
|
1715
|
+
* Configuration settings specific to the compressor.
|
|
1716
|
+
*/
|
|
1717
|
+
parameters?: {
|
|
1718
|
+
/**
|
|
1719
|
+
* The amount of gain reduction applied once the signal exceeds the threshold.
|
|
1720
|
+
* Valid range: [1.00, 32.00]
|
|
1721
|
+
*/
|
|
1722
|
+
ratio?: number;
|
|
1723
|
+
|
|
1724
|
+
/**
|
|
1725
|
+
* The level (in dB) above which compression begins.
|
|
1726
|
+
* Valid range: [-60.0, 0.00]
|
|
1727
|
+
*/
|
|
1728
|
+
threshold?: number;
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* How quickly (in ms) the compressor reduces the volume.
|
|
1732
|
+
* Valid range: [1, 500]
|
|
1733
|
+
*/
|
|
1734
|
+
attack_time?: number;
|
|
1735
|
+
|
|
1736
|
+
/**
|
|
1737
|
+
* How quickly (in ms) the compressor returns to normal volume after the signal drops.
|
|
1738
|
+
* Valid range: [1, 1000]
|
|
1739
|
+
*/
|
|
1740
|
+
release_time?: number;
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* The gain (in dB) applied to the signal after compression to compensate for volume loss.
|
|
1744
|
+
* Valid range: [-32.00, 32.00]
|
|
1745
|
+
*/
|
|
1746
|
+
output_gain?: number;
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* A specialized filter for dynamic range expansion or noise gating.
|
|
1752
|
+
* * @example
|
|
1753
|
+
* ```typescript
|
|
1754
|
+
* const noiseGate: AudioExpanderFilter = {
|
|
1755
|
+
* id: 'expander_filter',
|
|
1756
|
+
* parameters: {
|
|
1757
|
+
* presets: 'gate',
|
|
1758
|
+
* threshold: -40,
|
|
1759
|
+
* detector: 'peak'
|
|
1760
|
+
* }
|
|
1761
|
+
* };
|
|
1762
|
+
* ```
|
|
1763
|
+
*/
|
|
1764
|
+
export interface AudioExpanderFilter extends AudioFilterBase {
|
|
1765
|
+
/**
|
|
1766
|
+
* A unique identifier for the filter instance.
|
|
1767
|
+
*/
|
|
1768
|
+
id: 'expander_filter';
|
|
1769
|
+
|
|
1770
|
+
/**
|
|
1771
|
+
* Configuration settings specific to the expander/gate.
|
|
1772
|
+
*/
|
|
1773
|
+
parameters?: {
|
|
1774
|
+
/**
|
|
1775
|
+
* Pre-defined configuration modes for common expansion tasks.
|
|
1776
|
+
*/
|
|
1777
|
+
presets?: 'expander' | 'gate';
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
* The ratio of expansion. Higher values result in more aggressive reduction
|
|
1781
|
+
* of signals below the threshold.
|
|
1782
|
+
* Valid range: [1.00, 20.00]
|
|
1783
|
+
*/
|
|
1784
|
+
ratio?: number;
|
|
1785
|
+
|
|
1786
|
+
/**
|
|
1787
|
+
* The level (in dB) below which expansion or gating begins.
|
|
1788
|
+
* Valid range: [-60.00, 0.00]
|
|
1789
|
+
*/
|
|
1790
|
+
threshold?: number;
|
|
1791
|
+
|
|
1792
|
+
/**
|
|
1793
|
+
* How quickly (in ms) the expander reduces the volume once the signal drops below threshold.
|
|
1794
|
+
* Valid range: [1, 100]
|
|
1795
|
+
*/
|
|
1796
|
+
attack_time?: number;
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* How quickly (in ms) the expander returns to unity gain once the signal rises above threshold.
|
|
1800
|
+
* Valid range: [1, 1000]
|
|
1801
|
+
*/
|
|
1802
|
+
release_time?: number;
|
|
1803
|
+
|
|
1804
|
+
/**
|
|
1805
|
+
* The gain (in dB) applied to the signal after processing.
|
|
1806
|
+
* Valid range: [-32.00, 32.00]
|
|
1807
|
+
*/
|
|
1808
|
+
output_gain?: number;
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* The method used to calculate the signal level.
|
|
1812
|
+
* - `RMS`: Root Mean Square (average power).
|
|
1813
|
+
* - `peak`: Highest instantaneous signal level.
|
|
1814
|
+
*/
|
|
1815
|
+
detector?: 'RMS' | 'peak';
|
|
1816
|
+
};
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
/**
|
|
1820
|
+
* A simple filter used to adjust the volume or amplitude of an audio signal.
|
|
1821
|
+
* * @example
|
|
1822
|
+
* ```typescript
|
|
1823
|
+
* const boost: AudioGainFilter = {
|
|
1824
|
+
* id: 'gain_filter',
|
|
1825
|
+
* parameters: {
|
|
1826
|
+
* db: 6.5
|
|
1827
|
+
* }
|
|
1828
|
+
* };
|
|
1829
|
+
* ```
|
|
1830
|
+
*/
|
|
1831
|
+
export interface AudioGainFilter extends AudioFilterBase {
|
|
1832
|
+
/**
|
|
1833
|
+
* A unique identifier for the filter instance.
|
|
1834
|
+
*/
|
|
1835
|
+
id: 'gain_filter';
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
* Configuration settings for gain adjustment.
|
|
1839
|
+
*/
|
|
1840
|
+
parameters?: {
|
|
1841
|
+
/**
|
|
1842
|
+
* The amount of gain to apply to the signal, measured in decibels (dB).
|
|
1843
|
+
* Positive values amplify the signal, while negative values attenuate it.
|
|
1844
|
+
* * Valid range: [-30.00, 30.00]
|
|
1845
|
+
*/
|
|
1846
|
+
db?: number;
|
|
1847
|
+
};
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
/**
|
|
1851
|
+
* A utility filter that flips the phase of the audio signal by 180 degrees.
|
|
1852
|
+
* * @example
|
|
1853
|
+
* ```typescript
|
|
1854
|
+
* const phaseFlip: AudioInvertPolarityFilter = {
|
|
1855
|
+
* id: 'invert_polarity_filter',
|
|
1856
|
+
* parameters: {}
|
|
1857
|
+
* };
|
|
1858
|
+
* ```
|
|
1859
|
+
*/
|
|
1860
|
+
export interface AudioInvertPolarityFilter extends AudioFilterBase {
|
|
1861
|
+
/**
|
|
1862
|
+
* A unique identifier for the filter instance.
|
|
1863
|
+
*/
|
|
1864
|
+
id: 'invert_polarity_filter';
|
|
1865
|
+
|
|
1866
|
+
/**
|
|
1867
|
+
* This filter does not currently support any adjustable parameters.
|
|
1868
|
+
*/
|
|
1869
|
+
parameters?: {};
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
/**
|
|
1873
|
+
* A specialized dynamics processor used to prevent an audio signal from exceeding a specific decibel level.
|
|
1874
|
+
* * @example
|
|
1875
|
+
* ```typescript
|
|
1876
|
+
* const masterLimiter: AudioLimiterFilter = {
|
|
1877
|
+
* id: 'limiter_filter',
|
|
1878
|
+
* parameters: {
|
|
1879
|
+
* threshold: -0.3,
|
|
1880
|
+
* release_time: 100
|
|
1881
|
+
* }
|
|
1882
|
+
* };
|
|
1883
|
+
* ```
|
|
1884
|
+
*/
|
|
1885
|
+
export interface AudioLimiterFilter extends AudioFilterBase {
|
|
1886
|
+
/**
|
|
1887
|
+
* A unique identifier for the filter instance.
|
|
1888
|
+
*/
|
|
1889
|
+
id: 'limiter_filter';
|
|
1890
|
+
|
|
1891
|
+
/**
|
|
1892
|
+
* Configuration settings for the limiter.
|
|
1893
|
+
*/
|
|
1894
|
+
parameters?: {
|
|
1895
|
+
/**
|
|
1896
|
+
* The maximum peak level (in dB) the signal is allowed to reach.
|
|
1897
|
+
* Signals exceeding this level are strictly attenuated.
|
|
1898
|
+
* * Valid range: [-60.00, 0.00]
|
|
1899
|
+
*/
|
|
1900
|
+
threshold?: number;
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* The time (in ms) it takes for the gain to return to unity after the
|
|
1904
|
+
* signal falls below the threshold.
|
|
1905
|
+
* * Valid range: [1, 1000]
|
|
1906
|
+
*/
|
|
1907
|
+
release_time?: number;
|
|
1908
|
+
};
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* A noise gate filter used to attenuate signals that fall below a certain threshold.
|
|
1913
|
+
* It is primarily used to remove background noise during silent passages.
|
|
1914
|
+
* * @example
|
|
1915
|
+
* ```typescript
|
|
1916
|
+
* const gate: AudioNoiseGateFilter = {
|
|
1917
|
+
* id: 'noise_gate_filter',
|
|
1918
|
+
* parameters: {
|
|
1919
|
+
* open_threshold: -40,
|
|
1920
|
+
* close_threshold: -45,
|
|
1921
|
+
* hold_time: 200
|
|
1922
|
+
* }
|
|
1923
|
+
* };
|
|
1924
|
+
* ```
|
|
1925
|
+
*/
|
|
1926
|
+
export interface AudioNoiseGateFilter extends AudioFilterBase {
|
|
1927
|
+
/**
|
|
1928
|
+
* A unique identifier for the filter instance.
|
|
1929
|
+
*/
|
|
1930
|
+
id: 'noise_gate_filter';
|
|
1931
|
+
|
|
1932
|
+
/**
|
|
1933
|
+
* Configuration settings for the noise gate.
|
|
1934
|
+
*/
|
|
1935
|
+
parameters?: {
|
|
1936
|
+
/**
|
|
1937
|
+
* The level (in dB) at which the gate closes, silencing the signal.
|
|
1938
|
+
* Valid range: [-96.00, 0.00]
|
|
1939
|
+
*/
|
|
1940
|
+
close_threshold?: number;
|
|
1941
|
+
|
|
1942
|
+
/**
|
|
1943
|
+
* The level (in dB) at which the gate opens, allowing the signal to pass.
|
|
1944
|
+
* Valid range: [-96.00, 0.00]
|
|
1945
|
+
*/
|
|
1946
|
+
open_threshold?: number;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* The time (in ms) it takes for the gate to fully open once the signal
|
|
1950
|
+
* exceeds the open threshold.
|
|
1951
|
+
* Valid range: [0, 10000]
|
|
1952
|
+
*/
|
|
1953
|
+
attack_time?: number;
|
|
1954
|
+
|
|
1955
|
+
/**
|
|
1956
|
+
* The duration (in ms) the gate remains fully open after the signal
|
|
1957
|
+
* drops below the close threshold before the release phase begins.
|
|
1958
|
+
* Valid range: [0, 10000]
|
|
1959
|
+
*/
|
|
1960
|
+
hold_time?: number;
|
|
1961
|
+
|
|
1962
|
+
/**
|
|
1963
|
+
* The time (in ms) it takes for the gate to fully close after the hold period.
|
|
1964
|
+
* Valid range: [0, 10000]
|
|
1965
|
+
*/
|
|
1966
|
+
release_time?: number;
|
|
1967
|
+
};
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
/**
|
|
1971
|
+
* An advanced noise suppression filter utilizing machine learning or digital signal processing algorithms.
|
|
1972
|
+
* * @example
|
|
1973
|
+
* ```typescript
|
|
1974
|
+
* const aiDenoise: AudioNoiseSuppressFilterV2 = {
|
|
1975
|
+
* id: 'noise_suppress_filter_v2',
|
|
1976
|
+
* parameters: {
|
|
1977
|
+
* method: 'rnnoise'
|
|
1978
|
+
* }
|
|
1979
|
+
* };
|
|
1980
|
+
* ```
|
|
1981
|
+
*/
|
|
1982
|
+
export interface AudioNoiseSuppressFilterV2 extends AudioFilterBase {
|
|
1983
|
+
/**
|
|
1984
|
+
* A unique identifier for the filter instance.
|
|
1985
|
+
*/
|
|
1986
|
+
id: 'noise_suppress_filter_v2';
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Configuration settings for the noise suppression algorithm.
|
|
1990
|
+
*/
|
|
1991
|
+
parameters?: {
|
|
1992
|
+
/**
|
|
1993
|
+
* The suppression algorithm to be used.
|
|
1994
|
+
* - `rnnoise`: A recurrent neural network-based noise suppression (ideal for voice).
|
|
1995
|
+
* - `speex`: A traditional DSP-based noise suppression.
|
|
1996
|
+
*/
|
|
1997
|
+
method?: 'rnnoise' | 'speex';
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* The level of noise reduction to apply in decibels (dB).
|
|
2001
|
+
*
|
|
2002
|
+
* Valid range: [-60.00, 0.00]
|
|
2003
|
+
*/
|
|
2004
|
+
suppress_level?: number;
|
|
2005
|
+
};
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
/**
|
|
2009
|
+
* A union type representing all available audio filters.
|
|
2010
|
+
*
|
|
2011
|
+
* This type uses the `id` property as a type discriminator. When used in a switch
|
|
2012
|
+
* statement or conditional, TypeScript will narrow the `parameters` to the
|
|
2013
|
+
* specific interface associated with that ID.
|
|
2014
|
+
* * @example
|
|
2015
|
+
* ```typescript
|
|
2016
|
+
* function applyFilter(filter: AudioFilter) {
|
|
2017
|
+
* if (filter.id === 'gain_filter') {
|
|
2018
|
+
* // TypeScript knows filter.parameters.db exists here
|
|
2019
|
+
* console.log(filter.parameters?.db);
|
|
2020
|
+
* }
|
|
2021
|
+
* }
|
|
2022
|
+
* ```
|
|
2023
|
+
*/
|
|
2024
|
+
export type AudioFilter =
|
|
2025
|
+
| AudioCompressorFilter
|
|
2026
|
+
| AudioExpanderFilter
|
|
2027
|
+
| AudioGainFilter
|
|
2028
|
+
| AudioInvertPolarityFilter
|
|
2029
|
+
| AudioLimiterFilter
|
|
2030
|
+
| AudioNoiseGateFilter
|
|
2031
|
+
| AudioNoiseSuppressFilterV2;
|
|
1667
2032
|
|
|
1668
2033
|
/**
|
|
1669
2034
|
* Configuration options for video recording settings.
|
|
@@ -1813,6 +2178,14 @@ interface AudioDeviceSettings {
|
|
|
1813
2178
|
* @default false
|
|
1814
2179
|
*/
|
|
1815
2180
|
use_device_timing?: boolean;
|
|
2181
|
+
|
|
2182
|
+
/**
|
|
2183
|
+
* List of audio filters to apply to the device's audio signal.
|
|
2184
|
+
*
|
|
2185
|
+
* Each filter can modify the audio in various ways,
|
|
2186
|
+
* such as compression, gain adjustment, noise suppression, etc.
|
|
2187
|
+
*/
|
|
2188
|
+
filters?: AudioFilter[];
|
|
1816
2189
|
}
|
|
1817
2190
|
|
|
1818
2191
|
|