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

# Update PVC voice sample

> Update a PVC voice sample - apply noise removal, select speaker, change trim times or file name.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/voices/pvc/{voice_id}/samples/{sample_id}
openapi: 3.1.0
info:
  title: Threetone API
  description: >-
    APIs for the Threetone Agents Platform and shared workspace resources.
    Authenticate programmatic requests with an API key in the x-api-key header.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/voices/pvc/{voice_id}/samples/{sample_id}:
    post:
      tags:
        - Voices
      summary: Update PVC voice sample
      description: >-
        Update a PVC voice sample - apply noise removal, select speaker, change
        trim times or file name.
      operationId: edit_pvc_voice_sample
      parameters:
        - name: voice_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              Voice ID to be used, you can use GET /v1/voices to list all the
              available voices.
            examples:
              - 21m00Tcm4TlvDq8ikWAM
            title: Voice Id
          description: >-
            Voice ID to be used, you can use GET /v1/voices to list all the
            available voices.
        - name: sample_id
          in: path
          required: true
          schema:
            type: string
            description: Sample ID to be used
            examples:
              - VW7YKqPnjY4h39yTbx2L
            title: Sample Id
          description: Sample ID to be used
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_Update_PVC_voice_sample_v1_voices_pvc__voice_id__samples__sample_id__post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddVoiceResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_Update_PVC_voice_sample_v1_voices_pvc__voice_id__samples__sample_id__post:
      properties:
        remove_background_noise:
          type: boolean
          title: Remove Background Noise
          description: >-
            If set will remove background noise for voice samples using our
            audio isolation model. If the samples do not include background
            noise, it can make the quality worse.
          default: false
          examples:
            - true
        selected_speaker_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Selected Speaker Ids
          description: >-
            Speaker IDs to be used for PVC training. Make sure you send all the
            speaker IDs you want to use for PVC training in one request because
            the last request will override the previous ones.
          examples:
            - speaker_0
        trim_start_time:
          anyOf:
            - type: integer
            - type: 'null'
          title: Trim Start Time
          description: >-
            The start time of the audio to be used for PVC training. Time should
            be in milliseconds
          examples:
            - 0
        trim_end_time:
          anyOf:
            - type: integer
            - type: 'null'
          title: Trim End Time
          description: >-
            The end time of the audio to be used for PVC training. Time should
            be in milliseconds
          examples:
            - 10
        file_name:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name
          description: The name of the audio file to be used for PVC training.
          examples:
            - sample.mp3
      type: object
      title: >-
        Body_Update_PVC_voice_sample_v1_voices_pvc__voice_id__samples__sample_id__post
    AddVoiceResponseModel:
      properties:
        voice_id:
          type: string
          title: Voice Id
          description: The ID of the voice.
      type: object
      required:
        - voice_id
      title: AddVoiceResponseModel
      example:
        voice_id: b38kUX8pkfYO2kHyqfFy
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.