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

# Get WAV file

> Get a sample as a WAV file. This only applies to samples with an audio axis.



## OpenAPI

````yaml /.assets/openapi.yaml get /api/{projectId}/raw-data/{sampleId}/wav
openapi: 3.0.0
info:
  title: Edge Impulse API
  version: 1.0.0
servers:
  - url: https://studio.edgeimpulse.com/v1
security:
  - ApiKeyAuthentication: []
  - JWTAuthentication: []
  - JWTHttpHeaderAuthentication: []
  - OAuth2: []
paths:
  /api/{projectId}/raw-data/{sampleId}/wav:
    get:
      tags:
        - Raw data
      summary: Get WAV file
      description: >-
        Get a sample as a WAV file. This only applies to samples with an audio
        axis.
      operationId: getSampleAsAudio
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/SampleIdParameter'
        - $ref: '#/components/parameters/AxisIndexParameter'
        - $ref: '#/components/parameters/OptionalSliceStartParameter'
        - $ref: '#/components/parameters/OptionalSliceEndParameter'
        - $ref: '#/components/parameters/CacheKeyParameter'
      responses:
        '200':
          description: Wav file
          content:
            audio/wav:
              schema:
                type: string
                format: binary
components:
  parameters:
    ProjectIdParameter:
      name: projectId
      in: path
      required: true
      description: Project ID
      schema:
        type: integer
    SampleIdParameter:
      name: sampleId
      in: path
      required: true
      description: Sample ID
      schema:
        type: integer
    AxisIndexParameter:
      name: axisIx
      in: query
      required: true
      description: Axis index
      schema:
        type: integer
    OptionalSliceStartParameter:
      name: sliceStart
      in: query
      required: false
      description: Begin index of the slice. If not given, the whole sample is used.
      schema:
        type: integer
    OptionalSliceEndParameter:
      name: sliceEnd
      in: query
      required: false
      description: End index of the slice. If not given, the whole sample is used.
      schema:
        type: integer
    CacheKeyParameter:
      name: cacheKey
      in: query
      required: false
      description: >-
        If set, then a long cache header is sent. If this is omitted then a
        no-cache header is sent. You can use this if you f.e. know the last
        modified date of a sample. Stick the last modified date in the cache
        key, so the sample can be stored in browser cache (and will
        automatically be invalidated if the modified date changes).
      schema:
        type: string
  securitySchemes:
    ApiKeyAuthentication:
      type: apiKey
      in: header
      name: x-api-key
    JWTAuthentication:
      type: apiKey
      in: cookie
      name: jwt
    JWTHttpHeaderAuthentication:
      type: apiKey
      in: header
      name: x-jwt-token
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: /v1/oauth/authorize
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        implicit:
          authorizationUrl: /v1/oauth/authorize
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        password:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        clientCredentials:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information

````