仅以英文和法文检测文件文字

I'm trying to extract the text of an image in Go using google vision. I'm using the vision package and the DetectDocumentText function. So far everything works great on my machine but when I try it on my other server it's not working. Well it's kind of working, but the results are not the same even when I use the same image and everything. In other words, I don't have any errors but the result is not always the same.

For example, I'm trying to extract the name and the surname on a card.

On my machine I get Arcand for the surname and Дохие 4 for the name.

On the server, I get Arcand for the surname and ????? 4 for the name.

I don't know why I get a result in Serbian or Russian when the name is in french and I don't know why I get only question marks with the other. The name is fairly well written.

My question is, is there a way to tell the vision api to analyse the text only in french or english? And why does the results are not the same on both machines?

This is what my function that looks for texts looks like:

func findLabels(img image.Image, exclude string) string {

    // [START init]
    ctx := context.Background()

    // Create the client.
    client, err := vision.NewImageAnnotatorClient(ctx)
    if err != nil {
        log.Println(err.Error())
        return ""
    }
    defer client.Close()
    // [END init]

    // [START request]
    // Open the file.
    buf := &bytes.Buffer{}
    err = jpeg.Encode(buf, img, nil)
    if err != nil {
        log.Println(err.Error())
        return ""
    }
    image, err := vision.NewImageFromReader(buf)
    if err != nil {
        log.Println(err.Error())
        return ""
    }        

    // Perform the request.
    annotations, err := client.DetectDocumentText(ctx, image, nil)
    if err != nil {
        log.Println(err.Error())
        return ""
    }
    // [END request]
    // [START transform]
    var labels []string
    if annotations != nil && len(annotations.Pages) > 0 {
        for _, annotation := range annotations.Pages[0].Blocks {
            for _, paragraph := range annotation.Paragraphs {
                line := ""
                for _, word := range paragraph.Words {            

                    for _, s := range word.Symbols {

                        line += sanitizeText(s.Text)
                        if s.Property != nil && s.Property.DetectedBreak != nil && s.Property.DetectedBreak.Type == vision2.TextAnnotation_DetectedBreak_SPACE {
                            line += " "
                        }
                        if s.Property != nil && s.Property.DetectedBreak != nil && s.Property.DetectedBreak.Type == vision2.TextAnnotation_DetectedBreak_EOL_SURE_SPACE {
                            if strings.ToLower(line) != exclude {
                                labels = append(labels, line)
                            }
                            line = ""

                        }
                        if s.Property != nil && s.Property.DetectedBreak != nil && s.Property.DetectedBreak.Type == vision2.TextAnnotation_DetectedBreak_LINE_BREAK {
                            if strings.ToLower(line) != exclude {
                                labels = append(labels, line)
                            }
                            line = ""
                        }
                    }
                }
            }
        }
    }
    return strings.Join(labels, " ")
    // [END transform]
}