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

# XSpeechSynthesizerSetCustomVoice

> XSpeechSynthesizerSetCustomVoice

# XSpeechSynthesizerSetCustomVoice

음성 합성기가 지정된 사용자 지정 음성을 사용하도록 지정합니다.

## 구문

```cpp theme={null}
HRESULT XSpeechSynthesizerSetCustomVoice(  
         XSpeechSynthesizerHandle speechSynthesizer,  
         const char* voiceId  
)  
```

### 매개 변수

*speechSynthesizer*   \_In\_\
형식: XSpeechSynthesizerHandle

사용자 지정 음성을 사용할 음성 합성기를 지정합니다.

*voiceId*   \_In\_z\_\
형식: char\*

[XSpeechSynthesizerInstalledVoicesCallback](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerinstalledvoicescallback.md) 함수에서 반환된 [XSpeechSynthesizerVoiceInformation](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation.md) 구조체의 음성 ID입니다.

### 반환 값

형식: [HRESULT](https://learn.microsoft.com/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

성공하면 **S\_OK**를 반환하고, 그렇지 않으면 오류 코드를 반환합니다. 오류 코드 목록은 [오류 코드](https://docs.xbox.com/ko/reference/errorcodes.md)를 참조하세요.

## 설명

> [!NOTE]
>
> 이 함수는 시간에 민감한 스레드에서 호출하기에 안전하지 않습니다. 자세한 내용은 [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)를 참조하세요.

* 설치된 각 음성에 대해 [XSpeechSynthesizerVoiceInformation](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation.md) 구조체는 음성 ID, 설명, 표시 텍스트, 성별, 언어 및 기타 정보를 제공합니다.

* 현재 디바이스에 설치된 음성을 열거하고 정보를 얻으려면 [XSpeechSynthesizerEnumerateInstalledVoices](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices.md) 함수를 [XSpeechSynthesizerInstalledVoicesCallback](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerinstalledvoicescallback.md) 콜백 함수와 함께 사용하세요.

* 지정된 음성 합성기에 대해 현재 시스템 음성을 사용하려면 [XSpeechSynthesizerSetDefaultVoice](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetdefaultvoice.md)를 호출합니다.

* **XSpeechSynthesizerSetCustomVoice** 함수를 사용하는 방법을 보여 주는 예제는 [XSpeechSynthesizerCreate](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreate.md)를 참조하세요.

## 요구 사항

**헤더:** XSpeechSynthesizer.h

**라이브러리:** xgameruntime.lib

**지원 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 개념 설명서

* [텍스트 음성 변환](https://docs.xbox.com/ko/build/console-features/text-to-speech/text-to-speech.md)
* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 참고 항목

[XAccessibility](https://docs.xbox.com/ko/reference/system/xaccessibility/xaccessibility_members.md)\
[XSpeechSynthesizerCreateStreamFromText](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/functions/xspeechsynthesizercreatestreamfromtext.md)\
[XSpeechSynthesizer](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)


## Related topics

- [XSpeechSynthesizerEnumerateInstalledVoices](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices.md)
- [XSpeechSynthesizerInstalledVoicesCallback](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerinstalledvoicescallback.md)
- [XSpeechSynthesizerVoiceInformation](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation.md)
- [XSpeechSynthesizerSetDefaultVoice](https://docs.xbox.com/ko/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetdefaultvoice.md)
- [텍스트 음성 변환](https://docs.xbox.com/ko/build/console-features/text-to-speech/text-to-speech.md)
