feat: initial Papo bot scaffold
This commit is contained in:
1
node_modules/play-audio/README.md
generated
vendored
Normal file
1
node_modules/play-audio/README.md
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
# play-audio
|
||||
202
node_modules/play-audio/dist/index.d.ts
generated
vendored
Normal file
202
node_modules/play-audio/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
import { DuplexOptions, Duplex } from 'stream';
|
||||
import { Readable } from 'node:stream';
|
||||
|
||||
declare enum DataType {
|
||||
master = 0,
|
||||
string = 1,
|
||||
uint = 2,
|
||||
binary = 3,
|
||||
float = 4
|
||||
}
|
||||
declare type DataReturnType = (buf: Buffer) => string | number;
|
||||
interface EBML {
|
||||
version?: number;
|
||||
readVersion?: number;
|
||||
maxIDLength?: number;
|
||||
maxSizeWidth?: number;
|
||||
docType?: string;
|
||||
docTypeVersion?: number;
|
||||
docTypeReadVersion?: number;
|
||||
}
|
||||
interface Seek {
|
||||
position?: number;
|
||||
}
|
||||
declare type SeekHead = Seek[];
|
||||
interface Info {
|
||||
duration?: number;
|
||||
muxingApp?: string;
|
||||
writingApp?: string;
|
||||
}
|
||||
declare type Tracks = TracksEntry[];
|
||||
interface TracksEntry {
|
||||
trackNumber?: number;
|
||||
trackType?: number;
|
||||
codecID?: string;
|
||||
audio?: Audio;
|
||||
}
|
||||
interface Audio {
|
||||
rate?: number;
|
||||
channels?: number;
|
||||
bitDepth?: number;
|
||||
}
|
||||
interface CuePoint {
|
||||
time?: number;
|
||||
track?: number;
|
||||
position?: number;
|
||||
}
|
||||
declare type Cues = CuePoint[];
|
||||
interface Cluster {
|
||||
time?: number;
|
||||
}
|
||||
interface Segment {
|
||||
seekHead?: SeekHead;
|
||||
info?: Info;
|
||||
tracks?: Tracks;
|
||||
cues?: Cues;
|
||||
cluster?: Cluster;
|
||||
}
|
||||
interface ElementsData {
|
||||
name: string;
|
||||
type: DataType;
|
||||
return?: DataReturnType;
|
||||
}
|
||||
declare type ElementsDataType = {
|
||||
[key: string]: ElementsData;
|
||||
};
|
||||
declare const WebmElements: ElementsDataType;
|
||||
|
||||
interface OpusHandlerOptions {
|
||||
rate: 8000 | 12000 | 16000 | 24000 | 48000;
|
||||
channels: 1 | 2;
|
||||
frameSize: number;
|
||||
}
|
||||
|
||||
declare class OpusHandler$1 {
|
||||
protected options: OpusHandlerOptions;
|
||||
private encoder;
|
||||
constructor(options: OpusHandlerOptions);
|
||||
encode(buf: Buffer): Buffer;
|
||||
decode(buf: Buffer): Buffer;
|
||||
encode_ctl(ctl: number, val: number): void;
|
||||
decode_ctl(ctl: number, val: number): void;
|
||||
delete(): void;
|
||||
}
|
||||
|
||||
declare class OpusHandler {
|
||||
protected options: OpusHandlerOptions;
|
||||
private encoder;
|
||||
constructor(options: OpusHandlerOptions);
|
||||
encode(buf: Buffer): Buffer;
|
||||
decode(buf: Buffer): Buffer;
|
||||
encode_ctl(ctl: number, val: number): void;
|
||||
decode_ctl(ctl: number, val: number): void;
|
||||
delete(): void;
|
||||
}
|
||||
|
||||
declare type OpusEncoder$1 = OpusHandler$1 | OpusHandler;
|
||||
|
||||
interface OpusTransformOptions extends OpusHandlerOptions {
|
||||
encoder?: 'play-opus' | 'opusscript';
|
||||
duplex?: DuplexOptions;
|
||||
}
|
||||
declare abstract class OpusDuplexStream extends Duplex {
|
||||
protected pcm_length: number;
|
||||
protected encoder: OpusEncoder$1;
|
||||
constructor(options: OpusTransformOptions);
|
||||
protected encode(buf: Buffer): Buffer;
|
||||
protected decode(buffer: Buffer): Buffer;
|
||||
private cleanup;
|
||||
_read(): void;
|
||||
_destroy(error: Error | null, callback: (error: Error | null) => void): void;
|
||||
abstract _write(chunk: Buffer, enc: BufferEncoding, next: (error?: Error | null) => void): void;
|
||||
_final(callback: (error?: Error | null) => void): void;
|
||||
abstract applyCTL(ctl: number, value: number): void;
|
||||
bitrate(bitrate: number): void;
|
||||
setFEC(enabled: boolean): void;
|
||||
setPLP(percentage: number): void;
|
||||
}
|
||||
|
||||
declare class OpusEncoder extends OpusDuplexStream {
|
||||
private remaining;
|
||||
constructor(options: OpusTransformOptions);
|
||||
_write(chunk: Buffer, _: BufferEncoding, done: (error?: Error | null) => void): void;
|
||||
applyCTL(ctl: number, value: number): void;
|
||||
}
|
||||
|
||||
declare class OpusDecoder extends OpusDuplexStream {
|
||||
opusHead?: Buffer;
|
||||
opusTags?: Buffer;
|
||||
constructor(options: OpusTransformOptions);
|
||||
_write(chunk: Buffer, _: BufferEncoding, done: (error?: Error | null) => void): void;
|
||||
applyCTL(ctl: number, value: number): void;
|
||||
}
|
||||
|
||||
declare class OggDemuxer extends Duplex {
|
||||
private remaining?;
|
||||
private opus_head?;
|
||||
private ogg_head?;
|
||||
constructor(options?: DuplexOptions);
|
||||
_read(): void;
|
||||
_write(chunk: Buffer, _: BufferEncoding, done: (error?: Error) => void): void;
|
||||
private readOggPage;
|
||||
private readOggData;
|
||||
private readOggHead;
|
||||
_destroy(err: Error | null, callback: (error: Error | null) => void): void;
|
||||
_final(callback: (error?: Error) => void): void;
|
||||
_cleanup(): void;
|
||||
}
|
||||
|
||||
declare class WebmHeader {
|
||||
ebml: EBML;
|
||||
segment: Segment;
|
||||
audioTrack: number;
|
||||
constructor();
|
||||
parse(ebmlID: ElementsData, chunk: Buffer): Error | undefined;
|
||||
}
|
||||
|
||||
declare class WebmDemuxer extends Duplex {
|
||||
remaining?: Buffer;
|
||||
chunk?: Buffer;
|
||||
cursor: number;
|
||||
header: WebmHeader;
|
||||
headfound: boolean;
|
||||
private data_size;
|
||||
private data_length;
|
||||
constructor(options?: DuplexOptions);
|
||||
private get vint_length();
|
||||
private get vint_value();
|
||||
cleanup(): void;
|
||||
_read(): void;
|
||||
_write(chunk: Buffer, _: BufferEncoding, done: (error?: Error | null) => void): void;
|
||||
private readTag;
|
||||
private parseEbmlID;
|
||||
_destroy(error: Error | null, callback: (error: Error | null) => void): void;
|
||||
_final(callback: (error?: Error | null) => void): void;
|
||||
}
|
||||
|
||||
interface FFmpegDownloadOptions {
|
||||
path?: string;
|
||||
debug?: boolean;
|
||||
force?: boolean;
|
||||
}
|
||||
interface FFmpegOptions {
|
||||
input?: string | Readable;
|
||||
args?: string[];
|
||||
}
|
||||
declare function ffmpeg(options?: FFmpegOptions): Promise<Readable>;
|
||||
declare function ffmpeg_download(options?: FFmpegDownloadOptions): Promise<void>;
|
||||
declare function initializeFFmpeg(preference?: "npx" | "global" | "local"): Promise<boolean>;
|
||||
|
||||
declare const _default: {
|
||||
OpusDecoder: typeof OpusDecoder;
|
||||
OggDemuxer: typeof OggDemuxer;
|
||||
OpusEncoder: typeof OpusEncoder;
|
||||
WebmDemuxer: typeof WebmDemuxer;
|
||||
WebmHeader: typeof WebmHeader;
|
||||
WebmElements: ElementsDataType;
|
||||
ffmpeg_download: typeof ffmpeg_download;
|
||||
ffmpeg: typeof ffmpeg;
|
||||
initializeFFmpeg: typeof initializeFFmpeg;
|
||||
};
|
||||
|
||||
export { OggDemuxer, OpusDecoder, OpusEncoder, WebmDemuxer, WebmElements, WebmHeader, _default as default, ffmpeg, ffmpeg_download, initializeFFmpeg };
|
||||
12
node_modules/play-audio/dist/index.js
generated
vendored
Normal file
12
node_modules/play-audio/dist/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/play-audio/dist/index.js.map
generated
vendored
Normal file
1
node_modules/play-audio/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
12
node_modules/play-audio/dist/index.mjs
generated
vendored
Normal file
12
node_modules/play-audio/dist/index.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/play-audio/dist/index.mjs.map
generated
vendored
Normal file
1
node_modules/play-audio/dist/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
35
node_modules/play-audio/package.json
generated
vendored
Normal file
35
node_modules/play-audio/package.json
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "play-audio",
|
||||
"version": "0.5.2",
|
||||
"description": "Audio accessories for play-opus and play-voice [ coming soon ]",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"module": "dist/index.mjs",
|
||||
"scripts": {
|
||||
"pretty": "prettier --config .prettierrc \"play-audio/*.ts\" \"play-audio/*/*.ts\" \"play-audio/*/*/*.ts\" --write ",
|
||||
"prepublishOnly": "tsup"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/play-dl/play-audio.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"author": "",
|
||||
"license": "GPL-3.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/play-dl/play-audio/issues"
|
||||
},
|
||||
"homepage": "https://github.com/play-dl/play-audio#readme",
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.10",
|
||||
"prettier": "^2.5.0",
|
||||
"tsup": "^5.11.11",
|
||||
"typedoc": "^0.22.10",
|
||||
"typedoc-plugin-extras": "^2.2.3",
|
||||
"typedoc-plugin-missing-exports": "^0.22.6",
|
||||
"typescript": "^4.5.2"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user