repo_name string | dataset string | owner string | lang string | func_name string | code string | docstring string | url string | sha string |
|---|---|---|---|---|---|---|---|---|
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.getProjectById | public async getProjectById(
projectId: string,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.ProjectExtendedResponseModel> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
... | /**
* Returns information about a specific project. This endpoint returns more detailed information about a project than `GET /v1/projects`.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
*... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L389-L451 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.editBasicProjectInfo | public async editBasicProjectInfo(
projectId: string,
request: ElevenLabs.BodyEditBasicProjectInfoV1ProjectsProjectIdPost,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.EditProjectResponseModel> {
const _response = await core.fetcher({
url: urlJoin(
... | /**
* Edits basic project info.
*
* @param {string} projectId - The ID of the Studio project.
* @param {ElevenLabs.BodyEditBasicProjectInfoV1ProjectsProjectIdPost} request
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L469-L535 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.deleteProject | public async deleteProject(projectId: string, requestOptions?: Projects.RequestOptions): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)... | /**
* Deletes a project.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await client.projects.deleteP... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L548-L609 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.editProjectContent | public async editProjectContent(
projectId: string,
request: ElevenLabs.BodyEditProjectContentV1ProjectsProjectIdContentPost,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.EditProjectResponseModel> {
const _request = await core.newFormData();
if (request.fro... | /**
* Edits project content.
*
* @param {string} projectId
* @param {ElevenLabs.BodyEditProjectContentV1ProjectsProjectIdContentPost} request
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L623-L704 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.convertProject | public async convertProject(projectId: string, requestOptions?: Projects.RequestOptions): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment... | /**
* Starts conversion of a project and all of its chapters.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L717-L778 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.getProjectSnapshots | public async getProjectSnapshots(
projectId: string,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.ProjectSnapshotsResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
... | /**
* Gets the snapshots of a project.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await client.pr... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L791-L855 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.streamProjectAudio | public async streamProjectAudio(
projectId: string,
projectSnapshotId: string,
request: ElevenLabs.BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost = {},
requestOptions?: Projects.RequestOptions,
): Promise<stream.Readable> {
const _response = awa... | /**
* Stream the audio from a project snapshot.
* @throws {@link ElevenLabs.UnprocessableEntityError}
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L861-L929 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.streamsArchiveWithProjectAudio | public async streamsArchiveWithProjectAudio(
projectId: string,
projectSnapshotId: string,
requestOptions?: Projects.RequestOptions,
): Promise<void> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??... | /**
* Streams archive with project audio.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} projectSnapshotId - The ID of the Studio project snapshot.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link E... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L943-L1008 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.getChapters | public async getChapters(
projectId: string,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.GetChaptersResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await ... | /**
* Returns a list of your chapters for a project together and its metadata.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L1021-L1085 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.getChapterById | public async getChapterById(
projectId: string,
chapterId: string,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.ChapterWithContentResponseModel> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._option... | /**
* Returns information about a specific chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.Unpr... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L1099-L1164 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.deleteChapter | public async deleteChapter(
projectId: string,
chapterId: string,
requestOptions?: Projects.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(... | /**
* Deletes a chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L1178-L1243 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.editChapter | public async editChapter(
projectId: string,
chapterId: string,
request: ElevenLabs.BodyEditChapterV1ProjectsProjectIdChaptersChapterIdPatch = {},
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.EditChapterResponseModel> {
const _response = await core.fetcher(... | /**
* Edits a chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {ElevenLabs.BodyEditChapterV1ProjectsProjectIdChaptersChapterIdPatch} request
* @param {Projects.RequestOptions} requestOptions - Request-speci... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L1258-L1325 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.addChapterToAProject | public async addChapterToAProject(
projectId: string,
request: ElevenLabs.BodyAddChapterToAProjectV1ProjectsProjectIdChaptersAddPost,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.AddChapterResponseModel> {
const _response = await core.fetcher({
url: url... | /**
* Creates a new chapter either as blank or from a URL.
*
* @param {string} projectId - The ID of the Studio project.
* @param {ElevenLabs.BodyAddChapterToAProjectV1ProjectsProjectIdChaptersAddPost} request
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L1341-L1407 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.convertChapter | public async convertChapter(
projectId: string,
chapterId: string,
requestOptions?: Projects.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
... | /**
* Starts conversion of a specific chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.Unprocess... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L1421-L1486 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.listChapterSnapshots | public async listChapterSnapshots(
projectId: string,
chapterId: string,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.ChapterSnapshotsResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options... | /**
* Gets information about all the snapshots of a chapter, each snapshot corresponds can be downloaded as audio. Whenever a chapter is converted a snapshot will be automatically created.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapt... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L1500-L1565 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.streamChapterAudio | public async streamChapterAudio(
projectId: string,
chapterId: string,
chapterSnapshotId: string,
request: ElevenLabs.BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost = {},
requestOptions?: Projects.RequestOptions,
): Promise<void... | /**
* Stream the audio from a chapter snapshot. Use `GET /v1/projects/{project_id}/chapters/{chapter_id}/snapshots` to return the chapter snapshots of a chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {string} ... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L1581-L1649 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.updatePronunciationDictionaries | public async updatePronunciationDictionaries(
projectId: string,
request: ElevenLabs.UpdatePronunciationDictionariesRequest,
requestOptions?: Projects.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Su... | /**
* Updates the set of pronunciation dictionaries acting on a project. This will automatically mark text within this project as requiring reconverting where the new dictionary would apply or the old one no longer does.
*
* @param {string} projectId - The ID of the Studio project.
* @param {ElevenL... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/projects/client/Client.ts#L1668-L1734 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | PronunciationDictionary.addFromFile | public async addFromFile(
request: ElevenLabs.BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost,
requestOptions?: PronunciationDictionary.RequestOptions,
): Promise<ElevenLabs.AddPronunciationDictionaryResponseModel> {
const _request = await core.newFormData();
... | /**
* Creates a new pronunciation dictionary from a lexicon .PLS file
*
* @param {ElevenLabs.BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost} request
* @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@l... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/pronunciationDictionary/client/Client.ts#L50-L131 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | PronunciationDictionary.addRules | public async addRules(
pronunciationDictionaryId: string,
request: ElevenLabs.PronunciationDictionary,
requestOptions?: PronunciationDictionary.RequestOptions,
): Promise<ElevenLabs.AddPronunciationDictionaryRulesResponseModel> {
const _response = await core.fetcher({
url... | /**
* Add rules to the pronunciation dictionary
*
* @param {string} pronunciationDictionaryId - The id of the pronunciation dictionary
* @param {ElevenLabs.PronunciationDictionary} request
* @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration.
*
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/pronunciationDictionary/client/Client.ts#L151-L217 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | PronunciationDictionary.removeRules | public async removeRules(
pronunciationDictionaryId: string,
request: ElevenLabs.BodyRemoveRulesFromThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdRemoveRulesPost,
requestOptions?: PronunciationDictionary.RequestOptions,
): Promise<ElevenLabs.RemovePronunciatio... | /**
* Remove rules from the pronunciation dictionary
*
* @param {string} pronunciationDictionaryId - The id of the pronunciation dictionary
* @param {ElevenLabs.BodyRemoveRulesFromThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdRemoveRulesPost} request
* @param {Pr... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/pronunciationDictionary/client/Client.ts#L233-L299 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | PronunciationDictionary.download | public async download(
dictionaryId: string,
versionId: string,
requestOptions?: PronunciationDictionary.RequestOptions,
): Promise<string> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
... | /**
* Get PLS file with a pronunciation dictionary version rules
*
* @param {string} dictionaryId - The id of the pronunciation dictionary
* @param {string} versionId - The id of the version of the pronunciation dictionary
* @param {PronunciationDictionary.RequestOptions} requestOptions - Reque... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/pronunciationDictionary/client/Client.ts#L313-L379 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | PronunciationDictionary.get | public async get(
pronunciationDictionaryId: string,
requestOptions?: PronunciationDictionary.RequestOptions,
): Promise<ElevenLabs.GetPronunciationDictionaryMetadataResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._op... | /**
* Get metadata for a pronunciation dictionary
*
* @param {string} pronunciationDictionaryId - The id of the pronunciation dictionary
* @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/pronunciationDictionary/client/Client.ts#L392-L456 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | PronunciationDictionary.getAll | public async getAll(
request: ElevenLabs.PronunciationDictionaryGetAllRequest = {},
requestOptions?: PronunciationDictionary.RequestOptions,
): Promise<ElevenLabs.GetPronunciationDictionariesMetadataResponseModel> {
const { cursor, page_size: pageSize } = request;
const _queryParams:... | /**
* Get a list of the pronunciation dictionaries you have access to and their metadata
*
* @param {ElevenLabs.PronunciationDictionaryGetAllRequest} request
* @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.Unp... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/pronunciationDictionary/client/Client.ts#L471-L546 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Samples.delete | public async delete(voiceId: string, sampleId: string, requestOptions?: Samples.RequestOptions): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.envi... | /**
* Removes a sample by its ID.
*
* @param {string} voiceId - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.
* @param {string} sampleId - Sample ID to be used, you can use GET https://api.elevenlabs.io/v1/voices/{voice_id} to list all the ava... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/samples/client/Client.ts#L53-L114 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Samples.getAudio | public async getAudio(
voiceId: string,
sampleId: string,
requestOptions?: Samples.RequestOptions,
): Promise<stream.Readable> {
const _response = await core.fetcher<stream.Readable>({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
... | /**
* Returns the audio corresponding to a sample attached to a voice.
* @throws {@link ElevenLabs.UnprocessableEntityError}
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/samples/client/Client.ts#L120-L186 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | SpeechToSpeech.convert | public async convert(
voiceId: string,
request: ElevenLabs.BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost,
requestOptions?: SpeechToSpeech.RequestOptions,
): Promise<stream.Readable> {
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (r... | /**
* Create speech by combining the content and emotion of the uploaded audio with a voice of your choice.
* @throws {@link ElevenLabs.UnprocessableEntityError}
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/speechToSpeech/client/Client.ts#L42-L143 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | SpeechToSpeech.convertAsStream | public async convertAsStream(
voiceId: string,
request: ElevenLabs.BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost,
requestOptions?: SpeechToSpeech.RequestOptions,
): Promise<stream.Readable> {
const _queryParams: Record<string, string | string[] | object | object[] | nu... | /**
* Create speech by combining the content and emotion of the uploaded audio with a voice of your choice and returns an audio stream.
* @throws {@link ElevenLabs.UnprocessableEntityError}
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/speechToSpeech/client/Client.ts#L149-L250 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | SpeechToText.convert | public async convert(
request: ElevenLabs.BodySpeechToTextV1SpeechToTextPost,
requestOptions?: SpeechToText.RequestOptions,
): Promise<ElevenLabs.SpeechToTextChunkResponseModel> {
const _request = await core.newFormData();
_request.append("model_id", request.model_id);
if (re... | /**
* Transcribe an audio or video file.
*
* @param {ElevenLabs.BodySpeechToTextV1SpeechToTextPost} request
* @param {SpeechToText.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* awai... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/speechToText/client/Client.ts#L51-L134 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | SpeechToText.convertAsStream | public async convertAsStream(
request: ElevenLabs.BodySpeechToTextStreamV1SpeechToTextStreamPost,
requestOptions?: SpeechToText.RequestOptions,
): Promise<core.Stream<ElevenLabs.SpeechToTextStreamResponseModel>> {
const _request = await core.newFormData();
_request.append("model_id",... | /**
* Transcribe an audio or video file with streaming response. Returns chunks of transcription as they become available, with each chunk separated by double newlines (\n\n).
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/speechToText/client/Client.ts#L139-L235 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Studio.createPodcast | public async createPodcast(
request: ElevenLabs.BodyCreatePodcastV1StudioPodcastsPost,
requestOptions?: Studio.RequestOptions,
): Promise<ElevenLabs.PodcastProjectResponseModel> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._... | /**
* Create and auto-convert a podcast project. Currently, the LLM cost is covered by us but you will still be charged for the audio generation. In the future, you will be charged for both the LLM and audio generation costs.
*
* @param {ElevenLabs.BodyCreatePodcastV1StudioPodcastsPost} request
* @p... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/client/Client.ts#L73-L136 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Chapters.getAll | public async getAll(
projectId: string,
requestOptions?: Chapters.RequestOptions,
): Promise<ElevenLabs.GetChaptersResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.... | /**
* Returns a list of a Studio project's chapters.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Chapters.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* a... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/chapters/client/Client.ts#L48-L112 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Chapters.create | public async create(
projectId: string,
request: ElevenLabs.studio.BodyCreateChapterV1StudioProjectsProjectIdChaptersPost,
requestOptions?: Chapters.RequestOptions,
): Promise<ElevenLabs.AddChapterResponseModel> {
const _response = await core.fetcher({
url: urlJoin(
... | /**
* Creates a new chapter either as blank or from a URL.
*
* @param {string} projectId - The ID of the Studio project.
* @param {ElevenLabs.studio.BodyCreateChapterV1StudioProjectsProjectIdChaptersPost} request
* @param {Chapters.RequestOptions} requestOptions - Request-specific configuration... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/chapters/client/Client.ts#L128-L194 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Chapters.get | public async get(
projectId: string,
chapterId: string,
requestOptions?: Chapters.RequestOptions,
): Promise<ElevenLabs.ChapterWithContentResponseModel> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl))... | /**
* Returns information about a specific chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {Chapters.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.Unpr... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/chapters/client/Client.ts#L208-L273 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Chapters.edit | public async edit(
projectId: string,
chapterId: string,
request: ElevenLabs.studio.BodyUpdateChapterV1StudioProjectsProjectIdChaptersChapterIdPost = {},
requestOptions?: Chapters.RequestOptions,
): Promise<ElevenLabs.EditChapterResponseModel> {
const _response = await core.f... | /**
* Updates a chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {ElevenLabs.studio.BodyUpdateChapterV1StudioProjectsProjectIdChaptersChapterIdPost} request
* @param {Chapters.RequestOptions} requestOptions... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/chapters/client/Client.ts#L288-L355 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Chapters.delete | public async delete(
projectId: string,
chapterId: string,
requestOptions?: Chapters.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await c... | /**
* Deletes a chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {Chapters.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/chapters/client/Client.ts#L369-L434 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Chapters.convert | public async convert(
projectId: string,
chapterId: string,
requestOptions?: Chapters.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await ... | /**
* Starts conversion of a specific chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {Chapters.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.Unprocess... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/chapters/client/Client.ts#L448-L513 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Chapters.getAllSnapshots | public async getAllSnapshots(
projectId: string,
chapterId: string,
requestOptions?: Chapters.RequestOptions,
): Promise<ElevenLabs.ChapterSnapshotsResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.base... | /**
* Gets information about all the snapshots of a chapter, each snapshot corresponds can be downloaded as audio. Whenever a chapter is converted a snapshot will be automatically created.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapt... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/chapters/client/Client.ts#L527-L592 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Chapters.streamSnapshot | public async streamSnapshot(
projectId: string,
chapterId: string,
chapterSnapshotId: string,
request: ElevenLabs.studio.BodyStreamChapterAudioV1StudioProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost = {},
requestOptions?: Chapters.RequestOptions,
): Pro... | /**
* Stream the audio from a chapter snapshot. Use `GET /v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots` to return the snapshots of a chapter.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} chapterId - The ID of the chapter.
* @param {string} c... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/chapters/client/Client.ts#L608-L676 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.getAll | public async getAll(requestOptions?: Projects.RequestOptions): Promise<ElevenLabs.GetProjectsResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ?... | /**
* Returns a list of your Studio projects with metadata.
*
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await client.studio.projects.getAll()
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L47-L106 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.add | public async add(
request: ElevenLabs.studio.BodyCreateStudioProjectV1StudioProjectsPost,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.AddProjectResponseModel> {
const _request = await core.newFormData();
_request.append("name", request.name);
_request.appe... | /**
* Creates a new Studio project, it can be either initialized as blank, from a document or from a URL.
*
* @param {ElevenLabs.studio.BodyCreateStudioProjectV1StudioProjectsPost} request
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@lin... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L124-L286 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.get | public async get(
projectId: string,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.ProjectExtendedResponseModel> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await... | /**
* Returns information about a specific Studio project. This endpoint returns more detailed information about a project than `GET /v1/studio`.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L299-L363 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.updateMetadata | public async updateMetadata(
projectId: string,
request: ElevenLabs.studio.BodyUpdateStudioProjectMetadataV1StudioProjectsProjectIdPost,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.EditProjectResponseModel> {
const _response = await core.fetcher({
url:... | /**
* Updates Studio project metadata.
*
* @param {string} projectId - The ID of the Studio project.
* @param {ElevenLabs.studio.BodyUpdateStudioProjectMetadataV1StudioProjectsProjectIdPost} request
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L381-L447 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.delete | public async delete(projectId: string, requestOptions?: Projects.RequestOptions): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
... | /**
* Deletes a Studio project.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await client.studio.pr... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L460-L521 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.updateContent | public async updateContent(
projectId: string,
request: ElevenLabs.studio.BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.EditProjectResponseModel> {
const _request = await core.newFormData();
... | /**
* Updates Studio project content.
*
* @param {string} projectId
* @param {ElevenLabs.studio.BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost} request
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L535-L616 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.convert | public async convert(projectId: string, requestOptions?: Projects.RequestOptions): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
... | /**
* Starts conversion of a Studio project and all of its chapters.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @exam... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L629-L690 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.getSnapshots | public async getSnapshots(
projectId: string,
requestOptions?: Projects.RequestOptions,
): Promise<ElevenLabs.ProjectSnapshotsResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(... | /**
* Gets the snapshots of a Studio project.
*
* @param {string} projectId - The ID of the Studio project.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await cl... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L703-L767 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.streamAudio | public async streamAudio(
projectId: string,
projectSnapshotId: string,
request: ElevenLabs.studio.BodyStreamStudioProjectAudioV1StudioProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost = {},
requestOptions?: Projects.RequestOptions,
): Promise<void> {
const _response = aw... | /**
* Stream the audio from a Studio project snapshot.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} projectSnapshotId - The ID of the Studio project snapshot.
* @param {ElevenLabs.studio.BodyStreamStudioProjectAudioV1StudioProjectsProjectIdSnapshotsProjectSnap... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L782-L849 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.streamArchive | public async streamArchive(
projectId: string,
projectSnapshotId: string,
requestOptions?: Projects.RequestOptions,
): Promise<void> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
... | /**
* Returns a compressed archive of the Studio project's audio.
*
* @param {string} projectId - The ID of the Studio project.
* @param {string} projectSnapshotId - The ID of the Studio project snapshot.
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
*... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L863-L928 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Projects.updatePronunciationDictionaries | public async updatePronunciationDictionaries(
projectId: string,
request: ElevenLabs.studio.BodyCreatePronunciationDictionariesV1StudioProjectsProjectIdPronunciationDictionariesPost,
requestOptions?: Projects.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher(... | /**
* Create a set of pronunciation dictionaries acting on a project. This will automatically mark text within this project as requiring reconverting where the new dictionary would apply or the old one no longer does.
*
* @param {string} projectId - The ID of the Studio project.
* @param {ElevenLabs... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/studio/resources/projects/client/Client.ts#L947-L1013 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | TextToSoundEffects.convert | public async convert(
request: ElevenLabs.BodySoundGenerationV1SoundGenerationPost,
requestOptions?: TextToSoundEffects.RequestOptions,
): Promise<stream.Readable> {
const _response = await core.fetcher<stream.Readable>({
url: urlJoin(
(await core.Supplier.get(thi... | /**
* Converts a text of your choice into sound
* @throws {@link ElevenLabs.UnprocessableEntityError}
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/textToSoundEffects/client/Client.ts#L42-L106 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | TextToSpeech.convert | public async convert(
voiceId: string,
request: ElevenLabs.TextToSpeechRequest,
requestOptions?: TextToSpeech.RequestOptions,
): Promise<stream.Readable> {
const {
enable_logging: enableLogging,
optimize_streaming_latency: optimizeStreamingLatency,
... | /**
* Converts text into speech using a voice of your choice and returns audio.
* @throws {@link ElevenLabs.UnprocessableEntityError}
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/textToSpeech/client/Client.ts#L42-L129 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | TextToSpeech.convertWithTimestamps | public async convertWithTimestamps(
voiceId: string,
request: ElevenLabs.TextToSpeechWithTimestampsRequest,
requestOptions?: TextToSpeech.RequestOptions,
): Promise<unknown> {
const {
enable_logging: enableLogging,
optimize_streaming_latency: optimizeStreaming... | /**
* Converts text into speech using a voice of your choice and returns JSON containing audio as a base64 encoded string together with information on when which character was spoken.
*
* @param {string} voiceId - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the availa... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/textToSpeech/client/Client.ts#L147-L233 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | TextToSpeech.convertAsStream | public async convertAsStream(
voiceId: string,
request: ElevenLabs.StreamTextToSpeechRequest,
requestOptions?: TextToSpeech.RequestOptions,
): Promise<stream.Readable> {
const {
enable_logging: enableLogging,
optimize_streaming_latency: optimizeStreamingLatenc... | /**
* Converts text into speech using a voice of your choice and returns audio as an audio stream.
* @throws {@link ElevenLabs.UnprocessableEntityError}
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/textToSpeech/client/Client.ts#L239-L326 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | TextToSpeech.streamWithTimestamps | public async streamWithTimestamps(
voiceId: string,
request: ElevenLabs.StreamTextToSpeechWithTimstampsRequest,
requestOptions?: TextToSpeech.RequestOptions,
): Promise<core.Stream<ElevenLabs.TextToSpeechStreamWithTimestampsResponse>> {
const {
enable_logging: enableLoggi... | /**
* Converts text into speech using a voice of your choice and returns a stream of JSONs containing audio as a base64 encoded string together with information on when which character was spoken.
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/textToSpeech/client/Client.ts#L331-L426 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | TextToVoice.createPreviews | public async createPreviews(
request: ElevenLabs.VoicePreviewsRequestModel,
requestOptions?: TextToVoice.RequestOptions,
): Promise<ElevenLabs.VoicePreviewsResponseModel> {
const { output_format: outputFormat, ..._body } = request;
const _queryParams: Record<string, string | string[]... | /**
* Generate a custom voice based on voice description. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. If you like the a voice previewand want to create the voice call /v1/text-to-voice/create-voice-from-preview with the ... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/textToVoice/client/Client.ts#L51-L123 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | TextToVoice.createVoiceFromPreview | public async createVoiceFromPreview(
request: ElevenLabs.BodyCreateANewVoiceFromVoicePreviewV1TextToVoiceCreateVoiceFromPreviewPost,
requestOptions?: TextToVoice.RequestOptions,
): Promise<ElevenLabs.Voice> {
const _response = await core.fetcher({
url: urlJoin(
(a... | /**
* Create a voice from previously generated voice preview. This endpoint should be called after you fetched a generated_voice_id using /v1/text-to-voice/create-previews.
*
* @param {ElevenLabs.BodyCreateANewVoiceFromVoicePreviewV1TextToVoiceCreateVoiceFromPreviewPost} request
* @param {TextToVoic... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/textToVoice/client/Client.ts#L140-L205 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Usage.getCharactersUsageMetrics | public async getCharactersUsageMetrics(
request: ElevenLabs.UsageGetCharactersUsageMetricsRequest,
requestOptions?: Usage.RequestOptions,
): Promise<ElevenLabs.UsageCharactersResponseModel> {
const {
start_unix: startUnix,
end_unix: endUnix,
include_worksp... | /**
* Returns the credit usage metrics for the current user or the entire workspace they are part of. The response will return a time axis with unix timestamps for each day and daily usage along that axis. The usage will be broken down by the specified breakdown type. For example, breakdown type "voice" will retur... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/usage/client/Client.ts#L51-L131 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | User.getSubscription | public async getSubscription(requestOptions?: User.RequestOptions): Promise<ElevenLabs.Subscription> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
... | /**
* Gets extended information about the users subscription
*
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await client.user.getSubscription()
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/user/client/Client.ts#L47-L106 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | User.get | public async get(requestOptions?: User.RequestOptions): Promise<ElevenLabs.User> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
... | /**
* Gets information about the user
*
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await client.user.get()
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/user/client/Client.ts#L118-L177 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | VoiceGeneration.generateParameters | public async generateParameters(
requestOptions?: VoiceGeneration.RequestOptions,
): Promise<ElevenLabs.VoiceGenerationParameterResponse> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await ... | /**
* Get possible parameters for the /v1/voice-generation/generate-voice endpoint.
*
* @param {VoiceGeneration.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
* await client.voiceGeneration.generateParameters()
*/ | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voiceGeneration/client/Client.ts#L46-L102 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | VoiceGeneration.generate | public async generate(
request: ElevenLabs.GenerateVoiceRequest,
requestOptions?: VoiceGeneration.RequestOptions,
): Promise<stream.Readable> {
const _response = await core.fetcher<stream.Readable>({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ?... | /**
* Generate a random voice based on parameters. This method returns a generated_voice_id in the response header, and a sample of the voice in the body. If you like the generated voice call /v1/voice-generation/create-voice with the generated_voice_id to create the voice.
* @throws {@link ElevenLabs.Unproce... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voiceGeneration/client/Client.ts#L108-L174 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | VoiceGeneration.createAPreviouslyGeneratedVoice | public async createAPreviouslyGeneratedVoice(
request: ElevenLabs.CreatePreviouslyGenertedVoiceRequest,
requestOptions?: VoiceGeneration.RequestOptions,
): Promise<ElevenLabs.Voice> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(th... | /**
* Create a previously generated voice. This endpoint should be called after you fetched a generated_voice_id using /v1/voice-generation/generate-voice.
*
* @param {ElevenLabs.CreatePreviouslyGenertedVoiceRequest} request
* @param {VoiceGeneration.RequestOptions} requestOptions - Request-specific... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voiceGeneration/client/Client.ts#L191-L256 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.getAll | public async getAll(
request: ElevenLabs.VoicesGetAllRequest = {},
requestOptions?: Voices.RequestOptions,
): Promise<ElevenLabs.GetVoicesResponse> {
const { show_legacy: showLegacy } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
... | /**
* Gets a list of all available voices for a user.
*
* @param {ElevenLabs.VoicesGetAllRequest} request
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await client... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L52-L121 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.getDefaultSettings | public async getDefaultSettings(requestOptions?: Voices.RequestOptions): Promise<ElevenLabs.VoiceSettings> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment... | /**
* Gets the default settings for voices. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app.
*
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L131-L185 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.getSettings | public async getSettings(
voiceId: string,
requestOptions?: Voices.RequestOptions,
): Promise<ElevenLabs.VoiceSettings> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Suppl... | /**
* Returns the settings for a specific voice. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app.
*
* @param {string} voiceId - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list ... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L198-L262 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.get | public async get(
voiceId: string,
request: ElevenLabs.VoicesGetRequest = {},
requestOptions?: Voices.RequestOptions,
): Promise<ElevenLabs.Voice> {
const { with_settings: withSettings } = request;
const _queryParams: Record<string, string | string[] | object | object[] | nul... | /**
* Returns metadata about a specific voice.
*
* @param {string} voiceId - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.
* @param {ElevenLabs.VoicesGetRequest} request
* @param {Voices.RequestOptions} requestOptions - Request-specific c... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L276-L346 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.delete | public async delete(voiceId: string, requestOptions?: Voices.RequestOptions): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
... | /**
* Deletes a voice by its ID.
*
* @param {string} voiceId - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.Unprocessabl... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L359-L418 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.editSettings | public async editSettings(
voiceId: string,
request: ElevenLabs.VoiceSettings,
requestOptions?: Voices.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
... | /**
* Edit your settings for a specific voice. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app.
*
* @param {string} voiceId - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list al... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L436-L502 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.add | public async add(
request: ElevenLabs.BodyAddVoiceV1VoicesAddPost,
requestOptions?: Voices.RequestOptions,
): Promise<ElevenLabs.AddVoiceIvcResponseModel> {
const _request = await core.newFormData();
_request.append("name", request.name);
for (const _file of request.files) {
... | /**
* Add a new voice to your collection of voices in VoiceLab.
*
* @param {ElevenLabs.BodyAddVoiceV1VoicesAddPost} request
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L518-L601 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.edit | public async edit(
voiceId: string,
request: ElevenLabs.BodyEditVoiceV1VoicesVoiceIdEditPost,
requestOptions?: Voices.RequestOptions,
): Promise<unknown> {
const _request = await core.newFormData();
_request.append("name", request.name);
if (request.files != null) {
... | /**
* Edit a voice created by you.
*
* @param {string} voiceId
* @param {ElevenLabs.BodyEditVoiceV1VoicesVoiceIdEditPost} request
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @ex... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L617-L705 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.addSharingVoice | public async addSharingVoice(
publicUserId: string,
voiceId: string,
request: ElevenLabs.AddSharingVoiceRequest,
requestOptions?: Voices.RequestOptions,
): Promise<ElevenLabs.AddVoiceResponseModel> {
const _response = await core.fetcher({
url: urlJoin(
... | /**
* Add a sharing voice to your collection of voices in VoiceLab.
*
* @param {string} publicUserId - Public user ID used to publicly identify ElevenLabs users.
* @param {string} voiceId - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.
* ... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L722-L789 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.getShared | public async getShared(
request: ElevenLabs.VoicesGetSharedRequest = {},
requestOptions?: Voices.RequestOptions,
): Promise<ElevenLabs.GetLibraryVoicesResponse> {
const {
page_size: pageSize,
category,
gender,
age,
accent,
... | /**
* Gets a list of shared voices.
*
* @param {ElevenLabs.VoicesGetSharedRequest} request
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await client.voices.getShar... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L806-L950 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.getSimilarLibraryVoices | public async getSimilarLibraryVoices(
request: ElevenLabs.BodyGetSimilarLibraryVoicesV1SimilarVoicesPost,
requestOptions?: Voices.RequestOptions,
): Promise<ElevenLabs.GetLibraryVoicesResponse> {
const _request = await core.newFormData();
if (request.audio_file != null) {
... | /**
* Returns a list of shared voices similar to the provided audio sample. If neither similarity_threshold nor top_k is provided, we will apply default values.
*
* @param {ElevenLabs.BodyGetSimilarLibraryVoicesV1SimilarVoicesPost} request
* @param {Voices.RequestOptions} requestOptions - Request-sp... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L963-L1041 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Voices.getAProfilePage | public async getAProfilePage(
handle: string,
requestOptions?: Voices.RequestOptions,
): Promise<ElevenLabs.ProfilePageResponseModel> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
(aw... | /**
* Gets a profile page based on a handle
*
* @param {string} handle - Handle for a VA's profile page
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
* await client.v... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/voices/client/Client.ts#L1054-L1116 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Workspace.searchUserGroups | public async searchUserGroups(
request: ElevenLabs.SearchUserGroupsV1WorkspaceGroupsSearchGetRequest,
requestOptions?: Workspace.RequestOptions,
): Promise<ElevenLabs.WorkspaceGroupByNameResponseModel[]> {
const { name } = request;
const _queryParams: Record<string, string | string[]... | /**
* Searches for user groups in the workspace. Multiple or no groups may be returned.
*
* @param {ElevenLabs.SearchUserGroupsV1WorkspaceGroupsSearchGetRequest} request
* @param {Workspace.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.Unpro... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/workspace/client/Client.ts#L50-L118 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Workspace.deleteMemberFromUserGroup | public async deleteMemberFromUserGroup(
groupId: string,
request: ElevenLabs.BodyDeleteMemberFromUserGroupV1WorkspaceGroupsGroupIdMembersRemovePost,
requestOptions?: Workspace.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
... | /**
* Removes a member from the specified group. This endpoint may only be called by workspace administrators.
*
* @param {string} groupId - The ID of the target group.
* @param {ElevenLabs.BodyDeleteMemberFromUserGroupV1WorkspaceGroupsGroupIdMembersRemovePost} request
* @param {Workspace.Reque... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/workspace/client/Client.ts#L134-L200 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Workspace.addMemberToUserGroup | public async addMemberToUserGroup(
groupId: string,
request: ElevenLabs.BodyAddMemberToUserGroupV1WorkspaceGroupsGroupIdMembersPost,
requestOptions?: Workspace.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(awai... | /**
* Adds a member of your workspace to the specified group. This endpoint may only be called by workspace administrators.
*
* @param {string} groupId - The ID of the target group.
* @param {ElevenLabs.BodyAddMemberToUserGroupV1WorkspaceGroupsGroupIdMembersPost} request
* @param {Workspace.Req... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/workspace/client/Client.ts#L216-L282 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Workspace.inviteUser | public async inviteUser(
request: ElevenLabs.BodyInviteUserV1WorkspaceInvitesAddPost,
requestOptions?: Workspace.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
... | /**
* Sends an email invitation to join your workspace to the provided email. If the user doesn't have an account they will be prompted to create one. If the user accepts this invite they will be added as a user to your workspace and your subscription using one of your seats. This endpoint may only be called by wo... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/workspace/client/Client.ts#L297-L362 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Workspace.inviteMultipleUsers | public async inviteMultipleUsers(
request: ElevenLabs.BodyInviteMultipleUsersV1WorkspaceInvitesAddBulkPost,
requestOptions?: Workspace.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options... | /**
* Sends email invitations to join your workspace to the provided emails. Requires all email addresses to be part of a verified domain. If the users don't have an account they will be prompted to create one. If the users accept these invites they will be added as users to your workspace and your subscription us... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/workspace/client/Client.ts#L377-L442 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Workspace.deleteExistingInvitation | public async deleteExistingInvitation(
request: ElevenLabs.BodyDeleteExistingInvitationV1WorkspaceInvitesDelete,
requestOptions?: Workspace.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._op... | /**
* Invalidates an existing email invitation. The invitation will still show up in the inbox it has been delivered to, but activating it to join the workspace won't work. This endpoint may only be called by workspace administrators.
*
* @param {ElevenLabs.BodyDeleteExistingInvitationV1WorkspaceInvitesD... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/workspace/client/Client.ts#L457-L520 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | Workspace.updateMember | public async updateMember(
request: ElevenLabs.BodyUpdateMemberV1WorkspaceMembersPost,
requestOptions?: Workspace.RequestOptions,
): Promise<unknown> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
... | /**
* Updates attributes of a workspace member. Apart from the email identifier, all parameters will remain unchanged unless specified. This endpoint may only be called by workspace administrators.
*
* @param {ElevenLabs.BodyUpdateMemberV1WorkspaceMembersPost} request
* @param {Workspace.RequestOpti... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/api/resources/workspace/client/Client.ts#L535-L598 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | addJitter | function addJitter(delay: number): number {
// Generate a random value between -JITTER_FACTOR and +JITTER_FACTOR
const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR;
return delay * jitterMultiplier;
} | // 20% random jitter | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/core/fetcher/requestWithRetries.ts#L6-L10 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
elevenlabs-js | github_2023 | elevenlabs | typescript | ElevenLabsClient.generate | async generate(
request: (ElevenLabsClient.GeneratAudioBulk | ElevenLabsClient.GenerateAudioStream) & { voice?: string },
requestOptions: FernClient.RequestOptions = {}
): Promise<stream.Readable> {
const voiceIdOrName = request.voice ?? "Sarah";
const voiceId = isVoiceId(voiceIdOrNa... | /**
* Generates audio for a voice.
*
* @example Generate the entire audio
* import { play } from "elevenlabs";
*
* const audio = eleven.generate({
* voiceId: "Matilda" // defaults to Sarah
* })
* await play(audio);
*
* @example
* import { stream } from "elev... | https://github.com/elevenlabs/elevenlabs-js/blob/89894c5601806e8c95e7eb3931a7d674e5ad9a8d/src/wrapper/ElevenLabsClient.ts#L56-L78 | 89894c5601806e8c95e7eb3931a7d674e5ad9a8d |
astro-font | github_2023 | rishi-raj-jain | typescript | getWeightNumber | function getWeightNumber(weight: string) {
return weight === 'normal' ? NORMAL_WEIGHT : weight === 'bold' ? BOLD_WEIGHT : Number(weight)
} | /**
* Convert the weight string to a number so it can be used for comparison.
* Weights can be defined as a number, 'normal' or 'bold'. https://developer.mozilla.org/docs/Web/CSS/@font-face/font-weight
*/ | https://github.com/rishi-raj-jain/astro-font/blob/e567d89067bc00b2c570f0215e9bf16060119b0f/packages/astro-font/fallback.ts#L13-L15 | e567d89067bc00b2c570f0215e9bf16060119b0f |
astro-font | github_2023 | rishi-raj-jain | typescript | getDistanceFromNormalWeight | function getDistanceFromNormalWeight(weight?: string) {
if (!weight) {
return 0
}
// If it's a variable font the weight is defined with two numbers "100 900", rather than just one "400"
const [firstWeight, secondWeight] = weight.trim().split(/ +/).map(getWeightNumber)
if (Number.isNaN(firstWeight) || Numb... | /**
* Get the distance from normal (400) weight for the provided weight.
* If it's not a variable font we can just return the distance.
* If it's a variable font we need to compare its weight range to 400.
*/ | https://github.com/rishi-raj-jain/astro-font/blob/e567d89067bc00b2c570f0215e9bf16060119b0f/packages/astro-font/fallback.ts#L22-L48 | e567d89067bc00b2c570f0215e9bf16060119b0f |
astro-font | github_2023 | rishi-raj-jain | typescript | calcAverageWidth | function calcAverageWidth(font: Font): number | undefined {
try {
/**
* Finding the right characters to use when calculating the average width is tricky.
* We can't just use the average width of all characters, because we have to take letter frequency into account.
* We also have to take word lengt... | /**
* Calculate the average character width of a font file.
* Used to calculate the size-adjust property by comparing the fallback average with the loaded font average.
*/ | https://github.com/rishi-raj-jain/astro-font/blob/e567d89067bc00b2c570f0215e9bf16060119b0f/packages/astro-font/font.ts#L31-L58 | e567d89067bc00b2c570f0215e9bf16060119b0f |
astro-font | github_2023 | rishi-raj-jain | typescript | getFS | async function getFS(): Promise<typeof import('node:fs') | undefined> {
let fs
try {
fs = await import('node:fs')
return fs
} catch (e) {}
} | // Check if file system can be accessed | https://github.com/rishi-raj-jain/astro-font/blob/e567d89067bc00b2c570f0215e9bf16060119b0f/packages/astro-font/utils.ts#L84-L90 | e567d89067bc00b2c570f0215e9bf16060119b0f |
astro-font | github_2023 | rishi-raj-jain | typescript | ifFSOSWrites | async function ifFSOSWrites(dir: string): Promise<string | undefined> {
try {
const fs = await getFS()
if (fs) {
const testDir = join(dir, '.astro_font')
if (!fs.existsSync(testDir)) fs.mkdirSync(testDir, { recursive: true })
fs.rmSync(testDir, { recursive: true, force: true })
return ... | // Check if writing is permitted by the file system | https://github.com/rishi-raj-jain/astro-font/blob/e567d89067bc00b2c570f0215e9bf16060119b0f/packages/astro-font/utils.ts#L101-L111 | e567d89067bc00b2c570f0215e9bf16060119b0f |
astro-font | github_2023 | rishi-raj-jain | typescript | getFontBuffer | async function getFontBuffer(path: string): Promise<Buffer | undefined> {
const fs = await getFS()
if (path.includes('https:') || path.includes('http:')) {
let tmp = await fetch(path)
return Buffer.from(await tmp.arrayBuffer())
} else {
// If the file system has the access to the *local* font
if (... | // Get the font whether remote or local buffer | https://github.com/rishi-raj-jain/astro-font/blob/e567d89067bc00b2c570f0215e9bf16060119b0f/packages/astro-font/utils.ts#L121-L132 | e567d89067bc00b2c570f0215e9bf16060119b0f |
astro-font | github_2023 | rishi-raj-jain | typescript | extractFileNameFromPath | function extractFileNameFromPath(path: string): string {
const lastSlashIndex = path.lastIndexOf('/')
if (lastSlashIndex !== -1) return path.substring(lastSlashIndex + 1)
return path
} | // Get everything after the last forward slash | https://github.com/rishi-raj-jain/astro-font/blob/e567d89067bc00b2c570f0215e9bf16060119b0f/packages/astro-font/utils.ts#L135-L139 | e567d89067bc00b2c570f0215e9bf16060119b0f |
astro-font | github_2023 | rishi-raj-jain | typescript | parseGoogleCSS | function parseGoogleCSS(tmp: string) {
let match
const fontFaceMatches = []
const fontFaceRegex = /@font-face\s*{([^}]+)}/g
while ((match = fontFaceRegex.exec(tmp)) !== null) {
const fontFaceRule = match[1]
const fontFaceObject: any = {}
fontFaceRule.split(';').forEach((property) => {
if (prop... | // Custom script to parseGoogleCSS | https://github.com/rishi-raj-jain/astro-font/blob/e567d89067bc00b2c570f0215e9bf16060119b0f/packages/astro-font/utils.ts#L191-L222 | e567d89067bc00b2c570f0215e9bf16060119b0f |
astro-font | github_2023 | rishi-raj-jain | typescript | slugifyPath | const slugifyPath = (i: Source) => `${i.path}_${i.style}_${i.weight}` | // Create a json based on slugified path, style and weight | https://github.com/rishi-raj-jain/astro-font/blob/e567d89067bc00b2c570f0215e9bf16060119b0f/packages/astro-font/utils.ts#L272-L272 | e567d89067bc00b2c570f0215e9bf16060119b0f |
unruggable.meme | github_2023 | keep-starknet-strange | typescript | Factory.getBaseMemecoin | public async getBaseMemecoin(address: string): Promise<BaseMemecoin | undefined> {
const result = await multiCallContract(this.config.provider, this.config.chainId, [
{
contractAddress: FACTORY_ADDRESSES[this.config.chainId],
entrypoint: Entrypoint.IS_MEMECOIN,
calldata: [address],
... | // | https://github.com/keep-starknet-strange/unruggable.meme/blob/1cfa8a5b7ed00eb63f9b7bba537233e162086e9b/packages/core/src/factory/default.ts#L56-L93 | 1cfa8a5b7ed00eb63f9b7bba537233e162086e9b |
unruggable.meme | github_2023 | keep-starknet-strange | typescript | Factory.getMemecoinLaunchData | public async getMemecoinLaunchData(address: string): Promise<LaunchedMemecoin> {
const result = await multiCallContract(this.config.provider, this.config.chainId, [
{
contractAddress: address,
entrypoint: Entrypoint.GET_TEAM_ALLOCATION,
},
{
contractAddress: address,
... | // | https://github.com/keep-starknet-strange/unruggable.meme/blob/1cfa8a5b7ed00eb63f9b7bba537233e162086e9b/packages/core/src/factory/default.ts#L99-L186 | 1cfa8a5b7ed00eb63f9b7bba537233e162086e9b |
unruggable.meme | github_2023 | keep-starknet-strange | typescript | Factory.getJediswapLiquidityLockPosition | private async getJediswapLiquidityLockPosition(liquidity: Pick<JediswapLiquidity, 'lockManager' | 'lockPosition'>) {
const { result } = await this.config.provider.callContract({
contractAddress: liquidity.lockManager,
entrypoint: Entrypoint.GET_LOCK_DETAILS,
calldata: [liquidity.lockPosition],
... | // | https://github.com/keep-starknet-strange/unruggable.meme/blob/1cfa8a5b7ed00eb63f9b7bba537233e162086e9b/packages/core/src/factory/default.ts#L192-L205 | 1cfa8a5b7ed00eb63f9b7bba537233e162086e9b |
unruggable.meme | github_2023 | keep-starknet-strange | typescript | Factory.getEkuboFees | public async getEkuboFees(memecoin: Memecoin): Promise<Fraction | undefined> {
if (!memecoin.isLaunched || memecoin.liquidity.type !== LiquidityType.EKUBO_NFT || !memecoin.quoteToken) return
const calldata = CallData.compile([
memecoin.liquidity.ekuboId,
memecoin.liquidity.poolKey,
memecoin.l... | // | https://github.com/keep-starknet-strange/unruggable.meme/blob/1cfa8a5b7ed00eb63f9b7bba537233e162086e9b/packages/core/src/factory/default.ts#L243-L266 | 1cfa8a5b7ed00eb63f9b7bba537233e162086e9b |
unruggable.meme | github_2023 | keep-starknet-strange | typescript | Factory.getCollectEkuboFeesCalldata | public getCollectEkuboFeesCalldata(memecoin: Memecoin) {
if (!memecoin.isLaunched || memecoin.liquidity.type !== LiquidityType.EKUBO_NFT) return
const collectFeesCalldata = CallData.compile([
memecoin.liquidity.ekuboId, // ekubo pool id
memecoin.liquidity.owner,
])
const calls = [
{
... | // | https://github.com/keep-starknet-strange/unruggable.meme/blob/1cfa8a5b7ed00eb63f9b7bba537233e162086e9b/packages/core/src/factory/default.ts#L272-L289 | 1cfa8a5b7ed00eb63f9b7bba537233e162086e9b |
unruggable.meme | github_2023 | keep-starknet-strange | typescript | Factory.getExtendLiquidityLockCalldata | public getExtendLiquidityLockCalldata(memecoin: Memecoin, seconds: number) {
if (!memecoin?.isLaunched || memecoin.liquidity.type === LiquidityType.EKUBO_NFT) return
const extendCalldata = CallData.compile([
memecoin.liquidity.lockPosition, // liquidity position
seconds,
])
const calls = [... | // | https://github.com/keep-starknet-strange/unruggable.meme/blob/1cfa8a5b7ed00eb63f9b7bba537233e162086e9b/packages/core/src/factory/default.ts#L295-L312 | 1cfa8a5b7ed00eb63f9b7bba537233e162086e9b |
unruggable.meme | github_2023 | keep-starknet-strange | typescript | Factory.getDeployCalldata | public getDeployCalldata(data: DeployData) {
const salt = stark.randomAddress()
const constructorCalldata = CallData.compile([
data.owner,
data.name,
data.symbol,
uint256.bnToUint256(BigInt(data.initialSupply) * BigInt(decimalsScale(DECIMALS))),
salt,
])
const tokenAddres... | // | https://github.com/keep-starknet-strange/unruggable.meme/blob/1cfa8a5b7ed00eb63f9b7bba537233e162086e9b/packages/core/src/factory/default.ts#L318-L345 | 1cfa8a5b7ed00eb63f9b7bba537233e162086e9b |
unruggable.meme | github_2023 | keep-starknet-strange | typescript | Factory.getEkuboLaunchCalldata | public async getEkuboLaunchCalldata(memecoin: Memecoin, data: EkuboLaunchData) {
// get quote token current price
const quoteTokenPrice = await getPairPrice(this.config.provider, data.quoteToken.usdcPair)
// get the team allocation amount
const teamAllocationFraction = data.teamAllocations.reduce((acc,... | // | https://github.com/keep-starknet-strange/unruggable.meme/blob/1cfa8a5b7ed00eb63f9b7bba537233e162086e9b/packages/core/src/factory/default.ts#L351-L429 | 1cfa8a5b7ed00eb63f9b7bba537233e162086e9b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.