> ## Documentation Index
> Fetch the complete documentation index at: https://docs.youka.io/llms.txt
> Use this file to discover all available pages before exploring further.

# लिरिक्स सिंक

> किसी मौजूदा प्रोजेक्ट पर लिरिक्स सिंक्रोनाइज़ेशन दोबारा चलाएँ

लिरिक्स सिंक, लिरिक टेक्स्ट को ऑडियो के साथ संरेखित करता है ताकि शब्द सही समय पर हाइलाइट हों। अपडेटेड लिरिक्स, अलग मॉडल, या नई भाषा के साथ किसी भी प्रोजेक्ट पर सिंक दोबारा चलाने के लिए `client.projects.syncLyrics(...)` का उपयोग करें।

## `client.projects.syncLyrics(projectId, body, options?)`

एक नया लिरिक्स सिंक ऑपरेशन शुरू करें।

```ts theme={null}
const operation = await client.projects.syncLyrics("prj_abc123", {
  lyricsSource: {
    type: "align",
    lyrics: "First line\nSecond line\n...",
    syncModel: "audioshake-alignment",
  },
});

const { project } = await client.projects.wait(operation);
console.log(project.alignments);
```

### लिरिक्स स्रोत

रिक्वेस्ट बॉडी में एक `lyricsSource` ऑब्जेक्ट पास करें:

<Tabs>
  <Tab title="transcribe">
    मॉडल को ऑडियो से लिरिक्स ट्रांसक्राइब करने दें।

    ```ts theme={null}
    {
      lyricsSource: {
        type: "transcribe",
        syncModel: "audioshake-transcription",
        language: "en",
      },
    }
    ```
  </Tab>

  <Tab title="align">
    सटीक लिरिक्स पास करें। मॉडल उन्हें ऑडियो के साथ संरेखित करता है।

    ```ts theme={null}
    {
      lyricsSource: {
        type: "align",
        lyrics: "First line\nSecond line\n...",
        syncModel: "audioshake-alignment",
        language: "en",
      },
    }
    ```
  </Tab>
</Tabs>

### सिंक मॉडल

**Alignment models** (`align` के साथ उपयोग करें जब आपके पास सटीक लिरिक्स हों):

* `audioshake-alignment`
* `musicai-alignment`
* `musicai-alignment-subword`

**Transcription models** (`transcribe` के साथ उपयोग करें):

* `audioshake-transcription`
* `musicai-transcription`
* `wav2vec2`
* `whisper`

मार्गदर्शन के लिए [Sync model reference](/hi/desktop/sync-model) देखें।

## एंड-टू-एंड उदाहरण

```ts theme={null}
import { YoukaClient } from "@youka/sdk";
import { readFile } from "node:fs/promises";

const client = new YoukaClient({ apiKey: process.env.YOUKA_API_KEY! });

async function reAlignLyrics(projectId: string) {
  const lyrics = await readFile("./lyrics.txt", "utf8");

  const operation = await client.projects.syncLyrics(projectId, {
    lyricsSource: {
      type: "align",
      lyrics,
      syncModel: "audioshake-alignment",
      language: "en",
    },
  });

  const { project } = await client.projects.wait(operation);
  console.log("Updated lyrics with", project.lyrics?.length, "lines");
}
```

## आगे क्या

* [Stems](/hi/sdk/stems) — दोबारा सिंक करने से पहले स्टेम सेपरेशन दोबारा चलाएँ
* [Tasks](/hi/sdk/tasks) — ऑपरेशन हैंडल और abort पैटर्न
* [Sync model reference](/hi/desktop/sync-model) — सही मॉडल चुनें
