• Gooey.AI
  • API: Senegal Wolof Speech Recognition & Translation


    📖 To learn more, take a look at our complete API

    📤 Example Request

    1. Generate an api key below👇

    2. Install node-fetch & add the GOOEY_API_KEY to your environment variables.
      Never store the api key in your code and don't use direcly in the browser.

    $ npm install node-fetch
    $ export GOOEY_API_KEY=sk-xxxx
    
    1. Use this sample code to call the API.
      If you encounter any issues, write to us at [email protected] and make sure to include the full code snippet and the error message.
    import fetch from 'node-fetch';
    
    const payload = {
      "documents": [
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/03274222-69f9-11ee-84dd-02420a00018e/My%20hovercraft%20is%20full%20of%20eels.mp3.wav",
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/3640ed52-69f9-11ee-b00f-02420a000188/New%20Year%20Greetings.mp3.wav",
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/37c0ad3e-69f9-11ee-a56d-02420a00018c/How%20do%20you%20say%20in%20Wolof.mp3.wav",
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/394a15dc-69f9-11ee-a8fd-02420a00018f/Would%20you%20like%20to%20Dance.mp3.wav",
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/3ad1a0d2-69f9-11ee-a687-02420a00018d/Hello.mp3.wav"
      ],
      "selected_model": "mms_1b_all",
      "language": "wol",
      "translation_model": "google",
      "translation_target": "en"
    };
    
    async function gooeyAPI() {
      const response = await fetch("https://api.gooey.ai/v2/asr?example_id=wdppdxs5", {
        method: "POST",
        headers: {
          "Authorization": "bearer " + process.env["GOOEY_API_KEY"],
          "Content-Type": "application/json",
        },
        body: JSON.stringify(payload),
      });
    
      if (!response.ok) {
        throw new Error(response.status);
      }
    
      const result = await response.json();
      console.log(response.status, result);
    }
    
    gooeyAPI();
    
    1. Generate an api key below👇

    2. Install requests & add the GOOEY_API_KEY to your environment variables.
      Never store the api key in your code.

    $ python3 -m pip install requests
    $ export GOOEY_API_KEY=sk-xxxx
    
    1. Use this sample code to call the API.
      If you encounter any issues, write to us at [email protected] and make sure to include the full code snippet and the error message.
    import os
    import requests
    
    payload = {
        "documents": [
            "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/03274222-69f9-11ee-84dd-02420a00018e/My%20hovercraft%20is%20full%20of%20eels.mp3.wav",
            "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/3640ed52-69f9-11ee-b00f-02420a000188/New%20Year%20Greetings.mp3.wav",
            "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/37c0ad3e-69f9-11ee-a56d-02420a00018c/How%20do%20you%20say%20in%20Wolof.mp3.wav",
            "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/394a15dc-69f9-11ee-a8fd-02420a00018f/Would%20you%20like%20to%20Dance.mp3.wav",
            "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/3ad1a0d2-69f9-11ee-a687-02420a00018d/Hello.mp3.wav",
        ],
        "selected_model": "mms_1b_all",
        "language": "wol",
        "translation_model": "google",
        "translation_target": "en",
    }
    
    response = requests.post(
        "https://api.gooey.ai/v2/asr?example_id=wdppdxs5",
        headers={
            "Authorization": "bearer " + os.environ["GOOEY_API_KEY"],
        },
        json=payload,
    )
    assert response.ok, response.content
    
    result = response.json()
    print(response.status_code, result)
    
    1. Generate an api key below👇

    2. Install curl & add the GOOEY_API_KEY to your environment variables.
      Never store the api key in your code.

    export GOOEY_API_KEY=sk-xxxx
    
    1. Run the following curl command in your terminal.
      If you encounter any issues, write to us at [email protected] and make sure to include the full curl command and the error message.
    curl 'https://api.gooey.ai/v2/asr?example_id=wdppdxs5' \
      -H "Authorization: bearer $GOOEY_API_KEY" \
      -H 'Content-Type: application/json' \
      -d '{
      "documents": [
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/03274222-69f9-11ee-84dd-02420a00018e/My%20hovercraft%20is%20full%20of%20eels.mp3.wav",
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/3640ed52-69f9-11ee-b00f-02420a000188/New%20Year%20Greetings.mp3.wav",
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/37c0ad3e-69f9-11ee-a56d-02420a00018c/How%20do%20you%20say%20in%20Wolof.mp3.wav",
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/394a15dc-69f9-11ee-a8fd-02420a00018f/Would%20you%20like%20to%20Dance.mp3.wav",
        "https://storage.googleapis.com/dara-c1b52.appspot.com/daras_ai/media/3ad1a0d2-69f9-11ee-a687-02420a00018d/Hello.mp3.wav"
      ],
      "selected_model": "mms_1b_all",
      "language": "wol",
      "translation_model": "google",
      "translation_target": "en"
    }'
    

    🎁 Example Response

    {4 Items
    "id"
    :
    string
    "1nz73lihhplx"
    "url"
    :
    string
    "https://gooey.ai/speech/"
    "created_at"
    :
    string
    "2024-12-29T16:27:07.684437+00:00"
    "output"
    :
    {2 Items
    "raw_output_text"
    :
    [5 Items
    0
    :
    string
    "sa ma aelo bise fèsna ak angilès"
    1
    :
    string
    "mangi lay ndokel ci at bu bes bi"
    2
    :
    string
    "naka lanuy waxee li ci wollof"
    3
    :
    string
    "buga nga fecc"
    4
    :
    string
    "nanga def"
    ]
    "output_text"
    :
    [5 Items
    0
    :
    string
    "This is my first kiss in French and English."
    1
    :
    string
    "I wish you a happy new year."
    2
    :
    string
    "How do we say this in English?"
    3
    :
    string
    "buga you dance!"
    4
    :
    string
    "how are you"
    ]
    }
    }

    Please Login to generate the $GOOEY_API_KEY